APKBUILD fixes

This commit is contained in:
2026-04-12 12:52:08 +02:00
parent 84c30e3130
commit 3ff5cf83fc
2 changed files with 26 additions and 30 deletions

View File

@@ -2,22 +2,22 @@
# Maintainer: Joakim Hulthe <joakim@hulthe.net>
pkgname=mullvad-vpn-slint
pkgver=2026.1_git
pkgrel=2
pkgrel=3
pkgdesc="Mullvad VPN GUI"
url="https://mullvad.net/"
arch="$(uname -m)"
arch="all"
license="GPL-3-or-later"
# TODO: maybe depend on mullvad-vpn-daemon?
depends="
"
makedepends="
build-base
rustup
musl-dev
pkgconfig
protobuf-dev
fontconfig-dev
dbus-dev
build-base
cargo-auditable
rust
pkgconfig
protobuf-dev
fontconfig-dev
dbus-dev
"
checkdepends=""
install=""
@@ -28,28 +28,25 @@ options="net !check"
_cargo_target_dir="${CARGO_TARGET_DIR:-$startdir/mullvadvpn-app/target}"
build() {
# rustup-init -y --default-toolchain stable
source "$HOME/.cargo/env"
prepare() {
default_prepare
cd "$startdir/mullvadvpn-app"
cargo fetch --target "$CHOST" --locked
}
# rustup default stable
local target="$(rustup +stable show active-toolchain | sed 's/^[^-]*-//' | grep -o "^[^ ]*")"
build() {
cd "$startdir/mullvadvpn-app"
# * Force the `stable` toolchain since it's installed in the container.
# We don't wan't to needlessly download rust while building.
# * Specify `--target` so that the final binary ends up in target/<target>/release.
cargo +stable build --release --locked \
--target "$target" \
# Specify `--target` so that the final binary ends up in target/<target>/release.
cargo build --release --locked \
--target "$CHOST" \
-p mullvad-slint
}
package() {
local target="$(rustup +stable show active-toolchain | sed 's/^[^-]*-//' | grep -o "^[^ ]*")"
# Executable
install -m755 -D "$_cargo_target_dir/$target/release/mullvad-slint" \
install -m755 -D "$_cargo_target_dir/$CHOST/release/mullvad-slint" \
"$pkgdir"/usr/bin/mullvad-slint
# .desktop file