Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | DESCRIPTION = "IPsec-Tools is a port of KAME's IPsec utilities to the \ |
| 2 | Linux-2.6 IPsec implementation." |
| 3 | HOMEPAGE = "http://ipsec-tools.sourceforge.net/" |
| 4 | SECTION = "net" |
| 5 | LICENSE = "BSD" |
| 6 | LIC_FILES_CHKSUM = "file://src/libipsec/pfkey.c;beginline=6;endline=31;md5=bc9b7ff40beff19fe6bc6aef26bd2b24" |
| 7 | |
| 8 | DEPENDS = "virtual/kernel openssl readline flex-native bison-native" |
| 9 | |
| 10 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 11 | |
Brad Bishop | 7f28bc5 | 2017-12-03 23:42:40 -0500 | [diff] [blame] | 12 | SRC_URI = "http://ftp.netbsd.org/pub/NetBSD/misc/ipsec-tools/0.8/ipsec-tools-${PV}.tar.bz2 \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 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 \ |
Brad Bishop | 7f28bc5 | 2017-12-03 23:42:40 -0500 | [diff] [blame] | 24 | file://0001-Fix-build-with-clang.patch \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 25 | " |
| 26 | SRC_URI[md5sum] = "d53ec14a0a3ece64e09e5e34b3350b41" |
| 27 | SRC_URI[sha256sum] = "8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d" |
| 28 | |
| 29 | inherit 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 | # |
| 56 | EXTRA_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 Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 65 | ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '--enable-ipv6=yes', '', d)}" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 66 | |
| 67 | # See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530527 |
| 68 | CFLAGS += "-fno-strict-aliasing" |
| 69 | |
| 70 | PACKAGECONFIG ??= "" |
| 71 | PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam," |
| 72 | PACKAGECONFIG[selinux] = "--enable-security-context,--disable-security-context,libselinux," |
| 73 | |
| 74 | SYSTEMD_SERVICE_${PN} = "racoon.service" |
| 75 | |
| 76 | do_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 | |
| 92 | FILES_${PN} += "${sysconfdir}/racoon/racoon.conf \ |
| 93 | ${sysconfdir}/default/racoon" |