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
|
#!/usr/bin/make -f
FHS_DEFINES := \
SCORE_DIR=/var/games/xbat \
IMAGE_DIR=/usr/share/games/xbat/Image \
MAP_DIR=/usr/share/games/xbat/Map \
DOMO_DIR=/usr/share/games/xbat/Domo \
BINDIR=/usr/games
# UNION is a compile flag. It cannot be evaluated in the Imakefile,
# because imake doesn't give cpp a nice $ARCH flag to evaluate.
ifeq ($(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU),i386)
UNION=1
else
UNION=0
endif
build: build-stamp
build-stamp:
dh_testdir
QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
rm -f Makefile
xmkmf
$(MAKE) UNION=$(UNION) $(FHS_DEFINES) depend
$(MAKE) UNION=$(UNION) $(FHS_DEFINES) xbat
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
-$(MAKE) -i clean
rm -f Makefile xbat *.o
QUILT_PATCHES=debian/patches quilt pop -a -R || test $$? = 2
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
$(MAKE) $(FHS_DEFINES) DESTDIR=`pwd`/debian/xbat install
mv debian/xbat/var/games/xbat/* debian/xbat/usr/share/games/xbat/Score
find debian/xbat/usr/share/games/xbat -type f -exec chmod -x '{}' ';'
binary-indep: build install
binary-arch: build install
dh_testdir
dh_testroot
dh_installdocs README README.jp
dh_installexamples
dh_installmenu
dh_installman debian/*.6
dh_installchangelogs
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|