Skip to content

Commit 4b2b1e1

Browse files
committed
New-package: mullvadvpn.
1 parent 22e2421 commit 4b2b1e1

File tree

2 files changed

+96
-0
lines changed

2 files changed

+96
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/sh
2+
3+
export MULLVAD_RESOURCE_DIR=/usr/share/mullvad
4+
export MULLVAD_LOG_DIR=/var/log/mullvad-vpn
5+
export MULLVAD_SETTINGS_DIR=/etc/mullvad-vpn
6+
export MULLVAD_CACHE_DIR=/var/cache/mullvad-vpn
7+
export MULLVAD_RPC_SOCKET_PATH=/run/mullvad-vpn/mullvad
8+
export TALPID_NET_CLS_MOUNT_DIR=/run/mullvad-vpn
9+
export MULLVAD_MANAGEMENT_SOCKET_GROUP=_mullvad
10+
11+
# it needs write to /etc/resolv.conf{,.mullvadbackup}
12+
# as well as cap_net_raw for sockets
13+
14+
# _user=_mullvad
15+
# _caps=-all,+net_admin,+net_bind_service
16+
17+
# ! [ -d /run/mullvad-vpn ] && install -m 750 -g $_user -o $_user -d /run/mullvad-vpn
18+
19+
exec 2>&1
20+
#exec setpriv --reuid $_user --regid $_user --clear-groups \
21+
# --ambient-caps $_caps \
22+
# --inh-caps $_caps \
23+
# --bounding-set $_caps \
24+
# --no-new-privs -- /usr/bin/mullvad-daemon -v --disable-stdout-timestamps
25+
26+
exec /usr/bin/mullvad-daemon -v --disable-stdout-timestamps

srcpkgs/mullvadvpn/template

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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

Comments
 (0)