spec: update definition of global "snap"

Make it more similar to upstream's spec file from contrib/rpm.
This commit is contained in:
Thomas Haller 2016-05-06 12:52:19 +02:00
parent eb0b7592f8
commit 7f9e845bcf
1 changed files with 10 additions and 3 deletions

View File

@ -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}
###############################################################################