1 # Maintainer: Christian Hesse <mail@eworm.de>
4 _tag='4664c458f154156e5d56020bedefc160fdc79465' # git rev-parse v${pkgver}
7 pkgdesc='An easy-to-use, robust and highly configurable VPN (Virtual Private Network)'
9 url='https://openvpn.net/index.php/open-source.html'
11 depends=('openssl' 'lzo' 'lz4' 'systemd-libs' 'libsystemd.so' 'pkcs11-helper' 'libpkcs11-helper.so')
12 optdepends=('easy-rsa: easy CA and certificate handling'
13 'pam: authenticate via PAM')
14 makedepends=('git' 'systemd' 'python-docutils')
15 install=openvpn.install
16 validpgpkeys=('F554A3687412CFFEBDEFE0A312F5F7B42F2B01E7' # OpenVPN - Security Mailing List <security@openvpn.net>
17 'B62E6A2B4E56570B7BDC6BE01D829EFECA562812') # Gert Doering <gert@v6.de>
18 source=("git+https://github.com/OpenVPN/openvpn.git#tag=${_tag}?signed"
19 '0001-unprivileged.patch'
23 '77874824d96c1fd6c14259a6ea16232ae574dda3d5adba1798ccd6c93694846c'
24 '3646b865ac67783fafc6652589cfe2a3105ecef06f3907f33de5135815f6a621'
25 'b1436f953a4f1be7083711d11928a9924993f940ff56ff92d288d6100df673fc')
28 cd "${srcdir}"/${pkgname}
30 # https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg19302.html
31 sed -i '/^CONFIGURE_DEFINES=/s/set/env/g' configure.ac
33 # start with unprivileged user and keep granted privileges
34 patch -Np1 < ../0001-unprivileged.patch
36 autoreconf --force --install
40 mkdir "${srcdir}"/build
43 "${srcdir}"/openvpn/configure \
49 --enable-x509-alt-username
63 make DESTDIR="${pkgdir}" install
65 # Install sysusers and tmpfiles files
66 install -D -m0644 ../sysusers.conf "${pkgdir}"/usr/lib/sysusers.d/openvpn.conf
67 install -D -m0644 ../tmpfiles.conf "${pkgdir}"/usr/lib/tmpfiles.d/openvpn.conf
70 install -d -m0755 "${pkgdir}"/usr/share/licenses/openvpn/
71 ln -sf /usr/share/doc/openvpn/{COPYING,COPYRIGHT.GPL} "${pkgdir}"/usr/share/licenses/openvpn/
73 cd "${srcdir}"/${pkgname}
76 install -d -m0755 "${pkgdir}"/usr/share/openvpn
77 cp -r sample/sample-config-files "${pkgdir}"/usr/share/openvpn/examples
80 for FILE in $(find contrib -type f); do
81 case "$(file --brief --mime-type --no-sandbox "${FILE}")" in
83 install -D -m0755 "${FILE}" "${pkgdir}/usr/share/openvpn/${FILE}" ;;
85 install -D -m0644 "${FILE}" "${pkgdir}/usr/share/openvpn/${FILE}" ;;