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
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
LDFLAGS2:=-Wl,-z,defs -Wl,-as-needed -Wl,--no-undefined
config: config-stamp
config-stamp:
dh_testdir
[ ! -d debian/patches ] || $(MAKE) -f /usr/share/quilt/quilt.make patch
# # Look for unpatched relative directories
# grep -r \"models/ * | grep -v debian/
# grep -r \"textures/ * | grep -v debian/
# grep -r \"levels/ * | grep -v debian/
# grep -r \"GLSL/ * | grep -v debian/
# grep -r \"fonts/ * | grep -v debian/
# grep -r \"music/ * | grep -v debian/
# grep -r \"sounds/ * | grep -v debian/
# grep -r \"pony.options\" * | grep -v debian/
# grep -r \"levels.xml\" * | grep -v debian/
sed -e 's|:CFLAGS:|$(CFLAGS) $(CPPFLAGS)|g' \
-e 's|:LDFLAGS:|$(LDFLAGS) $(LDFLAGS2)|g' \
< debian/SConstruct > SConstruct.Debian
mkdir -p lib
touch $@
build-stamp: config
dh_testdir
protoc src/mesh.proto --cpp_out=lib/
scons -f SConstruct.Debian \
prefix=/usr \
resources_dir=/usr/share/pink-pony \
lib_dir="$(CURDIR)"
touch $@
build-indep: build-stamp
build-arch: build-stamp
build: build-arch build-indep
clean:
dh_testdir
dh_testroot
rm -fv build-stamp config-stamp
-scons -c -f SConstruct.Debian
rm -fv SConstruct.Debian
rm -fv config.log options.cache
rm -fv lib/mesh.pb.cc lib/mesh.pb.h
rm -fv lib/src/mesh.pb.cc lib/src/mesh.pb.h
rm -rfv .sconf_temp build
rm -rfv .sconsign.dblite screen0.tga
rm -fv `find . -name "*.o"`
[ ! -d debian/patches ] || $(MAKE) -f /usr/share/quilt/quilt.make unpatch
dh_clean
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
mkdir -p "$(CURDIR)"/debian/pink-pony/usr/lib/pink-pony/
cp Pony "$(CURDIR)"/debian/pink-pony/usr/lib/pink-pony/pink-pony.bin
mkdir -p "$(CURDIR)"/debian/pink-pony/usr/games/
cp install/pink-pony "$(CURDIR)"/debian/pink-pony/usr/games/
chmod +x "$(CURDIR)"/debian/pink-pony/usr/games/pink-pony
# Build architecture-independent files here.
binary-indep: install
dh_testdir -i
dh_testroot -i
dh_installchangelogs -i
dh_installdocs -i
dh_install -i
dh_link -i
dh_compress -i
dh_fixperms -i
[ ! -e /usr/bin/dh_buildinfo ] || dh_buildinfo -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
binary-arch: install
dh_testdir -a
dh_testroot -a
dh_installchangelogs -a
dh_installdocs -a
dh_installexamples -a
dh_install -a
dh_installmenu -a
dh_installman -a
dh_link -a
dh_strip --dbgsym-migration='pink-pony-dbg (<< 1.4.1-3~)' -a
dh_compress -a
dh_fixperms -a
[ ! -e /usr/bin/dh_buildinfo ] || dh_buildinfo -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary: binary-indep binary-arch
.PHONY: config build clean binary-indep binary-arch binary install
|