blob: bf89927528d9eebf2d1b7f1b484e5962d7e8c932 [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
Brad Bishop7f28bc52017-12-03 23:42:40 -050012SRC_URI = "http://ftp.netbsd.org/pub/NetBSD/misc/ipsec-tools/0.8/ipsec-tools-${PV}.tar.bz2 \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050013 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 \
Brad Bishop7f28bc52017-12-03 23:42:40 -050024 file://0001-Fix-build-with-clang.patch \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050025 "
26SRC_URI[md5sum] = "d53ec14a0a3ece64e09e5e34b3350b41"
27SRC_URI[sha256sum] = "8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d"
28
29inherit autotools systemd
30
31# Options:
32# --enable-adminport enable admin port
33# --enable-rc5 enable RC5 encryption (patented)
34# --enable-idea enable IDEA encryption (patented)
35# --enable-gssapi enable GSS-API authentication
36# --enable-hybrid enable hybrid, both mode-cfg and xauth support
37# --enable-frag enable IKE fragmentation payload support
38# --enable-stats enable statistics logging function
39# --enable-dpd enable dead peer detection
40# --enable-samode-unspec enable to use unspecified a mode of SA
41# --disable-ipv6 disable ipv6 support
42# --enable-natt enable NAT-Traversal (yes/no/kernel)
43# --enable-natt-versions=list list of supported NAT-T versions delimited by coma.
44# --with-kernel-headers=/lib/modules/<uname>/build/include
45# where your Linux Kernel headers are installed
46# --with-readline support readline input (yes by default)
47# --with-flex use directiory (default: no)
48# --with-flexlib=<LIB> specify flex library.
49# --with-openssl=DIR specify OpenSSL directory
50# --with-libradius=DIR specify libradius path (like/usr/pkg)
51# --with-libpam=DIR specify libpam path (like/usr/pkg)
52#
53# Note: if you give it the actual kernel headers it won't build, it actually
54# needs to point at the linux-libc-headers version of the kernel headers.
55#
56EXTRA_OECONF = "--with-kernel-headers=${STAGING_INCDIR} \
57 --with-readline \
58 --with-openssl=${STAGING_LIBDIR}/.. \
59 --without-libradius \
60 --disable-security-context \
61 --enable-shared \
62 --enable-dpd \
63 --enable-natt=yes \
64 --sysconfdir=${sysconfdir}/racoon \
Patrick Williamsddad1a12017-02-23 20:36:32 -060065 ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '--enable-ipv6=yes', '', d)}"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050066
67# See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530527
68CFLAGS += "-fno-strict-aliasing"
69
70PACKAGECONFIG ??= ""
71PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam,"
72PACKAGECONFIG[selinux] = "--enable-security-context,--disable-security-context,libselinux,"
73
74SYSTEMD_SERVICE_${PN} = "racoon.service"
75
76do_install_append() {
77 install -d ${D}${sysconfdir}/racoon
78 install -m 0644 ${WORKDIR}/racoon.conf.sample ${D}${sysconfdir}/racoon/racoon.conf
79
80 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
81 install -d ${D}${systemd_unitdir}/system
82 install -m 0644 ${WORKDIR}/racoon.service ${D}${systemd_unitdir}/system
83
84 sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/racoon.service
85 sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/racoon.service
86
87 install -d ${D}${sysconfdir}/default/
88 install -m 0644 ${WORKDIR}/racoon.conf ${D}${sysconfdir}/default/racoon
89 fi
90}
91
92FILES_${PN} += "${sysconfdir}/racoon/racoon.conf \
93 ${sysconfdir}/default/racoon"