diff options
author | yochananmarqos | 2019-11-20 11:07:28 -0700 |
---|---|---|
committer | yochananmarqos | 2019-11-20 11:07:28 -0700 |
commit | af6d8666941571b40f501ea0c0345718f8e968ec (patch) | |
tree | 5fe5124fad07e9b50780ecd93ae1e88c4f6d43a6 | |
download | aur-af6d8666941571b40f501ea0c0345718f8e968ec.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 27 | ||||
-rw-r--r-- | mullvad-vpn.install | 42 |
3 files changed, 93 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..9455511c2f55 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = mullvad-vpn-bin + pkgdesc = The Mullvad VPN client app for desktop + pkgver = 2019.9 + pkgrel = 2 + url = https://www.mullvad.net + install = mullvad-vpn.install + arch = x86_64 + license = GPL3 + depends = gconf + depends = gtk3 + depends = libnotify + depends = libappindicator-gtk2 + depends = libxss + depends = nss + provides = mullvad-vpn + conflicts = mullvad-vpn + source = https://github.com/mullvad/mullvadvpn-app/releases/download/2019.9/MullvadVPN-2019.9_amd64.deb + source = https://github.com/mullvad/mullvadvpn-app/releases/download/2019.9/MullvadVPN-2019.9_amd64.deb.asc + validpgpkeys = A1198702FC3E0A09A9AE5B75D5A1D4F266DE8DDF + sha256sums = 4ba5b1c87cb5afdadbcfb37413bdd7ea72df139dd01815e9ca0f1c54f81f03e1 + sha256sums = SKIP + +pkgname = mullvad-vpn-bin + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f43bb19fe0f2 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,27 @@ +# Maintainer: Mark Wagie <yochanan dot marqos at gmail dot com> +# Contributor: Matthew McGinn <mamcgi at gmail dot com> +# Contributor: alicewww <almw at protonmail dot com> +pkgname=mullvad-vpn-bin +pkgver=2019.9 +pkgrel=2 +pkgdesc="The Mullvad VPN client app for desktop" +url="https://www.mullvad.net" +arch=('x86_64') +license=('GPL3') +depends=('gconf' 'gtk3' 'libnotify' 'libappindicator-gtk2' 'libxss' 'nss') +provides=("${pkgname%-bin}") +conflicts=("${pkgname%-bin}") +install="${pkgname%-bin}.install" +source=("https://github.com/mullvad/mullvadvpn-app/releases/download/$pkgver/MullvadVPN-${pkgver}_amd64.deb"{,.asc}) +sha256sums=('4ba5b1c87cb5afdadbcfb37413bdd7ea72df139dd01815e9ca0f1c54f81f03e1' + 'SKIP') +validpgpkeys=('A1198702FC3E0A09A9AE5B75D5A1D4F266DE8DDF') # Mullvad (code signing) <admin@mullvad.net> + +package() { + tar -xvf data.tar.xz -C "$pkgdir" + + ln -s "/opt/Mullvad VPN/mullvad-gui" "$pkgdir/usr/bin/${pkgname%-bin}" + + install -Dm644 "$pkgdir/opt/Mullvad VPN/resources/mullvad-daemon.service" \ + "$pkgdir/usr/lib/systemd/system/mullvad-daemon.service" +} diff --git a/mullvad-vpn.install b/mullvad-vpn.install new file mode 100644 index 000000000000..6fe7d441bf1f --- /dev/null +++ b/mullvad-vpn.install @@ -0,0 +1,42 @@ +pre_install() { + if systemctl status mullvad-daemon &> /dev/null; then + echo 'Stopping & disabling Mullvad VPN daemon...' + systemctl disable --now mullvad-daemon + fi + + rm -f /var/cache/mullvad-vpn/relays.json || true +} + +post_install() { + echo 'Enabling Mullvad VPN daemon...' + systemctl enable --now mullvad-daemon +} + +pre_upgrade() { + echo 'Stopping Mullvad VPN daemon...' + systemctl stop mullvad-daemon +} + +post_upgrade() { + echo 'Restarting Mullvad VPN daemon...' + systemctl daemon-reload + systemctl start mullvad-daemon +} + +pre_remove() { + # the user might've disabled or stopped the service themselves already + echo 'Making sure the Mullvad VPN daemon is stopped & disabled...' + systemctl stop mullvad-daemon || true + systemctl disable mullvad-daemon || true +} + +post_remove() { + echo ------------------------------------------------------------- + echo 'Optionally remove logs & cache:' + echo 'sudo rm -rf /var/log/mullvad-vpn/' + echo 'sudo rm -rf /var/cache/mullvad-vpn/' + echo '' + echo 'Optionally remove config:' + echo 'sudo rm -rf /etc/mullvad-vpn' + echo ------------------------------------------------------------- +} |