summaryrefslogtreecommitdiffstats
path: root/abs/core
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2019-06-09 18:39:46 (GMT)
committerBritney Fransen <brfransen@gmail.com>2019-06-09 18:39:46 (GMT)
commita957fc32cc63bcad3fcdc7037020802aa0408558 (patch)
tree9cf9473aeeb3df81b37cbd27f59c94b2534e5262 /abs/core
parenta3d91bb7f6d2df0f0174bc2a5efdef49fe2e6b7b (diff)
downloadlinhes_pkgbuild-a957fc32cc63bcad3fcdc7037020802aa0408558.zip
linhes_pkgbuild-a957fc32cc63bcad3fcdc7037020802aa0408558.tar.gz
linhes_pkgbuild-a957fc32cc63bcad3fcdc7037020802aa0408558.tar.bz2
openvpn: initial inclusion. refs #1036
Diffstat (limited to 'abs/core')
-rw-r--r--abs/core/openvpn/PKGBUILD74
1 files changed, 74 insertions, 0 deletions
diff --git a/abs/core/openvpn/PKGBUILD b/abs/core/openvpn/PKGBUILD
new file mode 100644
index 0000000..53eae44
--- /dev/null
+++ b/abs/core/openvpn/PKGBUILD
@@ -0,0 +1,74 @@
+# Maintainer: Christian Hesse <mail@eworm.de>
+
+pkgname=openvpn
+pkgver=2.4.7
+pkgrel=1
+pkgdesc='An easy-to-use, robust and highly configurable VPN (Virtual Private Network)'
+arch=('x86_64')
+url='https://openvpn.net/index.php/open-source.html'
+depends=('openssl' 'lzo' 'iproute2' 'systemd' 'pkcs11-helper')
+optdepends=('easy-rsa: easy CA and certificate handling'
+ 'pam: authenticate via PAM')
+makedepends=('git' 'systemd')
+license=('custom')
+validpgpkeys=('F554A3687412CFFEBDEFE0A312F5F7B42F2B01E7' # OpenVPN - Security Mailing List <security@openvpn.net>
+ 'B62E6A2B4E56570B7BDC6BE01D829EFECA562812') # Gert Doering <gert@v6.de>
+source=("git+https://github.com/OpenVPN/openvpn.git#tag=v${pkgver}")
+#source=("git+https://github.com/OpenVPN/openvpn.git#tag=v${pkgver}?signed")
+sha256sums=('SKIP')
+
+prepare() {
+ cd "${srcdir}"/${pkgname}
+
+ autoreconf -i
+}
+
+build() {
+ mkdir "${srcdir}"/build
+ cd "${srcdir}"/build
+
+ "${srcdir}"/${pkgname}/configure \
+ --prefix=/usr \
+ --sbindir=/usr/bin \
+ --enable-iproute2 \
+ --enable-pkcs11 \
+ --enable-plugins \
+ --enable-systemd \
+ --enable-x509-alt-username
+ make
+}
+
+check() {
+ cd "${srcdir}"/build
+
+ make check
+}
+
+package() {
+ cd "${srcdir}"/build
+
+ # Install openvpn
+ make DESTDIR="${pkgdir}" install
+
+ # Create empty configuration directories
+ install -d -m0750 -g 90 "${pkgdir}"/etc/openvpn/{client,server}
+
+ # Install license
+ install -d -m0755 "${pkgdir}"/usr/share/licenses/openvpn/
+ ln -sf /usr/share/doc/openvpn/{COPYING,COPYRIGHT.GPL} "${pkgdir}"/usr/share/licenses/openvpn/
+
+ cd "${srcdir}"/${pkgname}
+
+ # Install examples
+ install -d -m0755 "${pkgdir}"/usr/share/openvpn
+ cp -r sample/sample-config-files "${pkgdir}"/usr/share/openvpn/examples
+
+ # Install contrib
+ for FILE in $(find contrib -type f); do
+ case "$(file --brief --mime-type "${FILE}")" in
+ "text/x-shellscript") install -D -m0755 "${FILE}" "${pkgdir}/usr/share/openvpn/${FILE}" ;;
+ *) install -D -m0644 "${FILE}" "${pkgdir}/usr/share/openvpn/${FILE}" ;;
+ esac
+ done
+}
+