Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 #export DH_VERBOSE=1
4
5 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
6 export DEB_CFLAGS_MAINT_APPEND = -DNO_SSLv2
7
8 DPKG_EXPORT_BUILDFLAGS = 1
9 include /usr/share/dpkg/buildflags.mk
10
11 DEB_BUILD_DIR=build
12 UDEB_BUILD_DIR=build-udeb
13
14 ifeq ($(filter noudeb,$(DEB_BUILD_PROFILES)),)
15 BUILD_UDEB=1
16 else
17 BUILD_UDEB=0
18 endif
19
20 # autoreconf reports some error, so disabled
21 %:
22 dh $@ --without autoreconf --builddir=$(DEB_BUILD_DIR)
23
24 override_dh_auto_clean:
25 -dh_auto_clean
26 -dh_auto_clean -B$(UDEB_BUILD_DIR)
27 rm -f po/*.gmo po/wget.pot po/[email protected] po/[email protected] \
28 doc/wget.inf* doc/version.texi
29 rm -rf config.sub config.guess $(UDEB_BUILD_DIR) $(DEB_BUILD_DIR)
30
31 override_dh_auto_configure:
32 @echo "d/rules: running configure for wget"
33 dh_auto_configure -- \
34 --enable-ipv6 \
35 --with-ssl \
36 --with-libidn
37 ifeq ($(BUILD_UDEB),1)
38 @echo "d/rules: will configure and build binary package wget-udeb"
39 @echo "d/rules: running configure for wget-udeb"
40 DEB_CFLAGS_MAINT_APPEND="${DEB_CFLAGS_MAINT_APPEND} -Os" dh_auto_configure -B$(UDEB_BUILD_DIR) --reload-all-buildenv-variables -- \
41 --enable-ipv6 \
42 --with-ssl=openssl \
43 --without-libpsl \
44 --disable-debug \
45 --disable-nls \
46 --disable-iri
47 endif
48
49 override_dh_auto_build:
50 @echo "d/rules: building for wget"
51 dh_auto_build
52 cd build/po; make wget.pot
53 ifeq ($(BUILD_UDEB),1)
54 @echo "d/rules: building for wget-udeb"
55 dh_auto_build -B$(UDEB_BUILD_DIR)
56 endif
57
58 override_dh_auto_test:
59 ifeq ($(filter nocheck,$(DEB_BUILD_PROFILES)),)
60 @echo "d/rules: running tests for wget"
61 dh_auto_test
62 ifeq ($(BUILD_UDEB),1)
63 @echo "d/rules: running tests for wget-udeb"
64 dh_auto_test -B$(UDEB_BUILD_DIR)
65 endif
66 endif