# 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/2.4.7-nl1/openvpn-nl-src-2.4.7-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 openvpn-nl-2.4.7 } src_prepare() { eapply_user } src_configure() { if use cpu_flags_x86_aes; then einfo "Enabling AES-NI support" cd ${WORKDIR}/openvpn-nl-2.4.7/mbedtls scripts/config.pl set MBEDTLS_AESNI_C else einfo "Not enabling AES-NI support" fi } src_compile() { cd ${WORKDIR}/openvpn-nl-2.4.7 ./build-openvpn-nl.sh } src_install() { newsbin ${WORKDIR}/openvpn-nl-2.4.7/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}/openvpn-nl-2.4.7/openvpn/doc/openvpn.8 openvpn-nl.8 }