| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 8 |
export SDL_AUDIODRIVER = dummy |
| 9 |
export SDL_VIDEODRIVER = dummy |
| 10 |
|
| 11 |
include /usr/share/dpkg/default.mk |
| 12 |
|
| 13 |
built_binaries := $(shell dh_listpackages) |
| 14 |
configure_options := \ |
| 15 |
-DSDL2COMPAT_STATIC=OFF \ |
| 16 |
-DSDL2COMPAT_VENDOR_INFO="$(DEB_VENDOR) $(DEB_VERSION)" \ |
| 17 |
-DSDL2COMPAT_WERROR=OFF \ |
| 18 |
$(NULL) |
| 19 |
|
| 20 |
ifneq ($(filter nocheck,$(DEB_BUILD_OPTIONS))$(filter %-tests,$(built_binaries)),nocheck) |
| 21 |
configure_options += -DSDL2COMPAT_TESTS=ON |
| 22 |
else |
| 23 |
configure_options += -DSDL2COMPAT_TESTS=OFF |
| 24 |
endif |
| 25 |
|
| 26 |
ifneq ($(filter %-tests,$(built_binaries)),) |
| 27 |
configure_options += -DSDL2COMPAT_INSTALL_TESTS=ON |
| 28 |
else |
| 29 |
configure_options += -DSDL2COMPAT_INSTALL_TESTS=OFF |
| 30 |
endif |
| 31 |
|
| 32 |
%: |
| 33 |
dh $@ -Scmake+ninja -Bcmake-build |
| 34 |
|
| 35 |
override_dh_auto_configure: |
| 36 |
ifeq ($(DEB_VERSION_UPSTREAM),2.32.56+git20251029~ee7cf25+ds) |
| 37 |
echo release-2.32.56-63-gee7cf25 > REVISION.txt |
| 38 |
endif |
| 39 |
dh_auto_configure -- $(configure_options) |
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
ifeq (,$(filter amd64 arm64 i386,$(DEB_HOST_ARCH))) |
| 49 |
execute_after_dh_auto_install: |
| 50 |
rm -fv debian/tmp/usr/share/installed-tests/SDL2_compat/testtimer.test |
| 51 |
endif |
| 52 |
|
| 53 |
override_dh_makeshlibs: |
| 54 |
dh_makeshlibs -plibsdl2-compat -n |
| 55 |
dh_makeshlibs --remaining-packages |
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
override_dh_fixperms: |
| 60 |
dh_fixperms -Xusr/libexec/installed-tests |
| 61 |
chmod --recursive a+rX,u+w,og-w debian/*-tests/usr/libexec/installed-tests |