File: rules

package info (click to toggle)
gdk-pixbuf 2.38.1+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 25,316 kB
  • sloc: ansic: 32,004; xml: 488; python: 76; sh: 60; perl: 56; makefile: 47; sed: 16
file content (64 lines) | stat: -rwxr-xr-x 2,352 bytes parent folder | download
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
#!/usr/bin/make -f

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

include /usr/share/dpkg/architecture.mk

%:
	dh $@ --with gir,gnome

override_dh_auto_configure:
	dh_auto_configure -- \
		-Ddocs=true \
		-Dinstalled_tests=false

# temporary directory for the minimal MIME cache generation
mimedir := debian/build-mime
mimexml := /usr/share/mime/packages/freedesktop.org.xml

infiles := \
	libgdk-pixbuf2.0-0.triggers \
	libgdk-pixbuf2.0-0.postinst \
	libgdk-pixbuf2.0-0.postrm

override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
	# on slow arches the "slow" tests take longer than the timeout allowed
	# by upstream; allow even more time (-t is a multipiler)
	meson test --print-errorlogs -C $(CURDIR)/obj-$(DEB_HOST_GNU_TYPE) -t 5
endif

override_dh_install:
	find $(CURDIR)/debian/tmp -name *.la -print -delete
	dh_install --fail-missing
	# process .in files
	set -e; for file in $(infiles); do \
		sed -e"s/#MULTIARCH#/$(DEB_HOST_MULTIARCH)/g" \
			debian/$${file}.in > debian/$$file; \
	done
	# generate a minimal MIME cache for the udeb
	mkdir -p $(mimedir)/packages
	[ -f $(mimexml) ]
	xsltproc -nonet debian/keep-png-only.xsl $(mimexml) \
		> $(mimedir)/packages/png.freedesktop.org.xml
	update-mime-database $(mimedir)
	install -m 0644 -D $(mimedir)/mime.cache debian/libgdk-pixbuf2.0-0-udeb/usr/share/mime/mime.cache
	# generate a loaders cache for the udeb
	mkdir -p debian/libgdk-pixbuf2.0-0-udeb/usr/lib/$(DEB_HOST_MULTIARCH)/gdk-pixbuf-2.0/2.10.0
	LD_LIBRARY_PATH=debian/libgdk-pixbuf2.0-0-udeb/usr/lib:$(LD_LIBRARY_PATH) \
		debian/libgdk-pixbuf2.0-0/usr/lib/$(DEB_HOST_MULTIARCH)/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \
		debian/libgdk-pixbuf2.0-0-udeb/usr/lib/$(DEB_HOST_MULTIARCH)/gdk-pixbuf-2.0/2.10.0/loaders/*.so \
		| sed 's;$(CURDIR)/debian/libgdk-pixbuf2.0-0-udeb;;g' \
		> debian/libgdk-pixbuf2.0-0-udeb/usr/lib/$(DEB_HOST_MULTIARCH)/gdk-pixbuf-2.0/2.10.0/loaders.cache
	chmod 0644 debian/libgdk-pixbuf2.0-0-udeb/usr/lib/$(DEB_HOST_MULTIARCH)/gdk-pixbuf-2.0/2.10.0/loaders.cache

override_dh_makeshlibs:
	dh_makeshlibs --add-udeb=libgdk-pixbuf2.0-0-udeb -X "/usr/lib/$(DEB_HOST_MULTIARCH)/gdk-pixbuf-2.0" -V -- -c4

override_dh_clean:
	dh_clean
	set -e; for file in $(infiles); do \
		rm -f debian/$$file; \
	done
	rm -rf $(mimedir)