From fb96ce1d44e70442cf0d19037c1597da426d2540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Thu, 28 May 2015 17:21:50 +0200 Subject: [PATCH] spec: add git suffix to release number MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tuned.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tuned.spec b/tuned.spec index 0dbe3f0..90582e2 100644 --- a/tuned.spec +++ b/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/