File: rules

package info (click to toggle)
wget2 2.2.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 22,296 kB
  • sloc: ansic: 121,144; sh: 11,559; makefile: 878; xml: 182; sed: 16
file content (72 lines) | stat: -rwxr-xr-x 1,914 bytes parent folder | download | duplicates (2)
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
65
66
67
68
69
70
71
72
#!/usr/bin/make -f

# DH_VERBOSE := 1

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

DPKG_EXPORT_BUILDFLAGS := 1
include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/pkg-info.mk

ifeq (, $(filter nocheck, ${DEB_BUILD_OPTIONS}))
# get the current IP address status of the loopback device
ip_desc := $(shell inetutils-ifconfig --format=unix lo)
else
ip_desc := inet 127.0.0.1
endif

# reset these env, or some tests would fail due if libproxy picks them up
export https_proxy :=
export http_proxy :=
export all_proxy :=

ENABLE_LIBPROXY = --enable-libproxy
ifneq (, $(filter $(DEB_HOST_ARCH), sparc64))
ENABLE_LIBPROXY =
endif

%:
	dh $@

override_dh_auto_clean:
	if [ -f Makefile ] ; then dh_auto_clean ; fi
	if [ -d debian/tmp_save_gmo ] ; then mv debian/tmp_save_gmo/*.gmo po ; rmdir debian/tmp_save_gmo ; fi

override_dh_clean:
	dh_clean
	rm -rf build-aux
	rm -rf docs/html
	find . -name Makefile.in -delete
	if [ -d lib.bak ] ; then rm -rf lib; mv lib.bak lib ; fi

execute_before_dh_autoreconf:
	cp -a lib lib.bak
# The original upstream tarball needs bootstrap to initialize gnulib
#	./bootstrap --no-git --gnulib-srcdir=/usr/share/gnulib

override_dh_auto_configure:
	mkdir debian/tmp_save_gmo
	cp -a po/*.gmo debian/tmp_save_gmo
	dh_auto_configure -- --enable-fsanitize-ubsan=no \
	 --with-lzma --with-bzip2 \
	 --without-libhsts \
	 $(ENABLE_LIBPROXY) --enable-year2038

override_dh_auto_build:
	DEB_VERSION=$(DEB_VERSION) dh_auto_build

override_dh_auto_test:
ifeq (, $(filter nocheck, $(DEB_BUILD_OPTIONS)))
ifeq (, $(findstring inet 127.0.0.1, $(ip_desc)))
	$(warning Do not run the test suite because it fails on IPv6-only hosts.)
else
ifneq (, $(filter $(DEB_HOST_ARCH), hurd-amd64))
# some different flaky tests in different versions, annoying but still meaningful
	-dh_auto_test
else
# run tests normally
	dh_auto_test
endif
endif
endif