diff options
Diffstat (limited to 'meta-networking/recipes-support/openvpn/openvpn_2.3.8.bb')
-rw-r--r-- | meta-networking/recipes-support/openvpn/openvpn_2.3.8.bb | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/openvpn/openvpn_2.3.8.bb b/meta-networking/recipes-support/openvpn/openvpn_2.3.8.bb new file mode 100644 index 000000000..f0109069c --- /dev/null +++ b/meta-networking/recipes-support/openvpn/openvpn_2.3.8.bb | |||
@@ -0,0 +1,67 @@ | |||
1 | SUMMARY = "A full-featured SSL VPN solution via tun device." | ||
2 | HOMEPAGE = "http://openvpn.sourceforge.net" | ||
3 | SECTION = "net" | ||
4 | LICENSE = "GPLv2" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=5aac200199fde47501876cba7263cb0c" | ||
6 | DEPENDS = "lzo openssl iproute2 ${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
7 | |||
8 | inherit autotools systemd | ||
9 | |||
10 | SRC_URI = "http://swupdate.openvpn.org/community/releases/openvpn-${PV}.tar.gz \ | ||
11 | file://openvpn \ | ||
12 | file://openvpn@.service \ | ||
13 | file://openvpn-volatile.conf" | ||
14 | |||
15 | SRC_URI[md5sum] = "51d996f1f1fc30f501ae251a254effeb" | ||
16 | SRC_URI[sha256sum] = "532435eff61c14b44a583f27b72f93e7864e96c95fe51134ec0ad4b1b1107c51" | ||
17 | |||
18 | SYSTEMD_SERVICE_${PN} += "openvpn@loopback-server.service openvpn@loopback-client.service" | ||
19 | SYSTEMD_AUTO_ENABLE = "disable" | ||
20 | |||
21 | CFLAGS += "-fno-inline" | ||
22 | |||
23 | # I want openvpn to be able to read password from file (hrw) | ||
24 | EXTRA_OECONF += "--enable-password-save --enable-iproute2" | ||
25 | EXTRA_OECONF += "${@base_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. | ||
28 | EXTRA_OECONF += "IPROUTE=/sbin/ip" | ||
29 | |||
30 | do_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 ${@base_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 | install -d -m 755 ${D}/${localstatedir}/run/ | ||
51 | install -d -m 755 ${D}/${localstatedir}/run/openvpn | ||
52 | |||
53 | install -d ${D}${sysconfdir}/tmpfiles.d | ||
54 | install -m 0644 ${WORKDIR}/openvpn-volatile.conf ${D}${sysconfdir}/tmpfiles.d/openvpn.conf | ||
55 | fi | ||
56 | } | ||
57 | |||
58 | PACKAGES =+ " ${PN}-sample " | ||
59 | |||
60 | RRECOMMENDS_${PN} = "kernel-module-tun" | ||
61 | |||
62 | FILES_${PN}-dbg += "${libdir}/openvpn/plugins/.debug" | ||
63 | FILES_${PN} += "${systemd_unitdir}/system/openvpn@.service \ | ||
64 | /run" | ||
65 | FILES_${PN}-sample += "${systemd_unitdir}/system/openvpn@loopback-server.service \ | ||
66 | ${systemd_unitdir}/system/openvpn@loopback-client.service \ | ||
67 | ${sysconfdir}/openvpn/sample/" | ||