Blame SOURCES/0003-specfile-Fix-version-issue.patch

764bf3
From 9f7b7b9edf686b6312a9e72cdc5281c62ddabfac Mon Sep 17 00:00:00 2001
764bf3
From: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com>
764bf3
Date: Tue, 30 Apr 2019 17:29:07 +0530
764bf3
Subject: [PATCH] specfile: Fix version issue
764bf3
764bf3
Current code uses `git describe` to get package version. But we missed
764bf3
to update specfile. So if we build rpm then `lshw -version` shows
764bf3
"unknown".
764bf3
764bf3
This patch adds "VERSION" compilation flag in specfile. So that we
764bf3
get proper output.
764bf3
764bf3
Signed-off-by: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com>
764bf3
[Updated description and updated "without_gui" section - Vasant]
764bf3
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
764bf3
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
764bf3
---
764bf3
 lshw.spec.in | 2 ++
764bf3
 1 file changed, 2 insertions(+)
764bf3
764bf3
diff --git a/lshw.spec.in b/lshw.spec.in
764bf3
index f7f88b323ce9..0e4797baab56 100644
764bf3
--- a/lshw.spec.in
764bf3
+++ b/lshw.spec.in
764bf3
@@ -57,6 +57,7 @@ http://lshw.ezix.org/
764bf3
   SBINDIR="%{_sbindir}" \
764bf3
   MANDIR="%{_mandir}" \
764bf3
   DATADIR="%{_datadir}" \
764bf3
+  VERSION="%{version}" \
764bf3
   all
764bf3
 %if %{!?_without_gui:1}0
764bf3
 %{__make} %{?_smp_mflags} \
764bf3
@@ -64,6 +65,7 @@ http://lshw.ezix.org/
764bf3
   SBINDIR="%{_sbindir}" \
764bf3
   MANDIR="%{_mandir}" \
764bf3
   DATADIR="%{_datadir}" \
764bf3
+  VERSION="%{version}" \
764bf3
   gui
764bf3
 %endif
764bf3
 
764bf3
-- 
764bf3
2.17.1
764bf3