File: rules

package info (click to toggle)
links2 2.14-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 27,616 kB
  • ctags: 11,599
  • sloc: ansic: 178,441; sh: 2,496; cpp: 588; makefile: 66; awk: 49; perl: 34
file content (45 lines) | stat: -rwxr-xr-x 1,293 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
44
45
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# configure seem to fail to add this since 2.9
export DEB_LDFLAGS_MAINT_APPEND=-lpthread
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

BUILT_USING=$(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W publicsuffix)

%:
	dh $@ --parallel --with autotools-dev

override_dh_auto_configure:
	dh_auto_configure -- \
		--enable-graphics \
		--with-x \
		--with-fb

override_dh_auto_install:
	dh_auto_install
	# rename links.1 and links to links2.1 and links2
	mv $(CURDIR)/debian/tmp/usr/bin/links \
           $(CURDIR)/debian/tmp/usr/bin/links2
	mv $(CURDIR)/debian/tmp/usr/share/man/man1/links.1 \
           $(CURDIR)/debian/tmp/usr/share/man/man1/links2.1

#	build the textmode only version
	dh_auto_configure -- \
		--without-libevent \
		--without-svgalib \
		--without-x --without-fb \
		--without-directfb \
		--without-libjpeg \
		--without-librsvg \
		--without-libtiff
	dh_auto_install
	# Fix "links2" occurrences in links' man-page, see #602228
	sed -z \
	    -e 's/\([^.]\)\(links\)2/\1\2/gi;s/\\f3-g\\f1.*\\f3-force-html\\f1/\\f3-force-html\\f1/' \
	    -i $(CURDIR)/debian/tmp/usr/share/man/man1/links.1

override_dh_gencontrol:
	dh_gencontrol -a -- -VBuilt-Using="$(BUILT_USING)"