common Makefile.common,1.108,1.109

Dennis Gilmore (ausil) fedora-extras-commits at redhat.com
Wed Jul 30 17:42:48 UTC 2008


Author: ausil

Update of /cvs/extras/common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23931

Modified Files:
	Makefile.common 
Log Message:
use rpm less,  thanks ajax



Index: Makefile.common
===================================================================
RCS file: /cvs/extras/common/Makefile.common,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -r1.108 -r1.109
--- Makefile.common	29 Jul 2008 15:41:52 -0000	1.108
+++ Makefile.common	30 Jul 2008 17:42:18 -0000	1.109
@@ -82,7 +82,7 @@
 endif
 
 ifndef RPM_DEFINES
-RPM_DEFINES = --define "_sourcedir $(SOURCEDIR)" \
+RPM_DEFINES := --define "_sourcedir $(SOURCEDIR)" \
 		--define "_specdir $(SPECDIR)" \
 		--define "_builddir $(BUILDDIR)" \
 		--define "_srcrpmdir $(SRCRPMDIR)" \
@@ -92,16 +92,20 @@
 
 # Initialize the variables that we need, but are not defined
 # the version of the package
+
+VER_REL := $(shell rpm $(RPM_DEFINES) -q --qf "%{VERSION} %{RELEASE}\n" --specfile $(SPECFILE)| head -1)
+
 ifndef NAME
 $(error "You can not run this Makefile without having NAME defined")
 endif
 ifndef VERSION
-VERSION := $(shell rpm $(RPM_DEFINES) -q --qf "%{VERSION}\n" --specfile $(SPECFILE)| head -1)
+VERSION := $(word 1, $(VER_REL))
 endif
 # the release of the package
 ifndef RELEASE
-RELEASE := $(shell rpm $(RPM_DEFINES) -q --qf "%{RELEASE}\n" --specfile $(SPECFILE)| head -1)
+RELEASE := $(word 2, $(VER_REL))
 endif
+
 # this is used in make patch, maybe make clean eventually.
 # would be nicer to autodetermine from the spec file...
 RPM_BUILD_DIR ?= $(BUILDDIR)/$(NAME)-$(VERSION)




More information about the fedora-extras-commits mailing list