# Contributor: Valery Kartel # Maintainer: Natanael Copa pkgname=openvpn pkgver=2.4.8 pkgrel=1 pkgdesc="A robust, and highly configurable VPN (Virtual Private Network)" url="https://openvpn.net/" arch="all" license="custom" subpackages="$pkgname-doc $pkgname-dev $pkgname-openrc $pkgname-auth-pam:pam" depends="iproute2" makedepends="openssl-dev lzo-dev linux-pam-dev linux-headers" install="$pkgname.pre-install" source="https://swupdate.openvpn.net/community/releases/$pkgname-$pkgver.tar.xz openvpn.initd openvpn.confd openvpn.up openvpn.down " builddir="$srcdir/$pkgname-$pkgver" build() { cd "$builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --mandir=/usr/share/man \ --sysconfdir=/etc/openvpn \ --enable-crypto \ --enable-iproute2 make } check() { cd "$builddir" make check } package() { cd "$builddir" make DESTDIR="$pkgdir" install # install samples mkdir -p "$pkgdir"/usr/share/doc/$pkgname/samples cp -a sample/sample-* "$pkgdir"/usr/share/doc/$pkgname/samples install -D -m644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING # install init.d and conf.d install -Dm755 "$srcdir"/openvpn.initd "$pkgdir"/etc/init.d/openvpn install -Dm644 "$srcdir"/openvpn.confd "$pkgdir"/etc/conf.d/openvpn # install up and down scripts install -Dm755 "$srcdir"/openvpn.up "$pkgdir"/etc/openvpn/up.sh install -Dm755 "$srcdir"/openvpn.down "$pkgdir"/etc/openvpn/down.sh } pam() { pkgdesc="OpenVPN plugin for PAM authentication" mkdir -p "$subpkgdir"/usr/lib/openvpn/plugins mv "$pkgdir"/usr/lib/openvpn/plugins/*-auth-pam* \ "$subpkgdir"/usr/lib/openvpn/plugins/ } sha512sums="d37a768c7f8683c23ae0d73d7e9947b5a1dac26580b0d7fe72454319acfe40375fbe150e68daee865a78e0269740e4ac5c96cdb8a7f02a1287ea93752ee0be06 openvpn-2.4.8.tar.xz 50589e6b140bdf1c0454c5bb45b154e963c51e0e2f46e7e4538e0a784ac4f2b3c714a7f5fe1d25c56643f798503b42091e304dd26e664636f06ad453a2a39235 openvpn.initd 6b2353aca9df7f43044e4e37990491b4ba077e259ebe13b8f2eb43e35ca7a617c1a65c5bfb8ab05e87cf12c4444184ae064f01f9abbb3c023dbbc07ff3f9c84e openvpn.confd cdb73c9a5b1eb56e9cbd29955d94297ce5a87079419cd626d6a0b6680d88cbf310735a53f794886df02030b687eaea553c7c569a8ea1282a149441add1c65760 openvpn.up 4456880d5c2db061219ba94e4052786700efa5e685f03b0d12d75a6023e3c0fc7b5242cc3d2bd3988e42fcd99701ab13a6257b1a0943b812318d30c64843ad27 openvpn.down"