spec: add git suffix to release number
By default build as development release with build date and git suffix added to the release number. Build without this suffix if built --with release Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
parent
bc5d7acca8
commit
fb96ce1d44
1 changed files with 10 additions and 1 deletions
11
tuned.spec
11
tuned.spec
|
|
@ -1,7 +1,16 @@
|
|||
%bcond_with release
|
||||
|
||||
%if %{without release}
|
||||
%global git_commit %(git rev-parse --verify HEAD)
|
||||
%global git_date %(date +'%Y%m%d')
|
||||
%global git_short_commit %(echo %{git_commit} | cut -c -8)
|
||||
%global git_suffix %{git_date}git%{git_short_commit}
|
||||
%endif
|
||||
|
||||
Summary: A dynamic adaptive system tuning daemon
|
||||
Name: tuned
|
||||
Version: 2.4.1
|
||||
Release: 1%{?dist}
|
||||
Release: 1%{!?with_release:.%{git_suffix}}%{?dist}
|
||||
License: GPLv2+
|
||||
Source: https://fedorahosted.org/releases/t/u/tuned/tuned-%{version}.tar.bz2
|
||||
URL: https://fedorahosted.org/tuned/
|
||||
|
|
|
|||
Loading…
Reference in a new issue