#
-# PlanetLab Central local RPM generation
+# PlanetLab Central components list
#
# Mark Huang <mlhuang@cs.princeton.edu>
# 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
-# <name>-<version>-<release>.planetlab.<arch>.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
# Proper: Privileged Operations Service
#
-proper-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
proper-MODULE := proper
proper-SPEC := proper/proper.spec
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
# ulogd
#
-ulogd-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
ulogd-MODULE := ulogd
ulogd-SPEC := ulogd/ulogd.spec
ALL += ulogd
# netflow
#
-netflow-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
netflow-MODULE := netflow
netflow-SPEC := netflow/netflow.spec
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
# Mail::SpamAssassin
#
-spamassassin-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
spamassassin-MODULE := spamassassin
spamassassin-SPEC := spamassassin/spamassassin.spec
ALL += spamassassin
# TWiki
#
-twiki-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
twiki-MODULE := twiki
twiki-SPEC := twiki/TWiki.spec
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
# 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