-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 SRPMS/*.rpm
-endif
-ifneq ($(BUILDS),)
- # Remove old runs
- echo "cd $(ARCHIVE) && ls -t | sed -n $(BUILDS)~1p | xargs rm -rf" | ssh $(SERVER) /bin/bash -s
-endif
- # Create package manifest
- sh ./packages.sh -b "http://build.planet-lab.org/$(subst $(HOME)/,,$(shell pwd))/SRPMS" SRPMS > SRPMS/packages.xml
- # Populate repository
- ssh $(SERVER) mkdir -p $(ARCHIVE)/$(BASE)/RPMS $(ARCHIVE)/$(BASE)/SRPMS
- rsync --delete --links --perms --times --group --compress --rsh=ssh \
- $(sort $(subst -debuginfo,,$(wildcard RPMS/yumgroups.xml RPMS/*/*.rpm))) $(SERVER):$(ARCHIVE)/$(BASE)/RPMS/
- ssh $(SERVER) yum-arch $(ARCHIVE)/$(BASE)/RPMS >/dev/null
- ssh $(SERVER) createrepo -g yumgroups.xml $(ARCHIVE)/$(BASE)/RPMS >/dev/null
- rsync --delete --links --perms --times --group --compress --rsh=ssh \
- $(wildcard SRPMS/*.rpm) $(SERVER):$(ARCHIVE)/$(BASE)/SRPMS/
- ssh $(SERVER) yum-arch $(ARCHIVE)/$(BASE)/SRPMS >/dev/null
- ssh $(SERVER) createrepo $(ARCHIVE)/$(BASE)/SRPMS >/dev/null
-ifeq ($(TAG),HEAD)
- # Update nightly alpha symlink if it does not exist or is broken, or it is Monday
- if ! ssh $(SERVER) "[ -e $(REPOS) ] && exit 0 || exit 1" || [ "$(shell date +%A)" = "Monday" ] ; then \
- ssh $(SERVER) ln -nsf $(ARCHIVE)/$(BASE)/RPMS/ $(REPOS) ; \
- fi
-endif
-endif