typo in BootstrapFS dependency
[build.git] / plc.mk
diff --git a/plc.mk b/plc.mk
index 4bf9eed..bc944db 100644 (file)
--- a/plc.mk
+++ b/plc.mk
@@ -1,38 +1,35 @@
 #
-# 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.1 2005/05/04 21:47:56 mlhuang Exp $
+# $Id: plc.mk,v 1.10 2006/03/10 21:44:07 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
-# 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
+TAG := HEAD
 
 #
 # plc
@@ -47,16 +44,25 @@ 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
 
+#
+# util-python
+#
+util-python-MODULE := util-python
+util-python-SPEC := util-python/util-python.spec
+ALL += util-python
+
+# proper and util-vserver both use scripts in util-python for building
+proper: util-python
+util-vserver: util-python
+
 #
 # ulogd
 #
 
-ulogd-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
 ulogd-MODULE := ulogd
 ulogd-SPEC := ulogd/ulogd.spec
 ALL += ulogd
@@ -67,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
@@ -76,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
@@ -85,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
@@ -94,20 +97,21 @@ ALL += spamassassin
 # TWiki
 #
 
-twiki-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
 twiki-MODULE := twiki
 twiki-SPEC := twiki/TWiki.spec
 ALL += twiki
 
-ifeq ($(findstring $(package),$(ALL)),)
+#
+# plcapilib
+#
 
-# Build all packages
-all: $(ALL)
-       cvs -d $(CVSROOT) checkout -p alpina/groups/stock_fc2_groups.xml > RPMS/yumgroups.xml
+plcapilib-MODULE := plcmdline
+plcapilib-SPEC := plcmdline/plcapilib.spec
+ALL += plcapilib
 
-# Recurse
-$(ALL):
-       $(MAKE) -f plc.mk package=$@
+#
+# Installation rules
+# 
 
 # Put packages in boot repository
 ARCHIVE := /var/www/html/archive
@@ -126,37 +130,16 @@ 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 --links --perms --times --group \
+       rsync --delete --links --perms --times --group \
            $(sort $(subst -debuginfo,,$(wildcard RPMS/yumgroups.xml RPMS/*/*))) $(ARCHIVE)/$(BASE)/
        yum-arch $(ARCHIVE)/$(BASE) >/dev/null
+       createrepo $(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)
-RPMFLAGS := $($(package)-RPMFLAGS)
-CVS_RSH := $(if $($(package)-CVS_RSH),$($(package)-CVS_RSH),ssh)
-
-include Makerules
-
-endif
+.PHONY: install