# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2003-2006 The Trustees of Princeton University
#
-# $Id: onelab.mk,v 1.7 2007/02/09 01:16:19 thierry Exp $
+# $Id$
#
#
# Add to ALL if you want the package built as part of the default set.
#
+####
+# we do not use TAG directly anymore, and let it to HEAD
+# this because we want the rpm's releases to reflect the date even when a tag is used
+# our build script defines COMMON_TAG that the various components are free to use or not
+
+# COMMON_TAG set from the build script
+
+TAGSFILE = onelab-tags.mk
+
+include $(TAGSFILE)
+
#
# Default values
#
-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
+# it's useless to set this here because it's overriden on the command line by nightly-build.sh
TAG := HEAD
# Check if a tag has been checked out
#
madwifi-ng-MODULE := madwifi-ng
-madwifi-ng-SPEC := madwifi-ng/madwifi.spec
+madwifi-ng-SPEC := madwifi.spec
ALL += madwifi-ng
# Build kernel first so we can bootstrap off of its build
wireless-tools-MODULE = wireless-tools
wireless-tools-SPEC := wireless-tools.spec
-wireless-tools-SVNPATH := file:///svn/wireless-tools/29pre10
ALL += wireless-tools
#
#
PLCAPI-MODULE := new_plc_api
-PLCAPI-SPEC := new_plc_api/PLCAPI.spec
+PLCAPI-SPEC := PLCAPI.spec
ALL += PLCAPI
#
#
bootmanager-MODULE := bootmanager build
-bootmanager-SPEC := bootmanager/bootmanager.spec
+bootmanager-SPEC := bootmanager.spec
bootmanager-RPMBUILD := sudo rpmbuild
ALL += bootmanager
#
bootcd-MODULE := bootcd build bootmanager
-bootcd-SPEC := bootcd/bootcd.spec
+bootcd-SPEC := bootcd.spec
bootcd-RPMBUILD := sudo rpmbuild
ALL += bootcd
# bootcd requires current packages
bootcd: $(filter-out bootcd,$(ALL))
+#
+# plcwww
+#
+
+plcwww-MODULE := new_plc_www
+plcwww-SPEC := plcwww.spec
+ALL += plcwww
+
#
# MyPLC
#
-myplc-MODULE := build myplc new_plc_www plc/scripts
-myplc-SPEC := myplc/myplc.spec
+myplc-MODULE := build myplc plc/scripts
+myplc-SPEC := myplc.spec
# Package must be built as root
myplc-RPMBUILD := sudo rpmbuild
ALL += myplc
# ...and the yum manifest
myplc: RPMS/yumgroups.xml
+# we also ship various information on the build in /etc/myplc-release
+# we cannot store this under SOURCES/myplc
+# otherwise the code extraction phase does not take place
+# because it depends on $SOURCES/$(package) as per Rules.mk
+myplc: SOURCES/myplc-release
+
+SOURCES/myplc-release:
+ @echo 'Creating myplc-release'
+ rm -f $@
+ (echo -n 'Build date: ' ; date '+%Y.%m.%d') >> $@
+ (echo -n 'Build hostname: ' ; hostname) >> $@
+ (echo -n 'Build location: ' ; pwd) >> $@
+ echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx tags file contents" >> $@
+ cat $(TAGSFILE) >> $@
+
#
# MyPLC development environment
#