#!/usr/bin/make -f INSTALL = install INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644 INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755 INSTALL_SCRIPT = $(INSTALL) -p -o root -g root -m 755 INSTALL_DIR = $(INSTALL) -p -d -o root -g root -m 755 BUILD_DATE = $(shell date --date=@$(SOURCE_DATE_EPOCH) '+%Y-%m-%dT%H:%M:%S%z') build: # nothing to do build-arch: # nothing to do build-indep: # nothing to do clean: test -d debian -rm -rf debian/tmp debian/files checkroot: test "0" = "`id -u`" binary-indep: checkroot build test -d debian $(INSTALL_DIR) debian/tmp/DEBIAN \ debian/tmp/usr/bin debian/tmp/usr/share/man/man1 \ debian/tmp/usr/share/doc/swaks/examples $(INSTALL_SCRIPT) swaks debian/tmp/usr/bin/ pod2man --center=SWAKS --section=1 \ swaks debian/tmp/usr/share/man/man1/swaks.1 $(INSTALL_FILE) debian/changelog \ debian/tmp/usr/share/doc/swaks/changelog.Debian $(INSTALL_FILE) doc/Changes.txt \ debian/tmp/usr/share/doc/swaks/changelog $(INSTALL_FILE) README.txt \ debian/tmp/usr/share/doc/swaks/ $(INSTALL_FILE) debian/copyright \ debian/tmp/usr/share/doc/swaks/ $(INSTALL_FILE) doc/recipes.txt debian/tmp/usr/share/doc/swaks/examples/ find debian/tmp/usr/share/man/man1 debian/tmp/usr/share/doc/swaks/ \ -type f -size +4096c -exec gzip -v9n {} + (cd debian/tmp; find -name DEBIAN -prune -o \ \( -type f -printf '%P\0' \) \ | env LC_COLLATE=C.UTF-8 sort -z \ | xargs -0r md5sum > DEBIAN/md5sums && \ chmod 644 DEBIAN/md5sums ) dpkg-gencontrol -isp # fix permissions find debian/tmp/usr/share/man debian/tmp/usr/share/doc \ -type f -exec chmod 644 {} + find debian/tmp -newermt '$(BUILD_DATE)' -exec \ touch --no-dereference --date='$(BUILD_DATE)' {} + dpkg --build debian/tmp .. binary-arch: #nothing to do binary: binary-indep binary-arch .PHONY: binary binary-arch binary-indep clean checkroot build build-arch build-indep