mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-02 19:02:57 +02:00
New-package: mullvadvpn.
This commit is contained in:
parent
34ec66b608
commit
e0f6c295d3
2 changed files with 96 additions and 0 deletions
26
srcpkgs/mullvadvpn/files/mullvad/run
Normal file
26
srcpkgs/mullvadvpn/files/mullvad/run
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
export MULLVAD_RESOURCE_DIR=/usr/share/mullvad
|
||||||
|
export MULLVAD_LOG_DIR=/var/log/mullvad-vpn
|
||||||
|
export MULLVAD_SETTINGS_DIR=/etc/mullvad-vpn
|
||||||
|
export MULLVAD_CACHE_DIR=/var/cache/mullvad-vpn
|
||||||
|
export MULLVAD_RPC_SOCKET_PATH=/run/mullvad-vpn/mullvad
|
||||||
|
export TALPID_NET_CLS_MOUNT_DIR=/run/mullvad-vpn/cgroup
|
||||||
|
export MULLVAD_MANAGEMENT_SOCKET_GROUP=_mullvad
|
||||||
|
|
||||||
|
# it needs write to /etc/resolv.conf{,.mullvadbackup}
|
||||||
|
# as well as cap_net_raw for sockets
|
||||||
|
|
||||||
|
_user=_mullvad
|
||||||
|
# _caps=-all,+net_admin,+net_bind_service
|
||||||
|
|
||||||
|
! [ -d /run/mullvad-vpn ] && install -m 750 -g $_user -o $_user -d /run/mullvad-vpn
|
||||||
|
|
||||||
|
exec 2>&1
|
||||||
|
#exec setpriv --reuid $_user --regid $_user --clear-groups \
|
||||||
|
# --ambient-caps $_caps \
|
||||||
|
# --inh-caps $_caps \
|
||||||
|
# --bounding-set $_caps \
|
||||||
|
# --no-new-privs -- /usr/bin/mullvad-daemon -v --disable-stdout-timestamps
|
||||||
|
|
||||||
|
exec /usr/bin/mullvad-daemon -v --disable-stdout-timestamps
|
70
srcpkgs/mullvadvpn/template
Normal file
70
srcpkgs/mullvadvpn/template
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
# Template file for 'mullvadvpn'
|
||||||
|
pkgname=mullvadvpn
|
||||||
|
version=2025.7
|
||||||
|
revision=1
|
||||||
|
_wggover=0.0.20230223-mullvad-0.1.6
|
||||||
|
# archs set by upstream
|
||||||
|
archs="x86_64* aarch64*"
|
||||||
|
build_style=cargo
|
||||||
|
build_helper=qemu
|
||||||
|
make_build_args="
|
||||||
|
-p mullvad-daemon --bin mullvad-daemon
|
||||||
|
-p mullvad-cli --bin mullvad
|
||||||
|
-p mullvad-setup --bin mullvad-setup
|
||||||
|
-p mullvad-problem-report --bin mullvad-problem-report
|
||||||
|
-p talpid-openvpn-plugin --lib
|
||||||
|
-p mullvad-exclude --bin mullvad-exclude
|
||||||
|
-p mullvad-api --bin relay_list"
|
||||||
|
make_check_args="-- --skip version_check"
|
||||||
|
hostmakedepends="pkg-config go git protobuf protobuf-devel"
|
||||||
|
makedepends="dbus-devel libnftnl-devel"
|
||||||
|
short_desc="Mullvad VPN client app (cli only)"
|
||||||
|
maintainer="dkwo <npiazza@disroot.org>"
|
||||||
|
license="GPL-3.0-or-later"
|
||||||
|
homepage="https://mullvad.net/"
|
||||||
|
distfiles="https://github.com/mullvad/mullvadvpn-app/archive/refs/tags/${version}.tar.gz
|
||||||
|
https://github.com/mullvad/wireguard-go/archive/refs/tags/${_wggover}.tar.gz"
|
||||||
|
checksum="0231665feed54636fe088c18fdff08d2381cbbcb8f6c0ea97990b3b9d9438500
|
||||||
|
fd9fa45155098223a17ea934eaa6eb44ee990cd2a7ab638bce482f62fd8502e8"
|
||||||
|
skip_extraction="${_wggover}.tar.gz"
|
||||||
|
system_accounts="_mullvad"
|
||||||
|
# make_dirs="
|
||||||
|
# /var/cache/mullvad-vpn 0750 _mullvad _mullvad
|
||||||
|
# /var/log/mullvad-vpn 0750 _mullvad _mullvad
|
||||||
|
# /etc/mullvad-vpn 0750 _mullvad _mullvad"
|
||||||
|
|
||||||
|
case "${XBPS_TARGET_MACHINE}" in
|
||||||
|
*musl)
|
||||||
|
broken="https://github.com/mullvad/mullvadvpn-app/issues/8390"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
# cross to musl fails since wireguard-go-rs exports CC="aarch64-linux-gnu-gcc"
|
||||||
|
|
||||||
|
post_extract() {
|
||||||
|
vsrcextract -C wireguard-go-rs/libwg/wireguard-go "${_wggover}.tar.gz"
|
||||||
|
}
|
||||||
|
|
||||||
|
post_build() {
|
||||||
|
vtargetrun target/${RUST_TARGET}/release/relay_list > dist-assets/relays.json
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
for _bin in mullvad-daemon mullvad mullvad-problem-report mullvad-setup mullvad-exclude; do
|
||||||
|
vbin target/${RUST_TARGET}/release/${_bin}
|
||||||
|
done
|
||||||
|
|
||||||
|
vinstall target/${RUST_TARGET}/release/libtalpid_openvpn_plugin.so 644 usr/lib
|
||||||
|
vinstall dist-assets/relays.json 644 usr/share/mullvad
|
||||||
|
}
|
||||||
|
|
||||||
|
post_install() {
|
||||||
|
compdir=$(mktemp -d)
|
||||||
|
for shell in bash zsh fish; do
|
||||||
|
vtargetrun ${DESTDIR}/usr/bin/mullvad shell-completions ${shell} ${compdir}
|
||||||
|
done
|
||||||
|
vcompletion ${compdir}/mullvad.bash bash mullvad
|
||||||
|
vcompletion ${compdir}/_mullvad zsh mullvad
|
||||||
|
vcompletion ${compdir}/mullvad.fish fish mullvad
|
||||||
|
|
||||||
|
vsv mullvad
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue