2014-11-21 22:42:42 +00:00
|
|
|
SUMMARY = "A full-featured SSL VPN solution via tun device."
|
|
|
|
HOMEPAGE = "http://openvpn.sourceforge.net"
|
|
|
|
SECTION = "console/network"
|
|
|
|
LICENSE = "GPLv2"
|
|
|
|
LIC_FILES_CHKSUM = "file://COPYING;md5=5aac200199fde47501876cba7263cb0c"
|
|
|
|
DEPENDS = "lzo openssl iproute2 ${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
|
|
|
|
|
|
|
|
inherit autotools
|
|
|
|
|
2014-11-22 20:50:24 +00:00
|
|
|
PR = "r2"
|
2014-11-21 23:05:29 +00:00
|
|
|
|
2014-11-21 22:42:42 +00:00
|
|
|
SRC_URI = "http://swupdate.openvpn.org/community/releases/openvpn-${PV}.tar.gz \
|
2014-11-21 22:54:02 +00:00
|
|
|
file://openvpn \
|
|
|
|
file://openvpn-generator \
|
|
|
|
file://openvpn@.service \
|
|
|
|
file://openvpn.service"
|
2014-11-21 22:42:42 +00:00
|
|
|
|
|
|
|
SRC_URI[md5sum] = "04d47237907faabe9d046970ffe44b2e"
|
|
|
|
SRC_URI[sha256sum] = "af506d5f48568fa8d2f2435cb3fad35f9a9a8f263999ea6df3ba296960cec85a"
|
|
|
|
|
|
|
|
CFLAGS += "-fno-inline"
|
|
|
|
|
|
|
|
# I want openvpn to be able to read password from file (hrw)
|
|
|
|
EXTRA_OECONF += "--enable-password-save --enable-iproute2"
|
|
|
|
EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'pam', '', '--disable-plugin-auth-pam', d)}"
|
|
|
|
|
|
|
|
# Explicitly specify IPROUTE to bypass the configure-time check for /sbin/ip on the host.
|
|
|
|
EXTRA_OECONF += "IPROUTE=/sbin/ip"
|
|
|
|
|
|
|
|
do_install_append() {
|
|
|
|
install -d ${D}/${sysconfdir}/init.d
|
|
|
|
install -d ${D}/${sysconfdir}/openvpn
|
|
|
|
install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d
|
2014-11-21 22:54:02 +00:00
|
|
|
|
|
|
|
# systemd files
|
|
|
|
install -d ${D}${systemd_unitdir}/system
|
|
|
|
install -d ${D}${systemd_unitdir}/system-generators
|
|
|
|
install -m 0644 ${WORKDIR}/openvpn.service ${D}${systemd_unitdir}/system
|
|
|
|
install -m 0644 ${WORKDIR}/openvpn@.service ${D}${systemd_unitdir}/system
|
|
|
|
install -m 0755 ${WORKDIR}/openvpn-generator ${D}${systemd_unitdir}/system-generators
|
2014-11-21 22:42:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
RRECOMMENDS_${PN} = "kernel-module-tun"
|
|
|
|
|
|
|
|
FILES_${PN}-dbg += "${libdir}/openvpn/plugins/.debug"
|
|
|
|
|
2014-11-21 22:54:02 +00:00
|
|
|
# Don't go through the systemd.bbclass as we do not want magic to happen
|
|
|
|
# during install and upgrade. Simply ship the files.
|
|
|
|
FILES_${PN} += "${systemd_unitdir}"
|
|
|
|
|
2014-11-21 22:42:42 +00:00
|
|
|
|
|
|
|
# We need to test opkg upgrade of OpenVPN through the OpenVPN first
|
|
|
|
DEFAULT_PREFERENCE = "-1"
|