DEVKIT = doctools 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 mkdir -p $(FILES)/usr $(MAKE) -C meta/doctools install install -m 644 ChangeLog $(FILES) -rm -f $(FILES)/lib/*.la -rm -f $(FILES)/lib/pkgconfig/* -rm -f $(FILES)/bin/*-config -rm -rf $(FILES)/share/doc/* -rm -rf $(FILES)/share/man/* ChangeLog: darcs changes --summary > $@ packages: $(PACKAGE_TARGETS) tarball: tar cfz ../$(PACKAGE)-$(VERSION)-$(ARCH).tar.gz --owner=root --group=root $(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