File: rules

package info (click to toggle)
libmaus2 2.0.768%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 17,940 kB
  • sloc: cpp: 286,279; sh: 2,978; makefile: 2,624; ansic: 1,303
file content (50 lines) | stat: -rwxr-xr-x 1,615 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
#!/usr/bin/make -f

# DH_VERBOSE := 1
export LC_ALL=C.UTF-8
BUILT_USING_SECRECY = $(shell \
	dpkg-query \
		-f '$${source:Package} (= $${source:Version}), ' \
		-W 'libsecrecy-dev' \
)

# include /usr/share/dpkg/default.mk

# for hardening you might like to uncomment this:
# export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@

override_dh_install:
	dh_install
	# following override suggestion from suggestion of Andreas to Michael
	# to overcome d-shlibmove bug on Jan 4, 2019
	d-shlibmove --commit \
		    --multiarch \
		    --devunversioned \
		    --exclude-la \
	            --override s/libdeflate0-dev/libdeflate-dev/ \
	            --override s/libmaus2_.*-dev/libmaus2-dev/ \
		    --override 's/libnettle.*-dev/nettle-dev/' \
		    --movedev debian/tmp/usr/include/* usr/include \
		    --movedev "debian/tmp/usr/lib/*/pkgconfig/*.pc" usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \
		    debian/tmp/usr/lib/*/*.so
	# Remove unneeded options from *.pc files
	find debian -name "*.pc" -exec sed -i -e 's/-Wdate-time *//' -e 's/-D_FORTIFY_SOURCE=2 *//' \{\} \;
	# avoid noise from dh-missing by deleting unneeded files
	find debian/tmp -type f -name "*.la" -delete
	# Changelog is installed via dh_installchangelogs
	rm -f debian/tmp/usr/share/doc/libmaus2/changelog.gz

override_dh_installchangelogs:
	dh_installchangelogs ChangeLog

override_dh_gencontrol:
	dh_gencontrol -- -Vlibsecrecy:Built-Using="$(BUILT_USING_SECRECY)"

### When overriding auto_test make sure DEB_BUILD_OPTIONS will be respected
#override_dh_auto_test:
#ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
#	do_stuff_for_testing
#endif