|
| 1 | +# Template file for 'mullvadvpn' |
| 2 | +pkgname=mullvadvpn |
| 3 | +version=2025.7 |
| 4 | +revision=1 |
| 5 | +_wggover=0.0.20230223-mullvad-0.1.6 |
| 6 | +# archs set by upstream |
| 7 | +archs="x86_64* aarch64*" |
| 8 | +build_style=cargo |
| 9 | +build_helper=qemu |
| 10 | +make_build_args=" |
| 11 | + -p mullvad-daemon --bin mullvad-daemon |
| 12 | + -p mullvad-cli --bin mullvad |
| 13 | + -p mullvad-setup --bin mullvad-setup |
| 14 | + -p mullvad-problem-report --bin mullvad-problem-report |
| 15 | + -p talpid-openvpn-plugin --lib |
| 16 | + -p mullvad-exclude --bin mullvad-exclude |
| 17 | + -p mullvad-api --bin relay_list" |
| 18 | +make_check_args="-- --skip version_check" |
| 19 | +hostmakedepends="pkg-config go git protobuf protobuf-devel" |
| 20 | +makedepends="dbus-devel libnftnl-devel" |
| 21 | +short_desc="Mullvad VPN client app (cli only)" |
| 22 | +maintainer="dkwo <npiazza@disroot.org>" |
| 23 | +license="GPL-3.0-or-later" |
| 24 | +homepage="https://mullvad.net/" |
| 25 | +distfiles="https://github.com/mullvad/mullvadvpn-app/archive/refs/tags/${version}.tar.gz |
| 26 | + https://github.com/mullvad/wireguard-go/archive/refs/tags/${_wggover}.tar.gz" |
| 27 | +checksum="0231665feed54636fe088c18fdff08d2381cbbcb8f6c0ea97990b3b9d9438500 |
| 28 | + fd9fa45155098223a17ea934eaa6eb44ee990cd2a7ab638bce482f62fd8502e8" |
| 29 | +skip_extraction="${_wggover}.tar.gz" |
| 30 | +system_accounts="_mullvad" |
| 31 | +# make_dirs=" |
| 32 | +# /var/cache/mullvad-vpn 0750 _mullvad _mullvad |
| 33 | +# /var/log/mullvad-vpn 0750 _mullvad _mullvad |
| 34 | +# /etc/mullvad-vpn 0750 _mullvad _mullvad" |
| 35 | + |
| 36 | +case "${XBPS_TARGET_MACHINE}" in |
| 37 | + *musl) |
| 38 | + broken="https://github.com/mullvad/mullvadvpn-app/issues/8390" |
| 39 | + ;; |
| 40 | +esac |
| 41 | +# cross to musl fails since wireguard-go-rs exports CC="aarch64-linux-gnu-gcc" |
| 42 | + |
| 43 | +post_extract() { |
| 44 | + vsrcextract -C wireguard-go-rs/libwg/wireguard-go "${_wggover}.tar.gz" |
| 45 | +} |
| 46 | + |
| 47 | +post_build() { |
| 48 | + vtargetrun target/${RUST_TARGET}/release/relay_list > dist-assets/relays.json |
| 49 | +} |
| 50 | + |
| 51 | +do_install() { |
| 52 | + for _bin in mullvad-daemon mullvad mullvad-problem-report mullvad-setup mullvad-exclude; do |
| 53 | + vbin target/${RUST_TARGET}/release/${_bin} |
| 54 | + done |
| 55 | + |
| 56 | + vinstall target/${RUST_TARGET}/release/libtalpid_openvpn_plugin.so 644 usr/lib |
| 57 | + vinstall dist-assets/relays.json 644 usr/share/mullvad |
| 58 | +} |
| 59 | + |
| 60 | +post_install() { |
| 61 | + compdir=$(mktemp -d) |
| 62 | + for shell in bash zsh fish; do |
| 63 | + vtargetrun ${DESTDIR}/usr/bin/mullvad shell-completions ${shell} ${compdir} |
| 64 | + done |
| 65 | + vcompletion ${compdir}/mullvad.bash bash mullvad |
| 66 | + vcompletion ${compdir}/_mullvad zsh mullvad |
| 67 | + vcompletion ${compdir}/mullvad.fish fish mullvad |
| 68 | + |
| 69 | + vsv mullvad |
| 70 | +} |
0 commit comments