Allow overriding the version and release using macros

Let's allow overriding the version and release by specifying the
corresponding macros on the rpmbuild command line. This allows us
to specify a custom version and release when doing upstream builds.
This commit is contained in:
Daan De Meyer 2024-02-17 18:02:24 +01:00
parent 74b3ef386f
commit 3520bb5c92
1 changed files with 2 additions and 7 deletions

View File

@ -33,13 +33,8 @@
Name: systemd
Url: https://systemd.io
%if %{without upstream}
Version: 255.3
%else
# determine the build information from local checkout
Version: %(tools/meson-vcs-tag.sh)
%endif
Release: %autorelease
Version: %{?version}%{!?version:255.3}
Release: %{?release}%{!?release:%autorelease}
%global stable %(c="%version"; [ "$c" = "${c#*.*}" ]; echo $?)