1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
|
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
dh $@
execute_before_dh_autoreconf:
[ -d m4local ] || mkdir -p m4local
ifneq (,$(filter libgutenprint-doc, $(shell dh_listpackages)))
MAINTAINER_MODE += "--enable-maintainer-mode"
endif
override_dh_auto_configure:
dh_auto_configure -- \
--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
--disable-static --enable-shared --disable-rpath \
--disable-static-genppd \
--with-modules=dlopen \
--disable-libgutenprintui2 --disable-gimp2 \
--with-cups --enable-cups-level3-ppds --enable-globalized-cups-ppds \
--enable-cups-1_2-enhancements --disable-cups-ppds \
--enable-test --disable-testpattern \
$(MAINTAINER_MODE) \
--enable-nls
execute_after_dh_auto_build-indep:
# Build the gettext translations (#987457)
cd po && make update-gmo
execute_after_dh_install-indep:
rm -f debian/gutenprint-locales/usr/share/locale/*/*.po
# Make sure at least some locales are installed (#987457)
test -n "$$(find debian/gutenprint-locales/usr/share/locale -name gutenprint.mo)"
override_dh_installdocs:
dh_installdocs -pescputil --link-doc=libgutenprint9
dh_installdocs --remaining-packages
# Remove build directory from gutenprint.tag file to make
# build reproducible.
find
-sed -i -e 's,$(CURDIR),BUILDPATH,g' \
debian/libgutenprint-doc/usr/share/doc/libgutenprint-doc/reference/gutenprint.tag
override_dh_install-arch:
# Remove build path, timestamp, username, and uname output to
# make build reproducible.
sed -i -e 's,$(CURDIR),BUILDPATH,g' \
-e 's,Generated at.*,Generated at REDACTED,g' \
-e 's,uname -a output:.*,uname -a output: REDACTED,g' \
$(shell find debian/tmp/ -name config.summary)
ifeq ($(DEB_BUILD_ARCH_OS),linux)
dh_install -pprinter-driver-gutenprint usr/share/cups/usb
endif
dh_install -a --remaining-packages
# Remove rpath
find debian/printer-driver-gutenprint/usr/lib -type f -perm /0111 -print0 | xargs -0 chrpath --delete
# Install ppd-updater file
install -D --mode=644 debian/printer-driver-gutenprint.ppd-updater $(CURDIR)/debian/printer-driver-gutenprint/usr/share/cups/ppd-updaters/printer-driver-gutenprint.ppd-updater
override_dh_installchangelogs:
dh_installchangelogs NEWS
override_dh_compress:
dh_compress -X.pdf -X.odt
execute_before_dh_auto_test:
# As dgit doesn't support the executable bit in patches, set it here before running the test
chmod +x scripts/test-driver-verbose
override_dh_perl:
dh_perl -d
override_dh_makeshlibs:
dh_makeshlibs -a -V -X usr/lib/$(DEB_HOST_MULTIARCH)/gutenprint
override_dh_shlibdeps:
dh_shlibdeps -a -X usr/lib/$(DEB_HOST_MULTIARCH)/gutenprint -ldebian/libgutenprint9/usr/lib/$(DEB_HOST_MULTIARCH)
execute_after_dh_fixperms:
# Make the gutenprint52+usb backend run as root, since /dev/bus/usb/*
# are root:root in udev < 147, and the usblp kernel module is not used
# here; udev 147 makes most of those printers accessible to lp, but
# apparently not all of them
[ ! -f debian/printer-driver-gutenprint/usr/lib/cups/backend/gutenprint52+usb ] || \
chmod go-x debian/printer-driver-gutenprint/usr/lib/cups/backend/gutenprint52+usb
|