#! /usr/bin/make -f .PHONY: build build-indep build-arch clean binary binary-indep binary-arch checkdir package = nitpic d=$(shell pwd)/debian/tmp STRIP=strip --strip-unneeded --remove-section=.note --remove-section=.comment Makefile: Imakefile xmkmf export SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog --count 1 -SDate)" +%s) build: build-arch build-indep: build-arch: checkdir Makefile $(MAKE) clean: checkdir Makefile $(MAKE) clean $(RM) -r debian/files debian/substvars debian/tmp $(RM) Makefile find . -name \*~ -print0 | xargs -0 $(RM) binary-indep: checkdir build binary-arch: checkdir build $(RM) -r $(d) install -d $(d)/DEBIAN install -d $(d)/usr/bin install -d $(d)/etc/X11/app-defaults install -d $(d)/usr/share/doc/$(package) install -d $(d)/usr/share/man/man1 install -c debian/conffiles $(d)/DEBIAN/ install -c debian/changelog $(d)/usr/share/doc/$(package)/changelog.Debian install -c README $(d)/usr/share/doc/$(package) install -c test.* $(d)/usr/share/doc/$(package) gzip -9nvf $(d)/usr/share/doc/$(package)/* install -c debian/copyright $(d)/usr/share/doc/$(package)/copyright install -c nitpic $(d)/usr/bin install -c XPICsim $(d)/etc/X11/app-defaults/ install -d $(d)/usr/share/$(package)/ install -c *.xbm $(d)/usr/share/nitpic/ install nitpic.man $(d)/usr/share/man/man1/nitpic.1 gzip -9nvf $(d)/usr/share/man/man1/nitpic.1 install -d $(d)/usr/share/lintian/overrides install -c debian/lintian.overrides $(d)/usr/share/lintian/overrides/$(package) find $(d) -type f ! -path $(d)/usr/bin/nitpic -print0 | xargs -0 chmod 644 find $(d) -type d -print0 | xargs -0 chmod 755 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) $(STRIP) $(d)/usr/bin/nitpic endif dpkg-shlibdeps $(d)/usr/bin/* dpkg-gencontrol -isp -p$(package) -P$(d) find $(d) -newermt "@$$SOURCE_DATE_EPOCH" -print0 | \ xargs -0r touch --no-dereference --date="@$$SOURCE_DATE_EPOCH" dpkg-deb --root-owner-group --build $(d) .. binary: binary-indep binary-arch checkdir: test -f ic.cc .PHONY: build clean binary-indep binary-arch binary