From 3520bb5c9267749043db39dfd24cb090157955b1 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Feb 17 2024 21:08:38 +0000 Subject: 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. --- diff --git a/systemd.spec b/systemd.spec index 10ad145..0add847 100644 --- a/systemd.spec +++ b/systemd.spec @@ -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 $?)