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 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
|
#!/usr/bin/make -f
export DH_OPTIONS
# These are used for cross-compiling and for saving the configure script
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
#NAT-T=--enable-natt
#
#ifeq '$(DEB_HOST_ARCH)' 'kfreebsd-amd64'
#NAT-T=
#endif
#ifeq '$(DEB_HOST_ARCH)' 'kfreebsd-i386'
#NAT-T=
#endif
%:
dh $@ --with autoreconf
patch:
quilt push -a
unpatch:
quilt pop -a
override_dh_auto_configure:
CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS)" \
./configure --verbose \
--host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr \
--sysconfdir=/etc/racoon \
--libdir=/usr/lib/ipsec-tools \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info \
--localstatedir=/var/run \
--enable-shared \
--disable-static \
--enable-frag \
--enable-gssapi \
--enable-hybrid \
--with-libldap \
--enable-dpd \
--enable-adminport \
--with-kernel-headers=/usr/include \
--with-libpam \
--without-readline \
--disable-security-context \
--enable-natt
override_dh_clean:
dh_testdir
dh_auto_clean
dh_clean
# Remove this after make clean as it upsets git-buildpackage
# make clean will invoke configure!!
- rm -f config.log
override_dh_install:
dh_install
mkdir -p debian/racoon/var/lib/racoon
install -m 755 -o root -g root debian/racoon-tool.pl \
debian/racoon/usr/sbin/racoon-tool
install -D -m 600 -o root -g root src/racoon/samples/psk.txt.sample \
debian/racoon/etc/racoon/psk.txt
install -m 644 -o root -g root debian/racoon-tool.conf \
debian/racoon/etc/racoon
install -m 644 -o root -g root debian/racoon.conf \
debian/racoon/etc/racoon/racoon.conf
mkdir -p debian/ipsec-tools/etc
install -m 755 -o root -g root debian/ipsec-tools.conf \
debian/ipsec-tools/etc/ipsec-tools.conf
override_dh_installchangelogs:
dh_installchangelogs ChangeLog
override_dh_installexamples:
dh_installexamples -pracoon -X.in src/racoon/samples
dh_installexamples
override_dh_installinit:
dh_installinit -R -pracoon -- start 40 S . stop 07 0 1 6 .
dh_installinit -R -pipsec-tools --name=setkey --no-start -- start 14 S .
dh_systemd_enable -pracoon
override_dh_installman:
dh_installman
dh_installman -pracoon debian/racoon-tool.8 debian/racoon-tool.conf.5
override_dh_makeshlibs:
dh_makeshlibs -n
|