| 1 |
#!/usr/bin/make -f |
| 2 |
# -*- makefile -*- |
| 3 |
|
| 4 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 5 |
export DPKG_GENSYMBOLS_CHECK_LEVEL = 4 |
| 6 |
|
| 7 |
confflags = \ |
| 8 |
-Dsession_example=false \ |
| 9 |
-Ddaemon_user=colord \ |
| 10 |
-Dvapi=true \ |
| 11 |
-Ddocs=false \ |
| 12 |
-Dinstalled_tests=true \ |
| 13 |
-Dargyllcms_sensor=true \ |
| 14 |
|
| 15 |
export deb_systemd_tmpfiles_dir = $(shell pkgconf --variable=tmpfiles_dir systemd | sed s,^/,,) |
| 16 |
export deb_systemd_sysusers_dir = $(shell pkgconf --variable=sysusers_dir systemd | sed s,^/,,) |
| 17 |
|
| 18 |
ifeq ($(DEB_HOST_ARCH_OS),linux) |
| 19 |
confflags += -Dsane=true |
| 20 |
indep_flags = -Dprint_profiles=true |
| 21 |
export deb_systemd_system_unit_dir = $(shell pkgconf --variable=systemd_system_unit_dir systemd | sed s,^/,,) |
| 22 |
export deb_systemd_user_unit_dir = $(shell pkgconf --variable=systemd_user_unit_dir systemd | sed s,^/,,) |
| 23 |
export deb_udev_dir = $(shell pkgconf --variable=udev_dir udev | sed s,^/,,) |
| 24 |
else |
| 25 |
confflags += -Dsane=false -Dsystemd=false -Dudev_rules=false |
| 26 |
indep_flags = -Dprint_profiles=false |
| 27 |
endif |
| 28 |
|
| 29 |
override_dh_auto_configure-arch: |
| 30 |
dh_auto_configure -- $(confflags) |
| 31 |
|
| 32 |
override_dh_auto_configure-indep: |
| 33 |
dh_auto_configure -- $(confflags) $(indep_flags) |
| 34 |
|
| 35 |
execute_after_dh_fixperms-arch: |
| 36 |
chmod 644 debian/colord/usr/share/bash-completion/completions/colormgr |
| 37 |
|
| 38 |
execute_before_dh_install: |
| 39 |
# Exclude systemd and udev related files |
| 40 |
grep -E -v 'deb_systemd_system_unit_dir|deb_systemd_user_unit_dir|deb_udev_dir' debian/colord.install > debian/colord.install.kfreebsd |
| 41 |
grep -E -v 'deb_systemd_system_unit_dir|deb_systemd_user_unit_dir|deb_udev_dir' debian/colord.install > debian/colord.install.hurd |
| 42 |
|
| 43 |
execute_before_dh_clean: |
| 44 |
rm -f debian/colord.install.kfreebsd |
| 45 |
rm -f debian/colord.install.hurd |
| 46 |
|
| 47 |
override_dh_makeshlibs: |
| 48 |
dh_makeshlibs -Xcolord-sensors -Xcolord-plugins |
| 49 |
|
| 50 |
# debhelper >= 13.4 makes all of /usr/libexec executable, which is not |
| 51 |
# quite right for installed-tests |
| 52 |
override_dh_fixperms: |
| 53 |
dh_fixperms -Xusr/libexec/installed-tests |
| 54 |
ifneq ($(filter %-tests,$(binaries)),) |
| 55 |
chmod --recursive --changes a+rX,u+w,og-w debian/*-tests/usr/libexec/installed-tests |
| 56 |
endif |
| 57 |
|
| 58 |
override_dh_auto_test: |
| 59 |
ifeq ($(DEB_HOST_ARCH_ENDIAN),little) |
| 60 |
dh_auto_test -- --timeout-multiplier 3 |
| 61 |
else |
| 62 |
echo "Skipping tests; known broken on big endian systems" |
| 63 |
endif |
| 64 |
|
| 65 |
|
| 66 |
%: |
| 67 |
dh $@ |