File: rules

package info (click to toggle)
libcupsfilters 2.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,396 kB
  • sloc: ansic: 34,976; cpp: 8,055; makefile: 357; sh: 285; python: 8
file content (69 lines) | stat: -rwxr-xr-x 2,887 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
69
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --with pkgkde_symbolshelper

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 \
		--with-mutool-path=/usr/bin/mutool \
		--with-test-font-path=/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf

override_dh_auto_build:
	dh_auto_build
	# Compile test programs for autopkgtest. Usually they get compiled
	# by the "make check" run, but this is omitted (only) on riscv64
	# ('dh: command-omitted: The call to "dh_auto_test -a" was omitted
	#   due to "DEB_BUILD_OPTIONS=nocheck"' in buildlog)
	make testdither testpdf1 testpdf2 test-analyze test-pdf test-ps testcmyk testrgb

override_dh_makeshlibs:
	dh_makeshlibs -- -c4

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

override_dh_install:
	dh_install
	# Install test programs for autopkgtest, binary package
	# libcupsfilters-tests
	install -d -m 755 debian/libcupsfilters-tests/usr/bin
	install -m 755 .libs/test* debian/libcupsfilters-tests/usr/bin/
	install -D -m 644 cupsfilters/image.pgm debian/libcupsfilters-tests/usr/share/libcupsfilters-tests/image.pgm
	install -D -m 644 cupsfilters/image.pgm debian/libcupsfilters-tests/usr/share/libcupsfilters-tests/image.ppm
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/libcupsfilters2-common/usr/share/apport/package-hooks/source_libcupsfilters.py
	install -D -m 644 debian/local/default-testpage-ubuntu.pdf debian/libcupsfilters2-common/usr/share/cups/data/default-testpage.pdf
else
	mkdir -p debian/libcupsfilters2-common/usr/share/cups/data/
	rsvg-convert debian/local/default-testpage-debian.svg -f pdf > debian/libcupsfilters2-common/usr/share/cups/data/default-testpage.pdf
endif

get-orig-source:
	set -ex; \
	dbranch=`git branch --show-current`; \
	gbp import-orig --pristine-tar --uscan --no-merge --upstream-branch=upstream/latest --upstream-tag="upstream/vcs-%(version)s"; \
	utag=`git describe --exact-match heads/upstream/latest | sed -e 's#^upstream/vcs-##'`; \
	ucommit=`git rev-parse --verify upstream/latest`; \
	git checkout -f upstream/latest-tarballs; \
	git merge -Xtheirs -m "Merge $$utag from upstream's VCS" upstream/vcs-$$utag; \
	tar --strip-components=1 -xavf ../libcupsfilters_$$utag.orig.tar.xz; \
	git add -A .; \
	git commit -m "$$utag tarball artifacts" || :; \
	git tag -s -m "$$utag tarball from upstream" upstream/$$utag; \
	git checkout $$dbranch; \
	git debrebase new-upstream $$utag upstream/$$utag; \
	git debrebase conclude