DEVKIT = perl PACKAGE = scratchbox-devkit-$(DEVKIT) FILES = /scratchbox/devkits/$(DEVKIT)/ VERSION ?= $(shell head -n1 /scratchbox/etc/scratchbox-version) ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH) PACKAGE_TARGETS = tarball deb .PHONY: build ChangeLog packages $(PACKAGE_TARGETS) clean build: ChangeLog $(MAKE) -C meta/perl-devkit install install -m 644 ChangeLog $(FILES) ChangeLog: darcs changes --summary > $@ packages: $(PACKAGE_TARGETS) tarball: tar --owner root --group root -czf ../$(PACKAGE)-$(VERSION)-$(ARCH).tar.gz $(FILES) deb: fakeroot debian/rules clean fakeroot debian/rules binary clean: find `find . -mindepth 1 -maxdepth 1 -not -name _darcs` -maxdepth 1 -mindepth 1 -type d -exec make -C {} clean \; fakeroot debian/rules clean