docs-common Makefile,1.5,1.6

Paul W. Frields (pfrields) fedora-docs-commits at redhat.com
Sat Feb 4 02:49:41 UTC 2006


Author: pfrields

Update of /cvs/docs/docs-common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11027

Modified Files:
	Makefile 
Log Message:
Build packages correctly for FE standards


Index: Makefile
===================================================================
RCS file: /cvs/docs/docs-common/Makefile,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Makefile	30 Dec 2005 16:26:27 -0000	1.5
+++ Makefile	4 Feb 2006 02:49:33 -0000	1.6
@@ -9,20 +9,18 @@
 
 ######################################################
 # Some packaging specific vars
-VERSION		= 0.1
-RELEASE		= cvs$(shell date +"%Y%m%d")
 DATE		= $(shell date +"%Y-%m-%d")
 NOW 		= $(shell date +"%a %b %e %Y")
 SPECIN		= ../docs-common/packaging/$(DOCBASE).spec
+VERSION		= $(shell rpm -q --specfile --queryformat '%{version}\n' $(SPECIN))
+RELEASE		= $(shell rpm -q --specfile --queryformat '%{release}\n' $(SPECIN))
 DOCSPEC 	= $(shell rpm ${RPMFLAGS} --eval '%{_specdir}')/$(DOCBASE).spec
-DOCSRCTAR 	= $(shell rpm ${RPMFLAGS} --eval '%{_sourcedir}')/$(DOCBASE)-$(RELEASE).src.tar.gz
+DOCSRCTAR 	= $(shell rpm ${RPMFLAGS} --eval '%{_sourcedir}')/$(DOCBASE)-$(VERSION).src.tar.gz
 TITLE		= Fedora Documentation Project Shared Files
 ######################################################
 # Some RPM flags...
 ######################################################
 RPMFLAGS 	= 	--define "docbase $(DOCBASE)" \
-			--define "version $(VERSION)" \
-			--define "release $(RELEASE)" \
 			--define "_topdir $(PWD)/rpmbuild"
 
 RPM		= rpm ${RPMFLAGS}
@@ -39,7 +37,7 @@
 rpm: update
 #
 # Make RPM-compliant tarball of source XML and other stuff
-	mkdir $(DOCBASE)-$(RELEASE)
+	mkdir $(DOCBASE)-$(VERSION)
 	find . -maxdepth 1 -type d \( \
 		-name 'bin' -o \
 		-name 'common' -o \
@@ -51,21 +49,21 @@
 		find {} -maxdepth 1 -type f ! \( \
 		-name '.*' -o -name '*~' -o \
 		-name '*.svg' -o -name '*.eps' \) | \
-		cpio -pamdv $(DOCBASE)-$(RELEASE)
+		cpio -pamdv $(DOCBASE)-$(VERSION)
 # include Makefile.common for use in offline FDP doc building
-	cp Makefile.common $(DOCBASE)-$(RELEASE)
+	cp Makefile.common $(DOCBASE)-$(VERSION)
 #
 # Make RPM build tree; don't rely on local user's setup
 	mkdir -p rpmbuild/{BUILD,RPMS/noarch,SOURCES,SPECS,SRPMS}
-	tar -zcvf $(DOCSRCTAR) $(DOCBASE)-$(RELEASE)
+	tar -zcvf $(DOCSRCTAR) $(DOCBASE)-$(VERSION)
 	cp $(SPECIN) $(DOCSPEC)
-	rm -rf $(DOCBASE)-$(RELEASE)/
-#
+	rm -rf $(DOCBASE)-$(VERSION)/
+#FORGET THIS CRAP... replace with 'make clog' shortly
 # Make rpmlint happy with a changelog entry
 # FIXME: Maybe more magic would make this stickier; pity
 #        I'm no magician...
-	sed 's/\(%changelog\)/\1\n* $(NOW) Fedora Docs Project <fedora-docs-list at redhat.com> - $(VERSION)-$(RELEASE)\n- Update to $(RELEASE)\n/' \
-		$(SPECIN) > $(DOCSPEC)
+#	sed 's/\(%changelog\)/\1\n* $(NOW) Fedora Docs Project <fedora-docs-list at redhat.com> - $(VERSION)-$(RELEASE)\n- Update to $(RELEASE)\n/' \
+#		$(SPECIN) > $(DOCSPEC)
 #
 # Do the build...
 #




More information about the Fedora-docs-commits mailing list