| 1 | #!/usr/bin/make -f |
| 2 | |
| 3 | export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 4 | export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1 -Wl,-z,defs |
| 5 | |
| 6 | %: |
| 7 | # We need to force the build system to autoconf otherwise for some reasons it |
| 8 | # tries to run the python_distutils one |
| 9 | dh $@ --buildsystem=autoconf |
| 10 | |
| 11 | override_dh_auto_configure: |
| 12 | dh_auto_configure -- --with-udev-rules \ |
| 13 | --with-udevdir=/usr/lib/udev \ |
| 14 | --with-systemdsystemunitdir=/usr/lib/systemd/system \ |
| 15 | --with-cups-serverbin-dir=/usr/lib/cups |
| 16 | |
| 17 | override_dh_python3: |
| 18 | dh_python3 -ppython3-cupshelpers |
| 19 | dh_python3 -psystem-config-printer /usr/share/system-config-printer/ |
| 20 | dh_python3 -psystem-config-printer-common /usr/share/system-config-printer/ |
| 21 | |
| 22 | override_dh_autoreconf: |
| 23 | dh_autoreconf ./bootstrap |
| 24 | |
| 25 | execute_after_dh_clean: |
| 26 | rm -f dbus/org.fedoraproject.Config.Printing.service |
| 27 | |
| 28 | # Install the apport hook on Ubuntu |
| 29 | # python3-smbc can't be installed by default on Ubuntu while it is in 'universe' |
| 30 | ifeq (yes,$(shell dpkg-vendor --derives-from Ubuntu && echo yes)) |
| 31 | execute_after_dh_install: |
| 32 | dh_install -psystem-config-printer-common debian/source_system-config-printer.py \ |
| 33 | usr/share/apport/package-hooks/ |
| 34 | |
| 35 | override_dh_gencontrol: |
| 36 | dh_gencontrol -- \ |
| 37 | -Vpysmbc:Suggests="python3-smbc" |
| 38 | else |
| 39 | override_dh_gencontrol: |
| 40 | dh_gencontrol -- \ |
| 41 | -Vpysmbc:Recommends="python3-smbc" |
| 42 | endif |
| 43 | |
| 44 | # We only use dh_gnome to automatically run dh_translations in Ubuntu |
| 45 | override_dh_gnome: |
| 46 | |
| 47 | # We need a refreshed .pot file since the Ubuntu changes include translatable strings |
| 48 | override_dh_translations: |
| 49 | rm -f po/system-config-printer.pot |
| 50 | dh_translations --domain=system-config-printer |