docs-common Makefile,NONE,1.1
Paul W. Frields (pfrields)
fedora-docs-commits at redhat.com
Wed Oct 12 00:09:43 UTC 2005
Author: pfrields
Update of /cvs/docs/docs-common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12224
Added Files:
Makefile
Log Message:
Add packaging necessities for fedora-doc-common
--- NEW FILE Makefile ---
###############################################################################
# Makefile for fedora-doc-common packaging
# Created by: Paul W. Frields <stickster at 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 at 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}
More information about the Fedora-docs-commits
mailing list