From 7f9e845bcf600288e4676d5791ae0670be8188db Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 6 May 2016 12:52:19 +0200 Subject: [PATCH] spec: update definition of global "snap" Make it more similar to upstream's spec file from contrib/rpm. --- NetworkManager.spec | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/NetworkManager.spec b/NetworkManager.spec index 2146ede..5c5cf2e 100644 --- a/NetworkManager.spec +++ b/NetworkManager.spec @@ -7,8 +7,8 @@ %global ppp_version %(rpm -q ppp-devel >/dev/null && rpm -q --qf '%%{version}' ppp-devel || echo -n bad) -#global snapshot %{nil} -#global git_sha %{nil} +%global snapshot %{nil} +%global git_sha %{nil} %global rpm_version 1.2.0 %global real_version 1.2.0 %global release_version 1 @@ -21,7 +21,14 @@ %global _hardened_build 1 -%global snap %{?git_sha:.%{git_sha}}%{?snapshot:.%{snapshot}} +%if x%{?snapshot} != x +%global snapshot_dot .%{snapshot} +%endif +%if x%{?git_sha} != x +%global git_sha_dot .%{git_sha} +%endif + +%global snap %{?git_sha_dot}%{?snapshot_dot} ###############################################################################