1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
|
#!/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)
build: build-arch build-indep
build-arch: stamp-build
build-indep: stamp-build stamp-doc
stamp-build: stamp-configure
$(checkdir)
$(MAKE) the THE_Help.txt
touch stamp-build
configure: stamp-configure
stamp-configure:
$(checkdir)
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 --srcdir=`pwd`
touch stamp-configure
stamp-doc: stamp-build
$(checkdir)
$(MAKE) html
touch stamp-doc
doc: stamp-doc
clean:
$(checkdir)
-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 -9fc the.man > debian/tmp-doc/usr/share/doc/the/the.man.gz
gzip -9fc HISTORY > debian/tmp-doc/usr/share/doc/the-doc/changelog.gz
gzip -9fc 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
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 -9f 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
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
|