aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Aspinall1998-09-24 17:35:24 +0000
committerDavid Aspinall1998-09-24 17:35:24 +0000
commitc271973d25e88736761b708183ac9ee8445ddaa5 (patch)
treefe9e7a4fb86d635c397668313142d2a3f88efa6e
parent1914d97662e3cb51f50f935da287f640f240dc7c (diff)
Added RPM targets
-rw-r--r--Makefile.devel72
1 files changed, 60 insertions, 12 deletions
diff --git a/Makefile.devel b/Makefile.devel
index 5f1e8370..9b5dbb8e 100644
--- a/Makefile.devel
+++ b/Makefile.devel
@@ -11,7 +11,10 @@
## make ChangeLog - make ChangeLog from CVS sources (uses emacs)
## make tag - tag the CVS sources with CVS_RELEASE_TAG
## make dist - make a distribution from sources with above tag
+## make rpm - make RPM packages based on etc/ProofGeneral.spec
+##
## make release - make tag, dist, and install it in RELEASEDIR.
+## make releaseall - make release and rpmrelease.
##
## $Id$
##
@@ -26,14 +29,15 @@ CVS_RELEASE_TAG=2-0-pre$(shell date "+%y%m%d")
NAME = ProofGeneral
RELEASENAME = ProofGeneral-2.0
-# Where to install a new distribution
-RELEASEDIR = /home/proofgen/www
+# Where to release (i.e. copy) a new distribution to
+RELEASEDIR = /home/proofgen/www/dist
-# Remote commands to use CVS in server mode and install files.
-# With these settings the install can be done remotely.
CVSNAME = ProofGeneral
+#CVSROOT = /home/proofgen/src
+
+# Remote commands to use CVS in server mode and install files.
+# With these settings the build can be done remotely.
CVSROOT = :ext:$(USER)@ssh.dcs.ed.ac.uk:/home/proofgen/src
-REMOTE=ssh ssh.dcs.ed.ac.uk
CVS_RSH=ssh
@@ -43,14 +47,24 @@ EMACS=xemacs
# Files not to include the distribution area or tarball
-NONDISTFILES=todo html Makefile doc/Makefile
+NONDISTFILES=todo html etc Makefile doc/Makefile
# Files not to include in the distribution tarball
IGNOREDFILES=doc/ProofGeneral.dvi
-# Where to build a distribution
+# Temporary directory to to build a distribution in
DISTBUILDIR = /tmp/ProofGeneralRelease
+# Temporary RPM topdir for building packages as non-root user.
+RPMTOPDIR=/tmp/ProofGeneral-rpm
+RPMRC=$(RPMTOPDIR)/rpmrc
+RPM=rpm --rcfile $(RPMRC)
+
+RELEASENAMETAR = $(RELEASENAME).tar
+RELEASENAMETARGZ = $(RELEASENAMETAR).gz
+
+
+
# Files not kept under cvs to clean away.
FILES_NONCVS = ChangeLog
@@ -156,8 +170,8 @@ dist:
@echo " Making compressed tar file..."
@echo "*************************************************"
(cd $(DISTBUILDIR); for f in $(IGNOREDFILES); do echo $$f >> ignoredfiles; done)
- tar -cvhf $(DISTBUILDIR)/$(RELEASENAME).tar -C $(DISTBUILDIR) $(RELEASENAME) -X $(DISTBUILDIR)/ignoredfiles
- gzip -9 $(DISTBUILDIR)/$(RELEASENAME).tar
+ tar -cvhf $(DISTBUILDIR)/$(RELEASENAMETAR) -C $(DISTBUILDIR) $(RELEASENAME) -X $(DISTBUILDIR)/ignoredfiles
+ gzip -9 $(DISTBUILDIR)/$(RELEASENAMETAR)
@echo "*************************************************"
@echo " Finished making dist."
@echo "*************************************************"
@@ -174,9 +188,43 @@ dist:
## is made.
##
release: distclean tag dist
- $(REMOTE) mkdir -p $(RELEASEDIR)
- $(REMOTE) cp -pfr $(DISTBUILDIR)/* $(RELEASEDIR)
- $(REMOTE) (cd $(RELEASEDIR); ln -sf $(RELEASENAME) $(NAME))
+ mkdir -p $(RELEASEDIR)
+ cp -pfr $(DISTBUILDIR)/* $(RELEASEDIR)
+ (cd $(RELEASEDIR); ln -sf $(RELEASENAME) $(NAME))
@echo "*************************************************"
@echo " Finished installing dist."
@echo "*************************************************"
+
+
+############################################################
+##
+## rpm:
+## Build an RPM package from the recently made distribution
+## $(DISTBUILDIR)/$(RELEASENAMETAR).gz, using the spec and
+## patch file in ./etc
+##
+##
+rpm:
+ rm -rf $(RPMTOPDIR)
+ mkdir -p $(RPMTOPDIR) $(RPMTOPDIR)/BUILD $(RPMTOPDIR)/SOURCES $(RPMTOPDIR)/SRPMS $(RPMTOPDIR)/RPMS $(RPMTOPDIR)/RPMS/noarch
+ echo "topdir: $(RPMTOPDIR)" > $(RPMRC)
+ cp -p etc/ProofGeneral.patch $(RPMTOPDIR)/SOURCES
+ cp -p $(DISTBUILDIR)/$(RELEASENAMETARGZ) $(RPMTOPDIR)/SOURCES
+ $(RPM) -ba etc/ProofGeneral.spec
+
+
+############################################################
+##
+## rpmrelease:
+## Build and install RPM packages into RELEASEDIR.
+##
+rpmrelease: rpm
+ cp -pf $(RPMTOPDIR)/SRPMS/* $(RPMTOPDIR)/RPMS/noarch/* $(RELEASEDIR)
+
+
+############################################################
+##
+## releaseall:
+## Do everything!
+##
+releaseall: release rpmrelease