Skip to content

Commit

Permalink
get revision number from source archive
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Aug 22, 2023
1 parent e0dbade commit 1050ea5
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions packaging/rpm/xpra.spec
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,24 @@ autoprov: no
%{!?nthreads: %global nthreads 1}
%endif

%if 0%{?xpra_revision_no}
%define revision_no 10.r%{xpra_revision_no}
%else
%define revision_no 10
%endif


Name: %{package_prefix}
Version: 6.0
Release: %{revision_no}%{?dist}
Summary: Xpra gives you "persistent remote applications" for X.
Group: Networking
License: GPLv2+ and BSD and LGPLv3+ and MIT
URL: https://xpra.org/
Packager: Antoine Martin <[email protected]>
Vendor: https://xpra.org/
Source: https://xpra.org/src/xpra-%{version}.tar.xz
#grab the full revision number from the source archive's src_info.py file:
%define revision_no %(tar -OJxf dist/xpra-%{version}.tar.xz xpra-%{version}/xpra/src_info.py | grep -e "^REVISION=" | awk -F= '{print ".r"$2}' 2> /dev/null)
Release: 10%{revision_no}%{?dist}
#rpm falls over itself if we try to make the top-level package noarch:
#BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: tar
BuildRequires: grep
BuildRequires: gawk
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: %{python3}-Cython
Expand Down

0 comments on commit 1050ea5

Please sign in to comment.