summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorPaul W. Frields <stickster@gmail.com>2005-10-12 00:09:37 +0000
committerPaul W. Frields <stickster@gmail.com>2005-10-12 00:09:37 +0000
commit00c1102821bbc03fcf2cc3a7cb09dae8bc4e5e0b (patch)
treee7189e8e887260c800f5eb58dec70d198dc7f810 /Makefile
parentb6266d3f82d6af1c9980bfa7b3769ebf203c598e (diff)
downloadfedora-doc-utils-00c1102821bbc03fcf2cc3a7cb09dae8bc4e5e0b.zip
fedora-doc-utils-00c1102821bbc03fcf2cc3a7cb09dae8bc4e5e0b.tar.gz
fedora-doc-utils-00c1102821bbc03fcf2cc3a7cb09dae8bc4e5e0b.tar.xz
Add packaging necessities for fedora-doc-common
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile66
1 files changed, 66 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..a2da1ca
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,66 @@
+###############################################################################
+# Makefile for fedora-doc-common packaging
+# Created by: Paul W. Frields <stickster@gmail.com>
+# License: GPL
+# Copyright 2005 Paul W. Frields
+###############################################################################
+
+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
+DOCSPEC = $(PWD)/SPECS/$(DOCBASE).spec
+DOCSRCTAR = $(PWD)/SOURCES/$(DOCBASE)-$(RELEASE).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)"
+######################################################
+
+
+clean:
+ rm -rf $(DOCBASE)*.rpm
+
+update: clean
+ cvs update
+
+rpm: update
+#
+# Make RPM-compliant tarball of source XML and other stuff
+ mkdir $(DOCBASE)-$(RELEASE)
+ find . -maxdepth 1 -type d \( \
+ -name 'common' -o \
+ -name 'css' -o \
+ -name 'stylesheet-images' \) | xargs -i \
+ find {} -maxdepth 1 -type f ! \( \
+ -name '.*' -o -name '*~' -o \
+ -name '*.svg' -o -name '*.eps' \) | \
+ cpio -pamdv $(DOCBASE)-$(RELEASE)
+#
+# Make RPM build tree; don't rely on local user's setup
+ mkdir -p {BUILD,RPMS/noarch,SOURCES,SPECS,SRPMS}
+ tar -zcvf $(DOCSRCTAR) $(DOCBASE)-$(RELEASE)
+ cp $(SPECIN) $(DOCSPEC)
+ rm -rf $(DOCBASE)-$(RELEASE)/
+#
+# 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)
+#
+# Do the build...
+#
+ rpmbuild -bb $(RPMFLAGS) $(DOCSPEC)
+ mv RPMS/noarch/*.rpm .
+ rpmbuild --clean --rmsource $(RPMFLAGS) $(DOCSPEC)
+ rm -rf {BUILD,RPMS,SOURCES,SPECS,SRPMS}