From 2a67684a8548ea607e9330de1247a96fcb1521d8 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Wed, 8 Mar 2006 21:45:27 +0000 Subject: [PATCH] - per Thierry's suggestions, separate out PLC-specific pieces into separate site-specific Makefile plc.mk. --- plc.mk | 99 +++++++++++++++------------------------------------------- 1 file changed, 26 insertions(+), 73 deletions(-) diff --git a/plc.mk b/plc.mk index 5d449c3c..bdfa72ba 100644 --- a/plc.mk +++ b/plc.mk @@ -1,45 +1,35 @@ # -# PlanetLab Central local RPM generation +# PlanetLab Central components list # # Mark Huang # Copyright (C) 2003-2005 The Trustees of Princeton University # -# $Id: plc.mk,v 1.7 2005/12/08 22:45:29 mlhuang Exp $ +# $Id: plc.mk,v 1.8 2005/12/22 22:29:37 mlhuang Exp $ # -# Default target -all: - # -# CVSROOT: CVSROOT to use -# INITIAL: CVS tag to use for Source0 tarball -# TAG: CVS tag to patch to (if not HEAD) -# MODULE: CVS module name to use (if not HEAD) -# SPEC: RPM spec file template -# RPMBUILD: If not rpmbuild -# RPMFLAGS: Miscellaneous RPM flags -# CVS_RSH: If not ssh -# ALL: default targets +# Required: +# +# CVSROOT or package-CVSROOT: CVSROOT to use +# TAG or package-TAG: CVS tag to use +# package-MODULE: CVS module name to use +# package-SPEC: RPM spec file template +# +# Optional: # -# If INITIAL is different than TAG, PatchSets will be generated -# automatically with cvsps(1) to bring Source0 up to TAG. If TAG is -# HEAD, a %{date} variable will be defined in the generated spec -# file. If a Patch: tag in the spec file matches a generated PatchSet -# number, the name of the patch will be as specified. Otherwise, the -# name of the patch will be the PatchSet number. %patch tags in the -# spec file are generated automatically. +# package-RPMFLAGS: Miscellaneous RPM flags +# package-RPMBUILD: If not rpmbuild +# package-CVS_RSH: If not ssh +# +# Add to ALL if you want the package built as part of the default set. # +# # Default values -INITIAL := HEAD -TAG := HEAD -CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs +# -# By default, the naming convention for built RPMS is -# --.planetlab..rpm -# Set PLDISTRO on the command line to differentiate between downstream -# variants. -PLDISTRO := planetlab +CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs +TAG := HEAD # # plc @@ -54,7 +44,6 @@ ALL += plc # Proper: Privileged Operations Service # -proper-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs proper-MODULE := proper proper-SPEC := proper/proper.spec ALL += proper @@ -62,7 +51,6 @@ ALL += proper # # util-python # -util-python-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs util-python-MODULE := util-python util-python-SPEC := util-python/util-python.spec ALL += util-python @@ -75,7 +63,6 @@ util-vserver: util-python # ulogd # -ulogd-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs ulogd-MODULE := ulogd ulogd-SPEC := ulogd/ulogd.spec ALL += ulogd @@ -86,7 +73,6 @@ ulogd: proper # netflow # -netflow-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs netflow-MODULE := netflow netflow-SPEC := netflow/netflow.spec ALL += netflow @@ -95,7 +81,6 @@ ALL += netflow # Request Tracker 3 # -rt3-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs rt3-MODULE := rt3 rt3-SPEC := rt3/etc/rt.spec ALL += rt3 @@ -104,7 +89,6 @@ ALL += rt3 # Mail::SpamAssassin # -spamassassin-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs spamassassin-MODULE := spamassassin spamassassin-SPEC := spamassassin/spamassassin.spec ALL += spamassassin @@ -113,7 +97,6 @@ ALL += spamassassin # TWiki # -twiki-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs twiki-MODULE := twiki twiki-SPEC := twiki/TWiki.spec ALL += twiki @@ -122,20 +105,13 @@ ALL += twiki # plcapilib # -plcapilib-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs plcapilib-MODULE := plcmdline plcapilib-SPEC := plcmdline/plcapilib.spec ALL += plcapilib -ifeq ($(findstring $(package),$(ALL)),) - -# Build all packages -all: $(ALL) - install -D -m 644 groups/stock_fc2_groups.xml RPMS/yumgroups.xml - -# Recurse -$(ALL): - $(MAKE) -f plc.mk package=$@ +# +# Installation rules +# # Put packages in boot repository ARCHIVE := /var/www/html/archive @@ -154,38 +130,15 @@ ifneq ($(BUILDS),) # Remove old runs cd $(ARCHIVE) && ls -t | sed -n $(BUILDS)~1p | xargs rm -rf endif + install -D -m 644 groups/stock_fc2_groups.xml RPMS/yumgroups.xml # Populate repository mkdir -p $(ARCHIVE)/$(BASE) - rsync --delete --links --perms --times --group \ - $(sort $(subst -debuginfo,,$(wildcard RPMS/yumgroups.xml RPMS/*/*))) $(ARCHIVE)/$(BASE)/ + rsync --delete --links --perms --times --group --exclude "*-debuginfo-*.rpm" \ + RPMS $(ARCHIVE)/$(BASE)/ yum-arch $(ARCHIVE)/$(BASE) >/dev/null ifeq ($(TAG),HEAD) ln -nsf $(ARCHIVE)/$(BASE) $(REPOS) endif endif -# Remove files generated by this package -$(foreach package,$(ALL),$(package)-clean): %-clean: - $(MAKE) -f plc.mk package=$* clean - -# Remove all generated files -clean: - rm -rf BUILD RPMS SOURCES SPECS SRPMS .rpmmacros .cvsps - -.PHONY: all $(ALL) $(foreach package,$(ALL),$(package)-clean) clean - -else - -# Define variables for Makerules -CVSROOT := $(if $($(package)-CVSROOT),$($(package)-CVSROOT),$(CVSROOT)) -INITIAL := $(if $($(package)-INITIAL),$($(package)-INITIAL),$(INITIAL)) -TAG := $(if $($(package)-TAG),$($(package)-TAG),$(TAG)) -MODULE := $($(package)-MODULE) -SPEC := $($(package)-SPEC) -RPMBUILD := $(if $($(package)-RPMBUILD),$($(package)-RPMBUILD),rpmbuild) -RPMFLAGS := $($(package)-RPMFLAGS) -CVS_RSH := $(if $($(package)-CVS_RSH),$($(package)-CVS_RSH),ssh) - -include Makerules - -endif +.PHONY: install -- 2.47.0