| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
#export DH_VERBOSE=1 |
| 4 |
|
| 5 |
export DEB_BUILD_MAINT_OPTIONS := hardening=+all |
| 6 |
|
| 7 |
include /usr/share/dpkg/default.mk |
| 8 |
|
| 9 |
built_binaries := $(shell dh_listpackages) |
| 10 |
|
| 11 |
confflags := |
| 12 |
confflags += -DSDLNET_WERROR=OFF |
| 13 |
|
| 14 |
ifneq ($(filter nocheck,$(DEB_BUILD_OPTIONS))$(filter %-tests,$(built_binaries)),nocheck) |
| 15 |
confflags += -DSDLNET_TESTS=ON |
| 16 |
endif |
| 17 |
|
| 18 |
ifneq ($(filter %-doc,$(built_binaries)),) |
| 19 |
confflags += -DSDLNET_INSTALL_MAN=ON |
| 20 |
endif |
| 21 |
|
| 22 |
ifneq ($(filter %-tests,$(built_binaries)),) |
| 23 |
confflags += -DSDLNET_SAMPLES=ON |
| 24 |
confflags += -DSDLNET_SAMPLES_INSTALL=ON |
| 25 |
endif |
| 26 |
|
| 27 |
%: |
| 28 |
dh $@ --buildsystem=cmake --builddirectory=build |
| 29 |
|
| 30 |
override_dh_auto_configure: |
| 31 |
echo "$(DEB_VERSION_UPSTREAM_REVISION)" > VERSION.txt |
| 32 |
dh_auto_configure -- $(confflags) |
| 33 |
|
| 34 |
# debhelper >= 13.4 makes all of /usr/libexec executable, which is not |
| 35 |
# quite right for installed-tests |
| 36 |
override_dh_fixperms: |
| 37 |
dh_fixperms -Xusr/libexec/installed-tests |
| 38 |
ifneq ($(filter %-tests,$(built_binaries)),) |
| 39 |
chmod --recursive --changes a+rX,u+w,og-w debian/*-tests/usr/libexec/installed-tests |
| 40 |
endif |