let rpm figure out the release
authorKarsten Hopp <karsten@redhat.com>
Fri, 28 Jan 2011 16:59:57 +0000 (17:59 +0100)
committerKarsten Hopp <karsten@redhat.com>
Fri, 28 Jan 2011 16:59:57 +0000 (17:59 +0100)
Makefile
hwdata.spec

index 0374c55ca1e25b4680d37990ed5d1e2ab53ea530..16e6b9fb7485d4203468f85659cd630ecaec1fe2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 NAME=$(shell awk '/Name:/ { print $$2 }' hwdata.spec)
 VERSION=$(shell awk '/Version:/ { print $$2 }' hwdata.spec)
-RELEASE=$(shell awk '/Release:/ { a=$$2; sub("%.*","",a); print a }' hwdata.spec)
+RELEASE=$(shell rpm -q --specfile --qf "%{release}" hwdata.spec)
 SOURCEDIR := $(shell pwd)
 
 prefix=$(DESTDIR)/usr
index e7b7aba536147f9cecf41c483bb1843cf6c66460..81926bc0d3f339788a8cdec359c8862c38880ce1 100644 (file)
@@ -1,7 +1,7 @@
 Name: hwdata
 Summary: Hardware identification and configuration data
 Version: 0.233
-Release: 6%{?dist}
+Release: 7%{?dist}
 License: GPLv2+
 Group: System Environment/Base
 Source: hwdata-%{version}-%{release}.tar.bz2
@@ -37,19 +37,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/%{name}/*
 
 %changelog
-* Fri Jan 28 2011 Karsten Hopp <karsten@redhat.com> 0.233-6
+* Fri Jan 28 2011 Karsten Hopp <karsten@redhat.com> 0.233-7
 - bump release
-
-* Fri Jan 28 2011 Karsten Hopp <karsten@redhat.com> 0.233-5
 - update oui.txt URL
-
-* Fri Jan 28 2011 Karsten Hopp <karsten@redhat.com> 0.233-4
 - fix tarball name in spec file
-
-* Fri Jan 28 2011 Karsten Hopp <karsten@redhat.com> 0.233-3
-- bump release
-
-* Fri Jan 28 2011 Karsten Hopp <karsten@redhat.com> 0.233-2
 - update usb.ids, out.txt and pci.ids
 
 * Wed Aug 25 2010 Karsten Hopp <karsten@redhat.com> 0.233-1