File: rules

package info (click to toggle)
libidn 1.33-2.2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 16,708 kB
  • sloc: ansic: 61,273; java: 13,782; sh: 13,737; cs: 1,974; perl: 1,254; makefile: 443; lisp: 231; php: 214; sed: 16; python: 9
file content (46 lines) | stat: -rwxr-xr-x 1,425 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
#!/usr/bin/make -f

export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

DOPACKAGES = $(shell dh_listpackages)
CONFIGURE_FLAGS :=
ifneq ($(filter libidn11-java,$(DOPACKAGES)),)
CONFIGURE_FLAGS += --enable-java
else
CONFIGURE_FLAGS += --disable-java
endif

ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
export HELP2MAN=true
endif

%:
	dh $@ --parallel --builddirectory=build --with autoreconf

CFG_VERS = `dpkg-parsechangelog | grep ^Version: | cut -d\  -f2`

override_dh_auto_configure:
	dh_auto_configure -- --with-packager=Debian \
		--with-packager-version=$(CFG_VERS) \
		--with-packager-bug-reports=https://bugs.debian.org/ \
		--disable-silent-rules \
		$(CONFIGURE_FLAGS)

override_dh_auto_install:
	dh_auto_install
# Move the library from /usr/lib to /lib
# This library is used by /bin/ping and is planned to be used for systemd-resolved
	mkdir -p debian/tmp/lib/$(DEB_HOST_MULTIARCH)/
	mv debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libidn.so.* debian/tmp/lib/$(DEB_HOST_MULTIARCH)/
	rm -f debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libidn.so
	ln -s /lib/$(DEB_HOST_MULTIARCH)/libidn.so.11 debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libidn.so

override_dh_install:
	dh_install
	rm -f debian/libidn11-java/usr/share/doc/libidn11-java/api/package-list
ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
	mkdir -p debian/tmp/usr/share/man/man1/
	cp -fv doc/idn.1 debian/tmp/usr/share/man/man1/idn.1
endif