2 Commits

Author SHA1 Message Date
045f20a120 Make package function more compact 2026-04-26 16:40:47 +02:00
2d8dcb239a Fix review comments 2026-04-26 16:33:34 +02:00
2 changed files with 13 additions and 43 deletions

View File

@@ -1,23 +1,15 @@
maintainer="Joakim Hulthe <joakim@hulthe.net>" maintainer="Joakim Hulthe <joakim@hulthe.net>"
pkgname=mullvad-vpn-daemon pkgname=mullvad-vpn-daemon
pkgver=2026.2_beta1 pkgver=2026.2_beta1
pkgrel=1 pkgrel=0
pkgdesc="Mullvad VPN client (daemon and CLI)" pkgdesc="Mullvad VPN client (daemon and CLI)"
url="https://mullvad.net/" url="https://mullvad.net/"
# Mullvad depends on old versions of the `nix` library # Mullvad depends on old versions of the `nix` library
# which are broken on on loongarch64 and s390x # which are broken on on loongarch64 and s390x
arch="all !loongarch64 !s390x" arch="all !loongarch64 !s390x"
license="GPL-3-or-later" license="GPL-3.0-or-later"
depends="
dbus
libmnl
libnftnl
"
makedepends=" makedepends="
build-base
cargo-auditable cargo-auditable
rust
pkgconfig
git git
protobuf-dev protobuf-dev
dbus-dev dbus-dev
@@ -27,7 +19,6 @@ makedepends="
install=" install="
$pkgname.pre-upgrade $pkgname.pre-upgrade
$pkgname.pre-deinstall $pkgname.pre-deinstall
$pkgname.post-deinstall
$pkgname-systemd.post-install $pkgname-systemd.post-install
$pkgname-systemd.post-upgrade $pkgname-systemd.post-upgrade
$pkgname-systemd.pre-deinstall $pkgname-systemd.pre-deinstall
@@ -70,17 +61,11 @@ check() {
} }
package() { package() {
install -m755 -D "$_cargo_release_dir/mullvad" \ install -m755 -Dt "$pkgdir/usr/bin/" \
"$pkgdir/usr/bin/mullvad" "$_cargo_release_dir/mullvad" \
"$_cargo_release_dir/mullvad-daemon" \
install -m755 -D "$_cargo_release_dir/mullvad-daemon" \ "$_cargo_release_dir/mullvad-problem-report" \
"$pkgdir/usr/bin/mullvad-daemon" "$_cargo_release_dir/mullvad-setup"
install -m755 -D "$_cargo_release_dir/mullvad-problem-report" \
"$pkgdir/usr/bin/mullvad-problem-report"
install -m755 -D "$_cargo_release_dir/mullvad-setup" \
"$pkgdir/usr/bin/mullvad-setup"
# TODO: Bundle a relay list. # TODO: Bundle a relay list.
# We can't generate one at build time since that would break build reproducibility. # We can't generate one at build time since that would break build reproducibility.
@@ -88,25 +73,19 @@ package() {
#install -m644 -D "$builddir/<todo>/relays.json" \ #install -m644 -D "$builddir/<todo>/relays.json" \
# "$pkgdir/usr/share/mullvad-vpn/relays.json" # "$pkgdir/usr/share/mullvad-vpn/relays.json"
# TODO: Copy relay list into /var/cache/ in post-upgrade/post-install # TODO: Copy relay list into /var/cache/ in post-upgrade/post-install
}
systemd() { # files in /usr/lib/systemd/ are automatically put in systemd subpackage
pkgdesc="systemd service files for Mullvad VPN" install -m755 -Dt "$pkgdir/usr/lib/systemd/system/" \
depends="$pkgname=$pkgver-r$pkgrel" "$builddir/dist-assets/linux/mullvad-daemon.service" \
"$builddir/dist-assets/linux/mullvad-early-boot-blocking.service"
install -m755 -D "$builddir/dist-assets/linux/mullvad-daemon.service" \
"$subpkgdir/usr/lib/systemd/system/mullvad-daemon.service"
install -m755 -D "$builddir/dist-assets/linux/mullvad-early-boot-blocking.service" \
"$subpkgdir/usr/lib/systemd/system/mullvad-early-boot-blocking.service"
} }
suid() { suid() {
pkgdesc="mullvad-exclude cli for split tunneling" pkgdesc="mullvad-exclude cli for split tunneling"
depends="$pkgname=$pkgver-r$pkgrel" depends="$pkgname=$pkgver-r$pkgrel"
install -m4755 -D "$_cargo_release_dir/mullvad-exclude" \ install -m4755 -Dt "$subpkgdir/usr/bin/" \
"$subpkgdir/usr/bin/mullvad-exclude" "$_cargo_release_dir/mullvad-exclude"
} }
sha512sums=" sha512sums="

View File

@@ -1,9 +0,0 @@
#!/bin/sh
set -eu
rm -r /var/log/mullvad-vpn/ || \
echo "Failed to remove mullvad-vpn logs"
rm -r /var/cache/mullvad-vpn/ || \
echo "Failed to remove mullvad-vpn cache"
rm -r /etc/mullvad-vpn || \
echo "Failed to remove mullvad-vpn config"