File: rules

package info (click to toggle)
libidn2 2.3.8-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,768 kB
  • sloc: ansic: 6,049; sh: 1,480; makefile: 499; xml: 50; perl: 15
file content (43 lines) | stat: -rwxr-xr-x 1,411 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
#! /usr/bin/make -f

include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/pkg-info.mk
include /usr/share/gnulib/debian/gnulib-dpkg.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DOPACKAGES = $(shell dh_listpackages)

%:
	dh $@ --without autoreconf --builddirectory=build \
		-O--dbgsym-migration="libidn2-0-dbg (<< 2.0.2-1~)" -X.la

pull: dh_gnulib_clone
	./bootstrap --gnulib-srcdir=$(GNULIB_DEB_DEBIAN_GNULIB) --pull --skip-po

dh_gnulib_patch: pull

gen: dh_gnulib_patch
	./bootstrap --gnulib-srcdir=$(GNULIB_DEB_DEBIAN_GNULIB) --gen

execute_before_dh_auto_configure: gen
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
	dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_configure --reload-all-buildenv-variables --builddirectory=build-native -- --disable-gtk-doc
	dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_build --builddirectory=build-native
	mkdir -p build/lib build/doc
	cp build-native/lib/data.c build-native/lib/tr46map_data.c build/lib/
	cp build-native/doc/idn2.1 build-native/doc/idn2-help.texi build/doc/
endif

CONFIGURE_FLAGS = \
	--disable-rpath \
	--with-packager=Debian \
	--with-packager-bug-reports=https://bugs.debian.org/ \
	--with-packager-version="$(DEB_VERSION)"
ifneq ($(filter libidn2-doc,$(DOPACKAGES)),)
CONFIGURE_FLAGS += --enable-gtk-doc
else
CONFIGURE_FLAGS += --disable-gtk-doc
endif

override_dh_auto_configure:
	dh_auto_configure -- $(CONFIGURE_FLAGS)