Fix install-scripts, and bundle relay list

This commit is contained in:
Joakim Hulthe
2026-04-20 22:28:17 +02:00
committed by Joakim Hulthe
parent 29043fedc1
commit 7af09af8d1
7 changed files with 55 additions and 28 deletions

View File

@@ -24,7 +24,15 @@ makedepends="
libnftnl-dev
"
checkdepends=""
install="$pkgname.post-install $pkgname.pre-upgrade $pkgname.post-upgrade $pkgname.pre-deinstall $pkgname.post-deinstall"
install="
$pkgname.post-install
$pkgname.pre-upgrade
$pkgname.post-upgrade
$pkgname.pre-deinstall
$pkgname.post-deinstall
$pkgname-systemd.post-install
$pkgname-systemd.post-upgrade
"
subpackages="$pkgname-systemd"
source=""
builddir="$srcdir/"
@@ -44,6 +52,8 @@ build() {
# Specify `--target` so that the build artifacts ends up in target/<target>/release to
# avoid clashes with host system when running in a container with a mounted target folder.
# Compile all binaries
cargo auditable build --release --locked \
--target "$CHOST" \
-p mullvad-cli \
@@ -51,6 +61,12 @@ build() {
-p mullvad-exclude \
-p mullvad-problem-report \
-p mullvad-setup
# Generate vendored relay list
cargo run --release --locked \
-p mullvad-api --bin relay_list \
--target "$CHOST" \
> "$builddir/relays.json"
}
check() {
@@ -74,6 +90,10 @@ package() {
install -m755 -D "$_cargo_target_dir/$CHOST/release/mullvad-setup" \
"$pkgdir"/usr/bin/mullvad-setup
# Bundle the vendored relay list. It's copied to /var/cache/mullvad-vpn/ by the post-* scripts.
install -m644 -D "$builddir/relays.json" \
"$pkgdir"/usr/share/mullvad-vpn/relays.json
}
systemd() {