diff options
Diffstat (limited to 'net-vpn/openvpn-nl/openvpn-nl-2.4.9.ebuild')
-rw-r--r-- | net-vpn/openvpn-nl/openvpn-nl-2.4.9.ebuild | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/net-vpn/openvpn-nl/openvpn-nl-2.4.9.ebuild b/net-vpn/openvpn-nl/openvpn-nl-2.4.9.ebuild new file mode 100644 index 0000000..a28bb7e --- /dev/null +++ b/net-vpn/openvpn-nl/openvpn-nl-2.4.9.ebuild @@ -0,0 +1,55 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Modified version of OpenVPN with mbedtls and pkcs11 support" +HOMEPAGE="https://openvpn.fox-it.com" +SRC_URI="https://openvpn.fox-it.com/repos/source/${PV}-nl1/${PN}-src-${PV}-nl1.tar.gz https://code.pa4wdh.nl.eu.org/distfiles/${PN}-src-${PV}-nl1.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="cpu_flags_x86_aes" + +DEPEND="" +RDEPEND="${DEPEND}" +BDEPEND="" + +CONFIG_CHECK="~TUN" + +src_unpack() { + unpack ${A} + mv openvpn-nl ${P} +} + +src_prepare() { + eapply_user +} + +src_configure() { + if use cpu_flags_x86_aes; then + einfo "Enabling AES-NI support" + cd ${WORKDIR}/${P}/mbedtls + scripts/config.pl set MBEDTLS_AESNI_C + else + einfo "Not enabling AES-NI support" + fi +} + +src_compile() { + cd ${WORKDIR}/${P} + ./build-openvpn-nl.sh +} + +src_install() { + newsbin ${WORKDIR}/${P}/build-openvpn-nl/src/openvpn/openvpn openvpn-nl + newinitd "${FILESDIR}/openvpn-nl.init" openvpn-nl + newconfd "${FILESDIR}/openvpn-nl.conf" openvpn-nl + + exeinto /etc/openvpn-nl + doexe "${FILESDIR}/up.sh" + doexe "${FILESDIR}/down.sh" + + newman ${WORKDIR}/${P}/openvpn/doc/openvpn.8 openvpn-nl.8 +} |