summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/openvpn/openvpn_2.4.2.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-support/openvpn/openvpn_2.4.2.bb')
-rw-r--r--meta-networking/recipes-support/openvpn/openvpn_2.4.2.bb67
1 files changed, 67 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/openvpn/openvpn_2.4.2.bb b/meta-networking/recipes-support/openvpn/openvpn_2.4.2.bb
new file mode 100644
index 0000000000..ae72671448
--- /dev/null
+++ b/meta-networking/recipes-support/openvpn/openvpn_2.4.2.bb
@@ -0,0 +1,67 @@
1SUMMARY = "A full-featured SSL VPN solution via tun device."
2HOMEPAGE = "http://openvpn.sourceforge.net"
3SECTION = "net"
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://COPYING;md5=e9b64491ec98eb6c6493ac5e4118f107"
6DEPENDS = "lzo openssl iproute2 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
7
8inherit autotools systemd
9
10SRC_URI = "http://swupdate.openvpn.org/community/releases/openvpn-${PV}.tar.gz \
11 file://openvpn \
12 file://openvpn@.service \
13 file://openvpn-volatile.conf"
14
15SRC_URI[md5sum] = "0714019e109a043e858278c9e2ca18e0"
16SRC_URI[sha256sum] = "b24740c9d44a81eaf2befc4846d51445a520104321e32aaf0c135ed2e098a624"
17
18SYSTEMD_SERVICE_${PN} += "openvpn@loopback-server.service openvpn@loopback-client.service"
19SYSTEMD_AUTO_ENABLE = "disable"
20
21CFLAGS += "-fno-inline"
22
23# I want openvpn to be able to read password from file (hrw)
24EXTRA_OECONF += "--enable-iproute2"
25EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '--disable-plugin-auth-pam', d)}"
26
27# Explicitly specify IPROUTE to bypass the configure-time check for /sbin/ip on the host.
28EXTRA_OECONF += "IPROUTE=${base_sbindir}/ip"
29
30do_install_append() {
31 install -d ${D}/${sysconfdir}/init.d
32 install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d
33
34 install -d ${D}/${sysconfdir}/openvpn
35 install -d ${D}/${sysconfdir}/openvpn/sample
36 install -m 755 ${S}/sample/sample-config-files/loopback-server ${D}${sysconfdir}/openvpn/sample/loopback-server.conf
37 install -m 755 ${S}/sample/sample-config-files/loopback-client ${D}${sysconfdir}/openvpn/sample/loopback-client.conf
38 install -dm 755 ${D}${sysconfdir}/openvpn/sample/sample-keys
39 install -m 644 ${S}/sample/sample-keys/* ${D}${sysconfdir}/openvpn/sample/sample-keys
40
41 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
42 install -d ${D}/${systemd_unitdir}/system
43 install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system
44 install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system/openvpn@loopback-server.service
45 install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system/openvpn@loopback-client.service
46
47 install -d ${D}/${localstatedir}
48 install -d ${D}/${localstatedir}/lib
49 install -d -m 710 ${D}/${localstatedir}/lib/openvpn
50
51 install -d ${D}${sysconfdir}/tmpfiles.d
52 install -m 0644 ${WORKDIR}/openvpn-volatile.conf ${D}${sysconfdir}/tmpfiles.d/openvpn.conf
53 sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${sysconfdir}/tmpfiles.d/openvpn.conf
54 fi
55}
56
57PACKAGES =+ " ${PN}-sample "
58
59RRECOMMENDS_${PN} = "kernel-module-tun"
60
61FILES_${PN}-dbg += "${libdir}/openvpn/plugins/.debug"
62FILES_${PN} += "${systemd_unitdir}/system/openvpn@.service \
63 ${sysconfdir}/tmpfiles.d \
64 "
65FILES_${PN}-sample += "${systemd_unitdir}/system/openvpn@loopback-server.service \
66 ${systemd_unitdir}/system/openvpn@loopback-client.service \
67 ${sysconfdir}/openvpn/sample/"