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 110
|
#!/usr/bin/make -f
# Nethack build script for Debian
#
# Ben Gertzfield (che@debian.org) 29 July 1997
# Copyright 1997 Ben Gertzfield. This script is released under the
# GNU General Public License, version 2 or later.
build: build-stamp
build-stamp:
dh_testdir
make all CFLAGS='-DDEBIAN -O2 -I../include \
-I/usr/X11R6/include -fomit-frame-pointer'
cd util && make recover CFLAGS='-DDEBIAN -O2 -I../include \
-I/usr/X11R6/include -fomit-frame-pointer'
touch build-stamp
clean:
dh_testdir
dh_testroot
-rm -f build-stamp nh10.pcf
-rm -f `find . -name "*.orig"`
-rm -f `find . -name "*~"`
-rm -rf debian/tmp debian/files* core debian/substvars
-make spotless
dh_clean
binary-indep: build
# Nothing to do by default
binary-arch: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
chgrp games debian/tmp/usr/lib/games/nethack
chgrp -R games debian/tmp/var/lib/games/nethack
chmod -R 02775 debian/tmp/var/lib/games/nethack
install -m 0644 -o root -g root \
dat/{nhdat,x11tiles,pet_mark.xbm,rip.xpm,license} \
debian/tmp/usr/lib/games/nethack
install -m 0755 -o root -g games \
debian/nethack.sh debian/tmp/usr/games/nethack
install -m 0755 -o root -g games \
debian/xnethack.sh debian/tmp/usr/games/xnethack
install -m 2755 -o root -g games src/nethack \
debian/tmp/usr/lib/games/nethack/
# build the recover prog, and move it where it's supposed to be
install -o root -g games -m 2755 util/recover \
debian/tmp/usr/lib/games/nethack/recover
# install the dgn_comp and lev_comp programs
install -o root -g games -m 755 util/dgn_comp \
debian/tmp/usr/lib/games/nethack/dgn_comp
install -o root -g games -m 755 util/lev_comp \
debian/tmp/usr/lib/games/nethack/lev_comp
# install X11 stuff
install -m 644 debian/NetHack.ad debian/tmp/usr/X11R6/lib/X11/app-defaults/NetHack
/usr/X11R6/bin/bdftopcf -o nh10.pcf win/X11/nh10.bdf
install -m 644 nh10.pcf debian/tmp/usr/X11R6/lib/X11/fonts/misc/
gzip debian/tmp/usr/X11R6/lib/X11/fonts/misc/nh10.pcf
# extract spoilers
uudecode -o /dev/stdout debian/spoilers.tar.uu | tar xf - -C debian/tmp/usr/doc/nethack
# init.d script
install -m 755 -o root -g root debian/nethack.init \
debian/tmp/etc/rc.boot/nethack
# system-wide X nethack.rc file, thanks again joey :)
install -m 644 -o root -g root debian/nethackrc.x11 \
debian/tmp/etc/nethackrc.x11
#dh_installdocs doc/Guidebook
cp debian/README.Debian debian/tmp/usr/doc/nethack
cp debian/copyright debian/tmp/usr/doc/nethack
cp doc/Guidebook debian/tmp/usr/doc/nethack
cp debian/changelog debian/tmp/usr/doc/nethack
dh_installmenu
# no can do; broken for slink
# dh_installmanpages sys/unix/spkr.7
cp doc/*.6 debian/tmp/usr/man/man6
cp debian/*.6 debian/tmp/usr/man/man6
# dh_installchangelogs
dh_strip
dh_compress
dh_fixperms -Xnethack
chmod 644 debian/tmp/usr/man/man6/nethack.6.gz
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary
|