Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5
6 include /usr/share/dpkg/architecture.mk
7
8 # configure seem to fail to add this since 2.9
9 export DEB_LDFLAGS_MAINT_APPEND=-lpthread
10 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
11
12 BUILT_USING=$(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W publicsuffix)
13
14 ifeq ($(origin CC),default)
15 export CC := $(DEB_HOST_GNU_TYPE)-gcc
16 endif
17
18 %:
19 dh $@
20
21 override_dh_auto_configure:
22 # build the full-featured version
23 env PKG_CONFIG=`which pkg-config` dh_auto_configure -Bbuild-links2 -- \
24 --enable-graphics \
25 --with-x \
26 --without-fb
27
28 # build the textmode only version
29 env PKG_CONFIG=`which pkg-config` dh_auto_configure -Bbuild-links -- \
30 --without-libevent \
31 --without-svgalib \
32 --without-x --without-fb \
33 --without-directfb \
34 --without-libjpeg \
35 --without-librsvg \
36 --without-libtiff \
37 --without-libavif \
38 --without-libwebp
39
40 override_dh_auto_install:
41 dh_auto_install -Bbuild-links2
42 # rename links.1 and links to links2.1 and links2
43 mv $(CURDIR)/debian/tmp/usr/bin/links \
44 $(CURDIR)/debian/tmp/usr/bin/links2
45 mv $(CURDIR)/debian/tmp/usr/share/man/man1/links.1 \
46 $(CURDIR)/debian/tmp/usr/share/man/man1/links2.1
47
48 dh_auto_install -Bbuild-links
49 # Fix "links2" occurrences in links' man-page, see #602228
50 sed -z \
51 -e 's/\([^.]\)\(links\)2/\1\2/gi;s/\\f3-g\\f1.*\\f3-force-html\\f1/\\f3-force-html\\f1/' \
52 -i $(CURDIR)/debian/tmp/usr/share/man/man1/links.1
53
54 override_dh_gencontrol:
55 dh_gencontrol -a -- -VBuilt-Using="$(BUILT_USING)"