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
|
#!/usr/bin/make -f
include /usr/share/dpkg/architecture.mk
CFLAGS = -Wall -g -DXF86VIDMODE
CFLAGS += $(shell dpkg-buildflags --get CFLAGS)
CFLAGS += $(shell dpkg-buildflags --get CPPFLAGS)
LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
endif
build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp:
dh_testdir
ln -sf /usr/share/misc/config.sub
ln -sf /usr/share/misc/config.guess
LIBS=-lXxf86vm ./configure \
--build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
--prefix=/usr/share/games/xgalaga \
--exec-prefix=/usr/games CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
# hack SOUNDDEFS so we don't need symlinks
$(MAKE) SOUNDDEFS=-DSOUNDSERVER=\\\"/usr/lib/games/xgalaga/$$\(SOUNDSRV\)\\\"
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
if [ -e Makefile ]; then $(MAKE) -i distclean; fi
dh_clean xgal.sndsrv.oss xgal.sndsrv.freebsd xgal.sndsrv.linux config.k.bak config.sub config.guess
binary-indep: build-indep
binary-arch: build-arch
dh_testdir
dh_testroot
dh_prep
dh_installdirs usr/lib/games/xgalaga usr/games usr/share/man/man6
$(MAKE) DESTDIR=`pwd`/debian/xgalaga install
dh_link usr/share/games/xgalaga/CREDITS usr/share/doc/xgalaga/CREDITS
# move the sound-server binary out of usr/share
mv debian/xgalaga/usr/share/games/xgalaga/xgal.sndsrv.* \
debian/xgalaga/usr/lib/games/xgalaga
find debian/xgalaga/usr/share/games/xgalaga -type f | xargs chmod 644
dh_install debian/xgalaga-icon.xpm usr/share/pixmaps
dh_install debian/xgalaga.desktop usr/share/applications
dh_install debian/xgalaga-hyperspace.desktop usr/share/applications
dh_link usr/share/man/man6/xgalaga.6x usr/share/man/man6/xgalaga-hyperspace.6x
dh_installdocs README* libsprite/README.libsprite
dh_installexamples
dh_installmenu
dh_installchangelogs CHANGES
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
|