59 lines
1.4 KiB
Plaintext
59 lines
1.4 KiB
Plaintext
# Contributor:
|
|
# Maintainer: Joakim Hulthe <joakim@hulthe.net>
|
|
pkgname=mullvad-slint
|
|
pkgver=2026.1_git
|
|
pkgrel=0
|
|
pkgdesc="Mullvad VPN GUI"
|
|
url="https://mullvad.net/"
|
|
arch="$(uname -m)"
|
|
license="GPL-3-or-later"
|
|
# TODO: maybe depend on mullvad-vpn-daemon?
|
|
depends="
|
|
"
|
|
makedepends="
|
|
build-base
|
|
rustup
|
|
musl-dev
|
|
pkgconfig
|
|
protobuf-dev
|
|
fontconfig-dev
|
|
"
|
|
checkdepends=""
|
|
install=""
|
|
subpackages=""
|
|
source=""
|
|
builddir="$srcdir/"
|
|
options="net !check"
|
|
|
|
|
|
build() {
|
|
# rustup-init -y --default-toolchain stable
|
|
source "$HOME/.cargo/env"
|
|
|
|
cd "$startdir/mullvadvpn-app"
|
|
|
|
# rustup default stable
|
|
local target="$(rustup +stable show active-toolchain | sed 's/^[^-]*-//' | grep -o "^[^ ]*")"
|
|
|
|
# * Force the `stable` toolchain since it's installed in the container.
|
|
# We don't wan't to needlessly download rust while building.
|
|
# * Disable `tray-icon` feature. (TODO: figure out how to compile with libdbus)
|
|
# * Specify `--target` so that the final binary ends up in target/<target>/release.
|
|
cargo +stable build --release --locked \
|
|
--target "$target" \
|
|
--no-default-features --features map \
|
|
-p mullvad-slint
|
|
}
|
|
|
|
package() {
|
|
local cargo_target_dir="${CARGO_TARGET_DIR:-$startdir/mullvadvpn-app/target}"
|
|
local target="$(rustup +stable show active-toolchain | sed 's/^[^-]*-//' | grep -o "^[^ ]*")"
|
|
|
|
# TODO: .desktop
|
|
# TODO: icon
|
|
|
|
install -m755 -D "$cargo_target_dir/$target/release/$pkgname" \
|
|
"$pkgdir"/usr/bin/"$pkgname"
|
|
}
|
|
|