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
|
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# nanopb headers are in /usr/include/nanopb, but generated msg.pb.h
# header includes <pb.h>
export DEB_CPPFLAGS_MAINT_APPEND = -I/usr/include/nanopb
# fix build with FORTIFY_SOURCE level 3
# https://github.com/cxong/cdogs-sdl/issues/838
export DEB_CFLAGS_MAINT_APPEND = -finline-limit=1000 -Wno-stringop-truncation
%:
dh $@
src/proto/msg.pb.c src/proto/msg.pb.h &: src/proto/msg.proto
cd src/proto && protoc --nanopb_out=. msg.proto
override_dh_auto_configure: src/proto/msg.pb.c src/proto/msg.pb.h
dh_auto_configure -- \
-DCDOGS_BIN_DIR=/usr/games \
-DCDOGS_DATA_DIR=/usr/share/games/cdogs-sdl/ \
-DUSE_SHARED_ENET=ON \
-DDEBUG=ON \
-DBUILD_EDITOR=OFF
execute_before_dh_installdocs:
rm -r $(CURDIR)/debian/tmp/usr/doc
execute_before_dh_install:
find $(CURDIR)/debian/tmp -type f '(' -iname "LICENSE.md" -o -iname "README.md" -o -name "*.sh" ')' -delete
# delete txt files (containing only license/copyright information), except a few important ones
find $(CURDIR)/debian/tmp -type f '(' -name "*.txt" -a '!' \
'(' -name 'gamecontroller*db.txt' -o -name 'prefixes.txt' -o -name 'suffix*.txt' ')' ')' -delete
override_dh_gencontrol:
dh_gencontrol -- -VBuilt-Using="$(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W "libnanopb-dev")"
override_dh_auto_test:
dh_auto_test --no-parallel
|