-myplc-devel-RPMBUILD := sudo sh .rpmbuild.sh
-ALL += myplc-devel
-
-#
-# libnl
-#
-
-libnl-MODULE := libnl
-libnl-SPEC := libnl/libnl.spec
-ALL += libnl
-
-util-vserver: libnl
-
-#
-# Installation rules
-#
-
-# Upload packages to boot server
-SERVERA := build@boot1.planet-lab.org
-SERVERB := build@boot2.planet-lab.org
-ARCHIVE := /plc/data/var/www/html/install-rpms/archive
-
-# Put nightly alpha builds in a subdirectory
-ifeq ($(TAG),HEAD)
-ARCHIVE := $(ARCHIVE)/planetlab-alpha
-REPOS := /plc/data/var/www/html/install-rpms/planetlab-alpha
-endif
-
-RPMS/yumgroups.xml:
- install -D -m 644 groups/v4_yumgroups.xml RPMS/yumgroups.xml
-
-install:
-ifeq ($(BASE),)
- @echo make install is only meant to be called from ./build.sh
-else
-ifneq ($(wildcard /etc/planetlab/secring.gpg),)
- # Sign all RPMS. setsid detaches rpm from the terminal,
- # allowing the (hopefully blank) GPG password to be entered
- # from stdin instead of /dev/tty. Obviously, the build server
- # should be secure.
- echo | setsid rpm \
- --define "_signature gpg" \
- --define "_gpg_path /etc/planetlab" \
- --define "_gpg_name PlanetLab <info@planet-lab.org>" \
- --resign RPMS/*/*.rpm
-endif
-ifneq ($(BUILDS),)
- # Remove old runs
- echo "cd $(ARCHIVE) && ls -t | sed -n $(BUILDS)~1p | xargs rm -rf" | ssh $(SERVERA) /bin/bash -s
- echo "cd $(ARCHIVE) && ls -t | sed -n $(BUILDS)~1p | xargs rm -rf" | ssh $(SERVERB) /bin/bash -s
-endif
- # Create package manifest
- sh ./packages.sh -b "http://build.planet-lab.org/$(subst $(HOME)/,,$(shell pwd))/RPMS" RPMS > packages.xml
- # Update yum metadata
- yum-arch RPMS >/dev/null
- createrepo -g yumgroups.xml RPMS >/dev/null
- # Populate repository
- rsync \
- --exclude '*-debuginfo-*' \
- --recursive --links --perms --times --group --compress --rsh=ssh \
- RPMS/ $(SERVERA):$(ARCHIVE)/$(BASE)
- rsync \
- --exclude '*-debuginfo-*' \
- --recursive --links --perms --times --group --compress --rsh=ssh \
- RPMS/ $(SERVERB):$(ARCHIVE)/$(BASE)
-ifeq ($(TAG),HEAD)
- # Update nightly alpha symlink if it does not exist or is broken, or it is Monday
- if ! ssh $(SERVERA) "[ -e $(REPOS) ] && exit 0 || exit 1" || [ "$(shell date +%A)" = "Monday" ] ; then \
- ssh $(SERVERA) ln -nsf archive/$(BASE) $(REPOS) ; \
- fi
- # Update nightly alpha symlink if it does not exist or is broken, or it is Monday
- if ! ssh $(SERVERB) "[ -e $(REPOS) ] && exit 0 || exit 1" || [ "$(shell date +%A)" = "Monday" ] ; then \
- ssh $(SERVERB) ln -nsf archive/$(BASE) $(REPOS) ; \
- fi
-
-endif
-endif
-
-.PHONY: install
+myplc-native-RPMBUILD := sudo bash ./rpmbuild.sh
+# Thierry : don't depend on anything at build-time
+#myplc-native-DEPEND-PACKAGES :=
+# Thierry : dunno about this one, let's stay safe
+myplc-native-DEPEND-FILES := myplc-release
+ALL += myplc-native
+
+## #
+## # myplc : old-fashioned, chroot-based packaging
+## #
+## myplc-MODULES := MyPLC build
+## myplc-SPEC := myplc.spec
+## # Package must be built as root
+## myplc-RPMBUILD := sudo bash ./rpmbuild.sh
+## # myplc may require all packages
+## myplc-DEPEND-PACKAGES := $(IN_MYPLC)
+## myplc-DEPEND-FILES := RPMS/yumgroups.xml myplc-release
+## myplc-RPMDATE := yes
+## ALL += myplc
+
+# myplc-docs only contains docs for PLCAPI and NMAPI, but
+# we still need to pull MyPLC, as it is where the specfile lies,
+# together with the utility script docbook2drupal.sh
+myplc-docs-MODULES := MyPLC PLCAPI NodeManager
+myplc-docs-SPEC := myplc-docs.spec
+ALL += myplc-docs