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 111 112 113 114 115 116 117 118 119 120 121 122 123
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This has to be exported to make some magic below work.
export DH_OPTIONS
FPCFLAGS := -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
else
FPCFLAGS += -O2
endif
-include /usr/share/dpkg/buildflags.mk
export FPCFLAGS
GEARHEADDATAVERSION=$(shell dpkg -s gearhead-data | perl -ne 'if (/^Version:\s+(\S+)/) {print $$1; exit 0;}')
build: build-arch build-indep
build-arch: build-arch-stamp
build-arch-stamp: build-arch-console-stamp build-arch-sdl-stamp
touch build-arch-stamp
build-arch-console-stamp: debian/build/console
dh_testdir
cd debian/build/console && fpc $(FPCFLAGS) -XD -dASCII gearhead2
touch build-arch-stamp
build-arch-sdl-stamp :: debian/build/sdl
dh_testdir
sed -i s/gearhead2.conf/gearhead2-sdl.conf/ debian/build/sdl/gears.pp
cd debian/build/sdl && fpc $(FPCFLAGS) -dSLDMODE gearhead2
touch build-arch-sdl-stamp
debian/build/console debian/build/sdl:
dh_testdir
mkdir -p $@
cp *.pas *.pp $@
build-indep: build-indep-stamp
build-indep-stamp:
dh_testdir
touch build-indep-stamp
clean:
dh_testdir
dh_testroot
rm -f build-arch-stamp build-arch-console-stamp build-arch-sdl-stamp build-indep-stamp
rm -rf debian/build
dh_clean
install: install-indep install-arch
install-indep: build-indep-stamp
dh_testdir
dh_testroot
dh_prep
dh_installdirs -i
dh_install -i -X.obj
install-arch: build-arch-stamp
dh_testdir
dh_testroot
dh_prep
dh_installdirs -a
dh_install -a -X man_
install -D -m 644 readme.txt debian/gearhead2/usr/share/doc/gearhead2/README
install -D -m 644 readme.txt debian/gearhead2-sdl/usr/share/doc/gearhead2-sdl/README
install -D debian/build/sdl/gearhead2 debian/gearhead2-sdl/usr/games/gearhead2-sdl
binary-indep: install-indep
dh_testdir
dh_testroot
dh_installchangelogs -i history.txt
dh_installdocs -i -X history.txt
dh_installexamples -i
dh_installmenu -i
dh_installman -i
dh_link -i
cd debian/gearhead2-data/usr/share/games/gearhead2/image; \
for f in *.png; do if [ -e /usr/share/games/gearhead/Image/"$$f" ] && idiff "$$f" /usr/share/games/gearhead/Image/"$$f" >/dev/null 2>/dev/null; then \
rm "$$f"; ln -s ../../gearhead/Image/"$$f" . ; \
fi; done
cd debian/gearhead2-data/usr/share/games/gearhead2/gamedata; \
for f in *.txt; do if [ -e /usr/share/games/gearhead/GameData/"$$f" ] && cmp -s "$$f" /usr/share/games/gearhead/GameData/"$$f" 2>/dev/null; then \
rm "$$f"; ln -s ../../gearhead/GameData/"$$f" . ; \
fi; done
dh_compress -i
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i -- -Vgearhead-version=$(GEARHEADDATAVERSION)
dh_md5sums -i
dh_builddeb -i
binary-arch: install-arch
dh_testdir
dh_testroot
dh_installchangelogs -a history.txt
dh_installdocs -a -X history.txt
dh_installexamples -a
dh_installmenu -a
dh_installman -a
dh_link -a
dh_strip -a
dh_compress -a
dh_fixperms -a
dh_makeshlibs -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary: binary-arch binary-indep
.PHONY: build build-arch build-indep clean binary-indep binary-arch binary install install-indep install-arch configure
|