#!/usr/bin/make -f SHELL=/bin/bash package=the CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS) CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS) LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) export SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog --count 1 -SDate)" +%s) build: build-arch build-indep build-arch: stamp-build build-indep: stamp-build stamp-doc stamp-build: stamp-configure $(checkdir) $(MAKE) touch stamp-build configure: stamp-configure stamp-configure: $(checkdir) cp -f common/config.guess common/config.guess.old cp -f common/config.sub common/config.sub.old cp -f /usr/share/misc/config.sub common/ cp -f /usr/share/misc/config.guess common/ CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure \ --prefix=/usr --exec-prefix=/usr --with-ncurses \ --with-rexx=regina --with-rexxincdir=/usr/include/regina \ --with-global-profile=/etc/therc --docdir=/usr/share/THE --srcdir=`pwd` touch stamp-configure stamp-doc: stamp-build $(checkdir) $(MAKE) html the.man touch stamp-doc doc: stamp-doc clean: $(checkdir) if [ -f common/config.sub.old -a -f common/config.guess.old ]; then \ mv common/config.sub.old common/config.sub; \ mv common/config.guess.old common/config.guess; \ fi -rm -f stamp-build stamp-configure stamp-doc THE_Help.txt THE_Help_head \ THE_Help_set THE_Help_sos THE_Help_tail app5.htm app6.htm config.guess \ config.h config.sub fdl.htm preparecomb.the title.htm nthe divtop.gif \ divbot.gif the64.gif the256.gif the64.png [ ! -f Makefile ] || $(MAKE) distclean -chmod 644 debian/md5_sums -rm -f `find . \( -name '*~' -o -name '*.bak' \) -print` -rm -rf core debian/tmp* debian/files* debian/*substvars binary-indep: checkroot build stamp-doc -rm -rf debian/tmp-doc install -d -m755 debian/tmp-doc/{DEBIAN,usr/share/{doc/{the/html,the-doc},doc-base,THE}} cp debian/manual.the debian/tmp-doc/usr/share/THE gzip -9nfc the.man > debian/tmp-doc/usr/share/doc/the/the.man.gz gzip -9nfc HISTORY > debian/tmp-doc/usr/share/doc/the-doc/changelog.gz gzip -9nfc debian/changelog > debian/tmp-doc/usr/share/doc/the-doc/changelog.Debian.gz cp debian/copyright debian/tmp-doc/usr/share/doc/the-doc install -m644 {*.html,doc/*.gif} debian/tmp-doc/usr/share/doc/the/html/ #uudecode debian/*.png.uu && mv *.png debian/tmp-doc/usr/share/doc/the/html/ cp debian/menu-doc debian/tmp-doc/usr/share/doc-base/the rm -f debian/substvars dpkg-gencontrol -isp -p$(package)-doc -Pdebian/tmp-doc chown -R root.root debian/tmp-doc chmod -R go=rX debian/tmp-doc chmod 755 debian/md5_sums debian/md5_sums tmp-doc find debian/tmp-doc -newermt "@$$SOURCE_DATE_EPOCH" -print0 | \ xargs -0r touch --no-dereference --date="@$$SOURCE_DATE_EPOCH" dpkg --build debian/tmp-doc .. binary-arch: checkroot build $(checkdir) -rm -rf debian/tmp install -d -m755 debian/tmp/{DEBIAN,etc,usr/{bin,share/man/man1,share/doc/the,share/menu}} $(MAKE) install prefix=debian/tmp/usr exec_prefix=debian/tmp/usr mv debian/tmp/usr/bin/nthe debian/tmp/usr/bin/the ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) strip --strip-all --remove-section=.comment --remove-section=.note debian/tmp/usr/bin/the endif cp README TODO debian/tmp/usr/share/doc/the cp HISTORY debian/tmp/usr/share/doc/the/changelog cp debian/changelog debian/tmp/usr/share/doc/the/changelog.Debian cp debian/the.1 debian/tmp/usr/share/man/man1/the.1 gzip -9nf debian/tmp/usr/share/{doc/the/*,man/man1/the.1} cp debian/copyright debian/tmp/usr/share/doc/the install -m755 debian/postinst debian/tmp/DEBIAN/postinst install -m755 debian/postrm debian/tmp/DEBIAN/postrm install -m755 debian/prerm debian/tmp/DEBIAN/prerm install -m644 debian/conffiles debian/tmp/DEBIAN/conffiles install -m644 debian/therc.default debian/tmp/etc/therc install -m644 debian/therc.example debian/tmp/usr/share/THE/therc.example cp debian/menu debian/tmp/usr/share/menu/the dpkg-shlibdeps debian/tmp/usr/bin/the dpkg-gencontrol -isp -p$(package) -Pdebian/tmp chown -R root.root debian/tmp* chmod -R go=rX debian/tmp* chmod 755 debian/md5_sums debian/md5_sums tmp find debian/tmp -newermt "@$$SOURCE_DATE_EPOCH" -print0 | \ xargs -0r touch --no-dereference --date="@$$SOURCE_DATE_EPOCH" dpkg --build debian/tmp .. define checkdir test -f debian/rules endef binary: binary-arch binary-indep source diff: @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false checkroot: $(checkdir) test root = "`whoami`" .PHONY: binary binary-arch binary-indep clean checkroot