summaryrefslogtreecommitdiffstats
path: root/debian/rules
blob: 7e4ca2261c56e8939302a78194b472755e94344c (plain)
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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND := -Wall -DNO_BUILDSTAMP

SSL=gnu
# uncomment the next line if you want openssl version
#SSL=ssl

ifeq ($(SSL),gnu)
	CONFTLS := --with-gnutls=/usr
else
	CONFTLS := --with-ssl
endif

# Ensure the most compatible helper program paths to work on both
# usrmerge and non-usrmerge systems.
BINARY_PATHS += GZIP=/bin/gzip
BINARY_PATHS += UNCOMPRESS=/bin/gunzip
BINARY_PATHS += MV=/bin/mv
BINARY_PATHS += ZCAT=/bin/zcat
BINARY_PATHS += TAR=/bin/tar
BINARY_PATHS += RM=/bin/rm

override_dh_auto_configure:
ifeq ($(SSL),gnu)
	sed -i -e s/libssl-dev/libgnutls28-dev/g debian/control
else
	sed -i -e s/libgnutls28-dev/libssl-dev/g debian/control
endif

	env cf_cv_SYSTEM_MAIL=/usr/sbin/sendmail \
	COMPRESS=/usr/bin/compress BZIP2=/bin/bzip2 UNZIP=/usr/bin/unzip \
	ZIP=/usr/bin/zip \
	LIBS="-lbsd" \
	DH_COMPAT=10 dh_auto_configure --verbose -- \
	--sysconfdir=/etc/lynx \
	--enable-8bit-toupper --enable-externs --enable-debug \
	--enable-nsl-fork --enable-cgi-links --enable-exec-links \
	--enable-exec-scripts --enable-persistent-cookies --enable-nls \
	--enable-gzip-help --enable-prettysrc --enable-source-cache \
	--enable-cjk --enable-default-colors --enable-nested-tables \
	--enable-japanese-utf8 --enable-ipv6 --enable-htmlized-cfg \
        --enable-forms-options --enable-justify-elts --enable-partial \
        --enable-read-eta --enable-scrollbar --enable-syslog \
	--with-zlib --with-bzlib --without-included-gettext \
	--with-screen=ncursesw --enable-justify-elts \
	$(BINARY_PATHS) \
	$(CONFTLS)

override_dh_autoreconf:
	dh_autoreconf autoreconf-dickey -- -f -i

override_dh_auto_install:
	dh_auto_install --verbose -- install-full
	cd debian/tmp/usr/share/lynx_help && rm -vf COPYING COPYHEADER
	cd debian/tmp/usr/share/lynx_doc && rm -rvf CHANGES \
		COPYHEADER.asc COPYING COPYING.asc samples test

override_dh_link:
	rm -fv debian/lynx/usr/share/doc/lynx/changelog
	dh_link

%:
	dh $@