blob: d257207b7fff8234a8d048e770bf2dfe2d4e78e9 (
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
|
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
include /usr/share/dpkg/default.mk
export CFLAGS += $(shell getconf LFS_CFLAGS)
export LDFLAGS += $(shell getconf LFS_LDFLAGS)
PREFIX_IPV4 = $(CURDIR)/debian/ucspi-tcp
PREFIX_IPV6 = $(CURDIR)/debian/ucspi-tcp-ipv6
%:
dh $@
override_dh_auto_configure:
mkdir ipv6
xargs install -t ipv6 < FILES
cd ipv6 && patch -p1 < ../debian/ipv6-support.patch
echo '/usr' | tee conf-home ipv6/conf-home
echo '$(CC) $(CFLAGS) $(CPPFLAGS)' | tee ipv6/conf-cc conf-cc
echo '$(CC) $(LDFLAGS)' | tee ipv6/conf-ld conf-ld
override_dh_auto_build:
$(MAKE) DESTDIR=$(PREFIX_IPV4)
$(MAKE) -C ipv6 DESTDIR=$(PREFIX_IPV6)
override_dh_auto_install:
mkdir -p $(PREFIX_IPV4)/usr $(PREFIX_IPV6)/usr
./install
./instcheck
cd ipv6 && ./install && ./instcheck
# ./install incorrectly install manpages under /usr/man, not
# /usr/share/man.
rm -r $(PREFIX_IPV6)/usr/man
# Upstream does strange thing -- its test suite assumes that programs
# are already installed. Normally, checks are performed between `build'
# and `install'.
#
# So automatic invocation of tests is inhibited, and they are invoked
# manuall at `install' stage.
override_dh_auto_test:
|