diff options
author | Nicolas Stinus | 2017-02-01 17:39:36 +0100 |
---|---|---|
committer | Nicolas Stinus | 2017-02-01 17:39:36 +0100 |
commit | 8162ccaaeea49f37459ddac1e30d54bf15cd4355 (patch) | |
tree | 739eefa9249541ab20fac3ea5db2b5ef9e489865 /PKGBUILD | |
download | aur-8162ccaaeea49f37459ddac1e30d54bf15cd4355.tar.gz |
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..2b41a4819917 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Nicolas Stinus <nicolas.stinus@gmail.com> + +pkgname=openvpn-nordvpn +pkgver=17.2.1 +pkgrel=1 +epoch= +pkgdesc="OpenVPN configuration files and helper for nordvpn.com" +arch=(any) +url="" +license=('MIT') +groups=() +depends=('openvpn' 'systemd') +makedepends=('unzip') +checkdepends=() +optdepends=() +provides=() +conflicts=() +replaces=() +backup=() +options=() +install= +changelog= +source=('https://nordvpn.com/api/files/zip') +noextract=(zip) +sha256sums=('d2ab555e0c601a4b220339fa84e35909aab59451bd115b795cdb76b552991810') +install=${pkgname}.install + +prepare() { + mkdir conf + unzip -q zip -d conf +} + +build() { + find conf -name '*.ovpn' | parallel sed \'s/^auth-user-pass.*$/auth-user-pass \\/etc\\/openvpn\\/client\\/nordvpn\\/credentials.conf/g\' -i {} +} + +package() { + mkdir -p $pkgdir/etc/openvpn/client/nordvpn + chmod -R 750 $pkgdir/etc/openvpn/client + for f in $(find conf -type f -name '*udp1194.ovpn'); do + install -m 444 $f $pkgdir/etc/openvpn/client/nordvpn + ln -s /etc/openvpn/client/nordvpn/$(basename $f) $pkgdir/etc/openvpn/client/nordvpn_$(echo $(basename $f) | cut -d '.' -f 1).conf + done + mkdir -p $pkgdir/usr/bin + install -m 755 ../nordvpn $pkgdir/usr/bin +} |