blob: 446697447bf7f8b4cbf0fe8bff5ddaacfc55932d [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001DESCRIPTION = "IPsec-Tools is a port of KAME's IPsec utilities to the \
2Linux-2.6 IPsec implementation."
3HOMEPAGE = "http://ipsec-tools.sourceforge.net/"
4SECTION = "net"
5LICENSE = "BSD"
6LIC_FILES_CHKSUM = "file://src/libipsec/pfkey.c;beginline=6;endline=31;md5=bc9b7ff40beff19fe6bc6aef26bd2b24"
7
8DEPENDS = "virtual/kernel openssl readline flex-native bison-native"
9
10PACKAGE_ARCH = "${MACHINE_ARCH}"
11
12SRC_URI = "ftp://ftp.netbsd.org/pub/NetBSD/misc/ipsec-tools/0.8/ipsec-tools-${PV}.tar.bz2 \
13 file://0002-Don-t-link-against-libfl.patch \
14 file://configure.patch \
15 file://0001-racoon-pfkey-avoid-potential-null-pointer-dereferenc.patch \
16 file://racoon-check-invalid-pointers.patch \
17 file://racoon-check-invalid-ivm.patch \
18 file://glibc-2.20.patch \
19 file://racoon-Resend-UPDATE-message-when-received-EINTR-message.patch \
20 file://racoon.conf.sample \
21 file://racoon.conf \
22 file://racoon.service \
23 file://fix-CVE-2015-4047.patch \
24 "
25SRC_URI[md5sum] = "d53ec14a0a3ece64e09e5e34b3350b41"
26SRC_URI[sha256sum] = "8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d"
27
28inherit autotools systemd
29
30# Options:
31# --enable-adminport enable admin port
32# --enable-rc5 enable RC5 encryption (patented)
33# --enable-idea enable IDEA encryption (patented)
34# --enable-gssapi enable GSS-API authentication
35# --enable-hybrid enable hybrid, both mode-cfg and xauth support
36# --enable-frag enable IKE fragmentation payload support
37# --enable-stats enable statistics logging function
38# --enable-dpd enable dead peer detection
39# --enable-samode-unspec enable to use unspecified a mode of SA
40# --disable-ipv6 disable ipv6 support
41# --enable-natt enable NAT-Traversal (yes/no/kernel)
42# --enable-natt-versions=list list of supported NAT-T versions delimited by coma.
43# --with-kernel-headers=/lib/modules/<uname>/build/include
44# where your Linux Kernel headers are installed
45# --with-readline support readline input (yes by default)
46# --with-flex use directiory (default: no)
47# --with-flexlib=<LIB> specify flex library.
48# --with-openssl=DIR specify OpenSSL directory
49# --with-libradius=DIR specify libradius path (like/usr/pkg)
50# --with-libpam=DIR specify libpam path (like/usr/pkg)
51#
52# Note: if you give it the actual kernel headers it won't build, it actually
53# needs to point at the linux-libc-headers version of the kernel headers.
54#
55EXTRA_OECONF = "--with-kernel-headers=${STAGING_INCDIR} \
56 --with-readline \
57 --with-openssl=${STAGING_LIBDIR}/.. \
58 --without-libradius \
59 --disable-security-context \
60 --enable-shared \
61 --enable-dpd \
62 --enable-natt=yes \
63 --sysconfdir=${sysconfdir}/racoon \
Patrick Williamsddad1a12017-02-23 20:36:32 -060064 ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '--enable-ipv6=yes', '', d)}"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050065
66# See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530527
67CFLAGS += "-fno-strict-aliasing"
68
69PACKAGECONFIG ??= ""
70PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam,"
71PACKAGECONFIG[selinux] = "--enable-security-context,--disable-security-context,libselinux,"
72
73SYSTEMD_SERVICE_${PN} = "racoon.service"
74
75do_install_append() {
76 install -d ${D}${sysconfdir}/racoon
77 install -m 0644 ${WORKDIR}/racoon.conf.sample ${D}${sysconfdir}/racoon/racoon.conf
78
79 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
80 install -d ${D}${systemd_unitdir}/system
81 install -m 0644 ${WORKDIR}/racoon.service ${D}${systemd_unitdir}/system
82
83 sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/racoon.service
84 sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/racoon.service
85
86 install -d ${D}${sysconfdir}/default/
87 install -m 0644 ${WORKDIR}/racoon.conf ${D}${sysconfdir}/default/racoon
88 fi
89}
90
91FILES_${PN} += "${sysconfdir}/racoon/racoon.conf \
92 ${sysconfdir}/default/racoon"