File: rules

package info (click to toggle)
libidn 1.33-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 16,528 kB
  • ctags: 5,622
  • sloc: ansic: 61,267; java: 13,782; sh: 13,737; cs: 1,974; perl: 1,254; makefile: 438; lisp: 231; php: 214; sed: 16; python: 9
file content (42 lines) | stat: -rwxr-xr-x 1,482 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
#!/usr/bin/make -f

export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

# Don't build libidn11-java on platforms that doesn't have gcj.
NO_JAVA_ARCHES := arm hppa hurd-i386 mips64el or1k
DEB_HOST_ARCH  ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
ifneq (,$(filter stage1,$(DEB_BUILD_PROFILES)))
  # Or when bootstrapping, because libidn is needed before gcj, see #738147.
  export DH_OPTIONS=-Nlibidn11-java
else ifeq (,$(filter $(DEB_HOST_ARCH),$(NO_JAVA_ARCHES)))
  ENABLE_JAVA := --enable-java
else
  export DH_OPTIONS=-Nlibidn11-java
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 \
		 $(ENABLE_JAVA)

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