summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PKGBUILD12
-rw-r--r--mullvad-vpn.install58
2 files changed, 35 insertions, 35 deletions
diff --git a/PKGBUILD b/PKGBUILD
index fd11d113bbc7..6036d5eda074 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,15 +5,15 @@ pkgname=mullvad-vpn-bin
pkgver=2021.6
pkgrel=1
pkgdesc="The Mullvad VPN client app for desktop"
-url="https://www.mullvad.net"
arch=('x86_64')
+url="https://www.mullvad.net"
license=('GPL3')
depends=('iputils' 'libnotify' 'libappindicator-gtk3' 'nss')
-provides=("${pkgname%-bin}")
-conflicts=("${pkgname%-bin}")
-install="${pkgname%-bin}.install"
+provides=("${pkgname%-*}")
+conflicts=("${pkgname%-*}")
+install="${pkgname%-*}.install"
source=("https://github.com/mullvad/mullvadvpn-app/releases/download/$pkgver/MullvadVPN-${pkgver}_amd64.deb"{,.asc}
- "${pkgname%-bin}.sh")
+ "${pkgname%-*}.sh")
sha256sums=('95b9638f304a00d72ce6b6f3a38ff9f623142541cfaa4d6e9aa142c27d86ea6e'
'SKIP'
'a59c29f07b4eab9af56f0e8be42bae0d83726f5185e88de0c5a48f4098c3c0a4')
@@ -23,7 +23,7 @@ package() {
bsdtar -xvf data.tar.xz -C "$pkgdir"
# Link to the GUI binary
- install -m755 "$srcdir/${pkgname%-bin}.sh" "$pkgdir/usr/bin/${pkgname%-bin}"
+ install -m755 "$srcdir/${pkgname%-*}.sh" "$pkgdir/usr/bin/${pkgname%-*}"
# Symlink daemon service to correct directory
install -d "$pkgdir/usr/lib/systemd/system"
diff --git a/mullvad-vpn.install b/mullvad-vpn.install
index b348092ea0fc..cfea2e5a484d 100644
--- a/mullvad-vpn.install
+++ b/mullvad-vpn.install
@@ -1,52 +1,52 @@
pre_install() {
- if systemctl status mullvad-daemon &> /dev/null; then
- echo 'Stopping & disabling Mullvad VPN daemon...'
- /opt/Mullvad\ VPN/resources/mullvad-setup prepare-restart || true
- systemctl disable --now mullvad-daemon
- fi
+ if systemctl status mullvad-daemon &> /dev/null; then
+ echo 'Stopping & disabling Mullvad VPN daemon...'
+ /opt/Mullvad\ VPN/resources/mullvad-setup prepare-restart || true
+ systemctl disable --now mullvad-daemon
+ fi
- pkill -x "mullvad-gui" || true
+ pkill -x "mullvad-gui" || true
- rm -f /var/cache/mullvad-vpn/relays.json || true
+ rm -f /var/cache/mullvad-vpn/relays.json || true
}
post_install() {
- chmod u+s "/usr/bin/mullvad-exclude"
+ chmod u+s "/usr/bin/mullvad-exclude"
- echo 'Enabling Mullvad VPN daemon...'
- systemctl enable --now mullvad-daemon
+ echo 'Enabling Mullvad VPN daemon...'
+ systemctl enable --now mullvad-daemon
}
pre_upgrade() {
- pre_install
+ pre_install
}
post_upgrade() {
- echo 'Starting & enabling Mullvad VPN daemon...'
- systemctl daemon-reload
- systemctl enable --now mullvad-daemon
+ echo 'Starting & enabling Mullvad VPN daemon...'
+ systemctl daemon-reload
+ systemctl enable --now mullvad-daemon
- chmod u+s "/usr/bin/mullvad-exclude"
+ chmod u+s "/usr/bin/mullvad-exclude"
}
pre_remove() {
- /usr/bin/mullvad account clear-history || echo "Failed to remove leftover WireGuard keys"
+ /usr/bin/mullvad account clear-history || echo "Failed to remove leftover WireGuard keys"
- # 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
+ # 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
- /opt/Mullvad\ VPN/resources/mullvad-setup reset-firewall || true
+ /opt/Mullvad\ VPN/resources/mullvad-setup reset-firewall || 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 -------------------------------------------------------------
+ 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 -------------------------------------------------------------
}