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