summaryrefslogtreecommitdiffstats
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules48
1 files changed, 48 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..2c4ab82
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,48 @@
+#!/usr/bin/make -f
+
+include /usr/share/dpkg/pkg-info.mk
+include /usr/share/dpkg/architecture.mk
+
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+
+%:
+ dh $@ --buildsystem cmake+ninja
+
+override_dh_auto_configure-arch:
+ dh_auto_configure -- \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DWITH_DBUS=ON \
+ -DDART_TESTING_TIMEOUT=180
+
+override_dh_auto_test-arch:
+ @# this is not run in parallel just because I'm too lazy to parse DEB_BUILD_OPTIONS
+ cd obj-$(DEB_HOST_GNU_TYPE) && LC_ALL=C.UTF-8 ninja -v tests
+ # some tests are not parallel-safe, since they try to look at the same file
+ifeq ($(DEB_HOST_ARCH_ENDIAN),little)
+ dh_auto_test -a --no-parallel
+else
+ # the testsuite fails on BE. https://gitlab.com/inkscape/inkscape/-/issues/1365
+ -dh_auto_test -a --no-parallel
+endif
+
+override_dh_auto_install-arch:
+ # The tutorials are manually installed, the rest goes here
+ dh_auto_install --destdir=debian/inkscape
+ rm -rv debian/inkscape/usr/share/inkscape/tutorials
+ rm -rv debian/inkscape/usr/share/inkscape/*/README
+ # Remove extensions that work only on Windows. #930154
+ # https://gitlab.com/inkscape/inkscape/-/merge_requests/2689
+ rm -v debian/inkscape/usr/share/inkscape/extensions/print_win32_vector.*
+
+ifeq (buster-backports,$(DEB_DISTRIBUTION))
+override_dh_dwz:
+ : Skipping dwz, 0.12 cannot compress Inkscape debug symbols
+endif
+
+override_dh_auto_configure-indep: nothing
+override_dh_auto_build-indep: nothing
+override_dh_auto_install-indep: nothing
+override_dh_auto_test-indep: nothing
+.PHONY: nothing
+nothing:
+ : Do nothing for the -indep build