#!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1 -Wl,--as-needed # Explicitly disable this plugin which defaults to enabled # unless we're on the limited set of architectures that has sysprof. DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) ifneq (,$(filter amd64 arm64 armel armhf i386 mips64el mipsel ppc64el alpha powerpcspe x32,$(DEB_HOST_ARCH))) SYSPROF_PLUGIN = -Dwith_sysprof=true else SYSPROF_PLUGIN = -Dwith_sysprof=false endif ifneq (,$(filter amd64 arm64 armhf i386 mips mips64 mips64el mipsel powerpc ppc64 ppc64el s390x x32,$(DEB_HOST_ARCH))) VALGRIND_PLUGIN = -Dwith_valgrind=true else VALGRIND_PLUGIN = -Dwith_valgrind=false endif ifeq ($(DEB_HOST_ARCH_OS), linux) # Enable Flatpak support on supported architectures ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el s390x hppa powerpc powerpcspe ppc64)) FLATPAK_PLUGIN = -Dwith_flatpak=true endif else FLATPAK_PLUGIN = -Dwith_flatpak=false endif %: dh $@ --with gir,gnome,python3 override_dh_auto_configure: dh_auto_configure -- \ -Dnetwork_tests=false \ $(FLATPAK_PLUGIN) \ $(SYSPROF_PLUGIN) \ $(VALGRIND_PLUGIN) # force debian/tmp installation for now until we ship # more than one binary package, then this can be dropped... override_dh_auto_install: dh_auto_install --destdir=$(CURDIR)/debian/tmp CHECK_RUNTIME_DIR= $(CURDIR)/debian/tmp/run override_dh_auto_test: mkdir -p -m0700 $(CHECK_RUNTIME_DIR) HOME=$(CHECK_RUNTIME_DIR) dbus-run-session -- xvfb-run dh_auto_test override_dh_install: rm -rf debian/tmp/usr/lib/python*/*-packages/gi/overrides/__pycache__/ find debian/tmp -name '*.la' -print -delete find debian/tmp/usr/lib/ \( -name '*.pyc' -o -name '*.pyo' \) -print -delete rm -rf debian/tmp/usr/include/gnome-builder-* dh_install -Xpkgconfig -Xgir-1.0 override_dh_missing: # see debian/not-installed and bgo#758266 + #804769 dh_missing --fail-missing -Xpkgconfig override_dh_makeshlibs: dh_makeshlibs -X/usr/lib/$(DEB_HOST_MULTIARCH)/gnome-builder override_dh_shlibdeps: dh_shlibdeps -ldebian/gnome-builder/usr/lib/$(DEB_HOST_MULTIARCH)/gnome-builder/ override_dh_girepository: dh_girepository -ldebian/tmp/usr/share/gnome-builder/gir-1.0 \ /usr/lib/$(DEB_HOST_MULTIARCH)/gnome-builder/ \ /usr/lib/$(DEB_HOST_MULTIARCH)/gnome-builder/girepository-1.0/ override_dh_python3: # https://bugs.debian.org/838342 dh_python3 -X.*/plugins/meson_templates/resources/.*