diff options
author | Paul W. Frields <stickster@gmail.com> | 2006-08-03 18:18:17 +0000 |
---|---|---|
committer | Paul W. Frields <stickster@gmail.com> | 2006-08-03 18:18:17 +0000 |
commit | 0530ceb2ba166e07ad26a827cb5c908e9ae6d2cc (patch) | |
tree | ecddaba0191b61d4e912233312aaac8a6306b3d3 | |
parent | cac6eca7e464bdaff17889d465a874aab7c420f5 (diff) | |
download | fedora-doc-utils-0530ceb2ba166e07ad26a827cb5c908e9ae6d2cc.tar.gz fedora-doc-utils-0530ceb2ba166e07ad26a827cb5c908e9ae6d2cc.tar.xz fedora-doc-utils-0530ceb2ba166e07ad26a827cb5c908e9ae6d2cc.zip |
Better package building definitions (stolen from Extras)
-rw-r--r-- | Makefile.common | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/Makefile.common b/Makefile.common index 97eb0b9..590dd3e 100644 --- a/Makefile.common +++ b/Makefile.common @@ -1,3 +1,5 @@ +For more information on using the Fedora source code repositories, +please visit http://fedoraproject.org/wiki/UsingCvs ######################################################################### # Makefile.common # @@ -158,17 +160,14 @@ SHELL =${FDPBIN}/fdpsh ######################################################################### ######################################################################### -# Obtain the document version and release info for building RPM's -VERSION:=$(shell version doc) -RELEASE:=$(shell version rpm) -######################################################################### - -######################################################################### +ifndef RPMFLAGS RPMFLAGS=--define "docbase $(DOCBASE)" \ --define "_topdir $(PWD)/rpm" \ + --define "_srpmdir ${PWD}" \ + --define "_rpmdir ${PWD}" \ + --define "_sourcedir ${PWD}" \ --define "fdpdir /usr/share/fedora/doc" - -SPECFILE=fedora-doc-$(DOCBASE).spec +endif ifeq "${RPMDEBUG}" "1" RPMDFLAG = -vv @@ -176,6 +175,28 @@ endif ######################################################################### ######################################################################### +# Obtain the document version and release info for building RPM's +SPECFILE=$(firstword $(wildcard *.spec)) + +# the name of the package +ifndef NAME +NAME := $(shell rpm ${RPMFLAGS} ${DISTRPMFLAGS} -q --qf "%{NAME}\n" \ + --specfile ${SPECFILE} | head -1) +endif +# the version of the package +ifndef VERSION +VERSION := $(shell rpm ${RPMFLAGS} ${DISTRPMFLAGS} -q --qf "%{VERSION}\n" \ + --specfile ${SPECFILE} | head -1) +endif +# the release of the package +ifndef RELEASE +RELEASE := $(shell rpm ${RPMFLAGS} ${DISTRPMFLAGS} -q --qf "%{RELEASE}\n" \ + --specfile ${SPECFILE} | head -1) +endif + +######################################################################### + +######################################################################### # Set a provisional ${LANG} value. We'll dynamically change this as # needed. The "${PRI_LANG}" value is used because that is the original # language the doc. |