summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authoralxptt2018-12-06 01:54:23 -0500
committeralxptt2018-12-06 01:54:23 -0500
commit21a0b58fcaaf4d2baf66252f29bd3a3e57e4d535 (patch)
tree674b4932af7384b7bb756ac318f5846078223207 /PKGBUILD
downloadaur-21a0b58fcaaf4d2baf66252f29bd3a3e57e4d535.tar.gz
initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD72
1 files changed, 72 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..03a061df8fe6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,72 @@
+# Maintainer: Alexandria Pettit <alxpettit@gmail.com>
+# Contributer: Christian Hesse <mail@eworm.de>
+
+pkgname=openvpn-rrf
+pkgver=2.4.6
+pkgrel=1
+pkgdesc='OpenVPN with my "Recursive Routing Fix" patch installed.'
+arch=('x86_64')
+url='http://openvpn.net/index.php/open-source.html'
+depends=('openssl' 'lzo' 'iproute2' 'libsystemd' 'pkcs11-helper')
+optdepends=('easy-rsa: easy CA and certificate handling'
+ 'pam: authenticate via PAM')
+makedepends=('systemd' 'patch')
+provides=('openvpn')
+license=('custom')
+validpgpkeys=('F554A3687412CFFEBDEFE0A312F5F7B42F2B01E7') # OpenVPN - Security Mailing List <security@openvpn.net>
+source=("https://swupdate.openvpn.net/community/releases/openvpn-${pkgver}.tar.gz"{,.asc} "recursive-routing-fix.patch")
+sha256sums=('738dbd37fcf8eb9382c53628db22258c41ba9550165519d9200e8bebaef4cbe2'
+ 'SKIP'
+ '1570ac6306de32958e7e3c6a69517a4b1fc80135201534890a66e75e780e4dd5')
+
+prepare() {
+ cd "${srcdir}"/openvpn-${pkgver}
+ patch -p1 -i ../recursive-routing-fix.patch
+}
+
+build() {
+ cd "${srcdir}"/openvpn-${pkgver}
+
+ ./configure \
+ --prefix=/usr \
+ --sbindir=/usr/bin \
+ --enable-iproute2 \
+ --enable-pkcs11 \
+ --enable-plugins \
+ --enable-systemd \
+ --enable-x509-alt-username
+ make
+}
+
+check() {
+ cd "${srcdir}"/openvpn-${pkgver}
+
+ make check
+}
+
+package() {
+ cd "${srcdir}"/openvpn-${pkgver}
+
+ # Install openvpn
+ make DESTDIR="${pkgdir}" install
+
+ # Create empty configuration directories
+ install -d -m0750 -g 90 "${pkgdir}"/etc/openvpn/{client,server}
+
+ # Install examples
+ install -d -m0755 "${pkgdir}"/usr/share/openvpn
+ cp -r sample/sample-config-files "${pkgdir}"/usr/share/openvpn/examples
+
+ # Install license
+ install -d -m0755 "${pkgdir}"/usr/share/licenses/openvpn/
+ ln -sf /usr/share/doc/openvpn/{COPYING,COPYRIGHT.GPL} "${pkgdir}"/usr/share/licenses/openvpn/
+
+ # 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
+}
+