File: rules

package info (click to toggle)
cups-filters 1.21.6-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,604 kB
  • sloc: ansic: 48,931; cpp: 15,626; sh: 5,751; makefile: 989; xml: 127; perl: 73; php: 28; python: 8
file content (68 lines) | stat: -rwxr-xr-x 2,378 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

derives_from_ubuntu := $(shell (dpkg-vendor --derives-from Ubuntu && echo "yes") || echo "no")

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		--disable-silent-rules \
		--with-shell=/bin/sh \
		--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
		--mandir=/usr/share/man \
		--enable-static \
		--enable-mutool \
		--enable-auto-setup-driverless \
		--with-mutool-path=/usr/bin/mutool \
		--with-test-font-path=/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf

override_dh_installchangelogs:
	dh_installchangelogs NEWS

override_dh_installdocs:
	dh_installdocs -A AUTHORS README

override_dh_fixperms:
	dh_fixperms -Xusr/lib/cups/backend
	
	# Make the serial backend run as root, since /dev/ttyS* are
	# root:dialout and thus not accessible as user lp
	chmod 744 debian/cups-filters/usr/lib/cups/backend/serial

override_dh_makeshlibs:
	dh_makeshlibs -- -c4

override_dh_auto_clean:
	[ ! -r Makefile ] || make distclean

override_dh_install:
	dh_install
	
ifeq ($(derives_from_ubuntu),yes)
	#  - Install Apport hook
	#  - Replace standard test page template by Ubuntu-branded one
	install -D -m 644 debian/local/apport-hook.py debian/cups-filters/usr/share/apport/package-hooks/source_cups-filters.py
	install -D -m 644 debian/local/default-testpage-ubuntu.pdf debian/cups-filters/usr/share/cups/data/default-testpage.pdf
else
	mkdir -p debian/cups-filters/usr/share/cups/data/
	rsvg-convert debian/local/default-testpage-debian.svg -f pdf > debian/cups-filters/usr/share/cups/data/default-testpage.pdf
endif

	# Install the modules loader for lp, ppdev and parport_pc
	install -D -m 644 debian/local/modules-load.conf debian/cups-filters/etc/modules-load.d/cups-filters.conf

	dh_apparmor -pcups-browsed --profile-name=usr.sbin.cups-browsed

get-orig-source:
	set -e;\
	quilt pop -af || true ;\
	rm -Rf .pc ;\
	gbp import-orig --pristine-tar --uscan --no-merge --upstream-branch=upstream/latest;\
	utag=`git describe --exact-match heads/upstream/latest | sed -e 's#^upstream/##'` ;\
	ucommit=`git rev-parse --verify upstream/latest`;\
	git dpm record-new-upstream --rebase-patched --allow-changes-in-debian-branch ../cups-filters_$$utag.orig.tar.xz $$ucommit ;\
	git dpm update-patches -m "Merge upstream $$utag version and refresh git-dpm patches"