Blob Blame History Raw
From 9f7b7b9edf686b6312a9e72cdc5281c62ddabfac Mon Sep 17 00:00:00 2001
From: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com>
Date: Tue, 30 Apr 2019 17:29:07 +0530
Subject: [PATCH] specfile: Fix version issue

Current code uses `git describe` to get package version. But we missed
to update specfile. So if we build rpm then `lshw -version` shows
"unknown".

This patch adds "VERSION" compilation flag in specfile. So that we
get proper output.

Signed-off-by: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com>
[Updated description and updated "without_gui" section - Vasant]
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
---
 lshw.spec.in | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lshw.spec.in b/lshw.spec.in
index f7f88b323ce9..0e4797baab56 100644
--- a/lshw.spec.in
+++ b/lshw.spec.in
@@ -57,6 +57,7 @@ http://lshw.ezix.org/
   SBINDIR="%{_sbindir}" \
   MANDIR="%{_mandir}" \
   DATADIR="%{_datadir}" \
+  VERSION="%{version}" \
   all
 %if %{!?_without_gui:1}0
 %{__make} %{?_smp_mflags} \
@@ -64,6 +65,7 @@ http://lshw.ezix.org/
   SBINDIR="%{_sbindir}" \
   MANDIR="%{_mandir}" \
   DATADIR="%{_datadir}" \
+  VERSION="%{version}" \
   gui
 %endif
 
-- 
2.17.1