#!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. # export DH_VERBOSE=1 export DEB_BUILD_MAINT_OPTIONS = hardening=+all export SDL_AUDIODRIVER = dummy export SDL_VIDEODRIVER = dummy include /usr/share/dpkg/default.mk ifneq (,$(filter-out experimental UNRELEASED,$(DEB_DISTRIBUTION))) $(error This version of SDL is not yet suitable for testing/unstable) endif built_binaries := $(shell dh_listpackages) configure_options := \ -DSDL2COMPAT_STATIC=ON \ -DSDL2COMPAT_VENDOR_INFO="$(DEB_VENDOR) $(DEB_VERSION)" \ -DSDL2COMPAT_WERROR=OFF \ $(NULL) ifneq ($(filter nocheck,$(DEB_BUILD_OPTIONS))$(filter %-tests,$(built_binaries)),nocheck) configure_options += -DSDL2COMPAT_TESTS=ON else configure_options += -DSDL2COMPAT_TESTS=OFF endif ifneq ($(filter %-tests,$(built_binaries)),) configure_options += -DSDL2COMPAT_INSTALL_TESTS=ON else configure_options += -DSDL2COMPAT_INSTALL_TESTS=OFF endif %: dh $@ -Scmake override_dh_auto_configure: mkdir -p obj-$(DEB_HOST_GNU_TYPE) echo '*' > obj-$(DEB_HOST_GNU_TYPE)/.gitignore dh_auto_configure -- $(configure_options) override_dh_install: rm -f debian/tmp/usr/include/SDL2/SDL_config.h dh_install override_dh_strip: dh_strip -plibsdl2-compat-shim --no-automatic-dbgsym dh_strip --remaining-packages override_dh_makeshlibs: dh_makeshlibs -plibsdl2-compat -n dh_makeshlibs --remaining-packages library=$$(cd debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) && ls -1 libSDL2-2.0.so.0.*) && \ ln -fns sdl2-compat/$$library debian/libsdl2-compat-shim/usr/lib/$(DEB_HOST_MULTIARCH)/ ln -fns sdl2-compat/libSDL2-2.0.so.0 debian/libsdl2-compat-shim/usr/lib/$(DEB_HOST_MULTIARCH)/ override_dh_shlibdeps: dh_shlibdeps -lusr/lib/$(DEB_HOST_MULTIARCH)/sdl2-compat # debhelper >= 13.4 makes all of /usr/libexec executable, which is not # quite right for installed-tests override_dh_fixperms: dh_fixperms -Xusr/libexec/installed-tests chmod --recursive a+rX,u+w,og-w debian/*-tests/usr/libexec/installed-tests override_dh_gencontrol: dh_gencontrol -- -Vlocal:EquivalentVersion='2.29~git20240108'