makefile: fix retrieving spec version

Simple sed doesn't expand macros (now used in qubes-release), so replace with
proper rpm query.
This commit is contained in:
Marek Marczykowski 2012-11-16 04:49:01 +01:00
parent c6272b9bb4
commit 3dce61a3ed

View File

@ -22,7 +22,7 @@
TOP := $(shell pwd) TOP := $(shell pwd)
RPMBUILD_DEFINES := --define "_rpmdir rpm/" --define "_sourcedir $(TOP)/rpm/SOURCES" RPMBUILD_DEFINES := --define "_rpmdir rpm/" --define "_sourcedir $(TOP)/rpm/SOURCES"
spec_version = $(shell sed -n '/^Version:/s/.*:[ \t]\+//p' $(1)) spec_version = $(shell rpm -q --qf "%{VERSION}\n" --specfile $(1)| head -1)
package = $(shell \ package = $(shell \
mkdir -p rpm/SOURCES; \ mkdir -p rpm/SOURCES; \
cd rpm/SOURCES; \ cd rpm/SOURCES; \