summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul W. Frields <stickster@gmail.com>2006-02-04 02:49:33 +0000
committerPaul W. Frields <stickster@gmail.com>2006-02-04 02:49:33 +0000
commit086ab0600807bcc419f37dbf9698c87b1cd6bb6a (patch)
treefe2eca7a46600b1bd2e9c11c2f21967213d56f03
parent1c5259cdc2b52183c8e1cfd1f77d0961e6418baf (diff)
downloadfedora-doc-utils-086ab0600807bcc419f37dbf9698c87b1cd6bb6a.zip
fedora-doc-utils-086ab0600807bcc419f37dbf9698c87b1cd6bb6a.tar.gz
fedora-doc-utils-086ab0600807bcc419f37dbf9698c87b1cd6bb6a.tar.xz
Build packages correctly for FE standards
-rw-r--r--Makefile24
1 files changed, 11 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index b520cde..9debb31 100644
--- a/Makefile
+++ b/Makefile
@@ -9,20 +9,18 @@ DOCBASE = fedora-doc-common
######################################################
# 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 @@ update: clean
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 @@ rpm: update
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@redhat.com> - $(VERSION)-$(RELEASE)\n- Update to $(RELEASE)\n/' \
- $(SPECIN) > $(DOCSPEC)
+# sed 's/\(%changelog\)/\1\n* $(NOW) Fedora Docs Project <fedora-docs-list@redhat.com> - $(VERSION)-$(RELEASE)\n- Update to $(RELEASE)\n/' \
+# $(SPECIN) > $(DOCSPEC)
#
# Do the build...
#