aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb')
-rw-r--r--meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb22
1 files changed, 21 insertions, 1 deletions
diff --git a/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb b/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb
index 8cc55ef8a3..9704b138c7 100644
--- a/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb
+++ b/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb
@@ -15,11 +15,14 @@ SRC_URI = "ftp://ftp.netbsd.org/pub/NetBSD/misc/ipsec-tools/0.8/ipsec-tools-${PV
file://racoon-check-invalid-ivm.patch \
file://glibc-2.20.patch \
file://racoon-Resend-UPDATE-message-when-received-EINTR-message.patch \
+ file://racoon.conf.sample \
+ file://racoon.conf \
+ file://racoon.service \
"
SRC_URI[md5sum] = "d53ec14a0a3ece64e09e5e34b3350b41"
SRC_URI[sha256sum] = "8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d"
-inherit autotools
+inherit autotools systemd
# Options:
# --enable-adminport enable admin port
@@ -54,6 +57,7 @@ EXTRA_OECONF = "--with-kernel-headers=${STAGING_INCDIR} \
--enable-shared \
--enable-dpd \
--enable-natt=yes \
+ --sysconfdir=${sysconfdir}/racoon \
${@base_contains('DISTRO_FEATURES', 'ipv6', '--enable-ipv6=yes', '', d)}"
# See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530527
@@ -62,3 +66,19 @@ CFLAGS += "-fno-strict-aliasing"
PACKAGECONFIG ??= ""
PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam,"
PACKAGECONFIG[selinux] = "--enable-security-context,--disable-security-context,libselinux,"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/racoon
+ install -m 0644 ${WORKDIR}/racoon.conf.sample ${D}${sysconfdir}/racoon/racoon.conf
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/racoon.service ${D}${systemd_unitdir}/system
+
+ sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/racoon.service
+ sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/racoon.service
+
+ install -d ${D}${sysconfdir}/default/
+ install -m 0644 ${WORKDIR}/racoon.conf ${D}${sysconfdir}/default/racoon
+ fi
+}