summaryrefslogtreecommitdiffstats
path: root/packages/net-vpn/mullvad-vpn
diff options
context:
space:
mode:
Diffstat (limited to 'packages/net-vpn/mullvad-vpn')
-rw-r--r--packages/net-vpn/mullvad-vpn/mullvad-vpn-2026.5.exheres-062
1 files changed, 62 insertions, 0 deletions
diff --git a/packages/net-vpn/mullvad-vpn/mullvad-vpn-2026.5.exheres-0 b/packages/net-vpn/mullvad-vpn/mullvad-vpn-2026.5.exheres-0
new file mode 100644
index 0000000..4a3da5b
--- /dev/null
+++ b/packages/net-vpn/mullvad-vpn/mullvad-vpn-2026.5.exheres-0
@@ -0,0 +1,62 @@
+# Copyright 2026 Gurov <thuggerthugger1@duck.com>
+# Distributed under the terms of the GNU General Public License v2
+
+SUMMARY="Mullvad VPN desktop client and daemon"
+HOMEPAGE="https://mullvad.net/"
+
+DOWNLOADS="https://cdn.mullvad.net/app/desktop/releases/${PV}/MullvadVPN-${PV}_amd64.deb -> ${PNV}.deb"
+
+LICENCES="GPL-3"
+SLOT="0"
+PLATFORMS="~amd64"
+
+DEPENDENCIES="
+ build:
+ app-arch/xz
+
+ run:
+ dev-libs/at-spi2-core
+ sys-sound/alsa-lib
+ x11-dri/mesa
+ x11-dri/libdrm
+ sys-apps/dbus
+"
+
+WORK="${WORKBASE}"
+
+pkg_setup() {
+ exdirectory --allow /opt
+}
+
+src_unpack() {
+ local checksum
+ checksum=$(sha256sum "${FETCHEDDIR}/${PNV}.deb") || die "Cannot checksum Mullvad archive"
+ [[ ${checksum%% *} == aa6bd00452588597f50e8ca2f02bb91e9c295c4f01b0ae907354552e7428e7ab ]] ||
+ die "Mullvad archive changed; check version before updating checksum"
+
+ default
+ unpack ./data.tar.xz
+}
+
+src_install() {
+ edo mkdir -p "${IMAGE}/opt" "${IMAGE}/usr"
+ edo cp -rT "${WORK}/opt" "${IMAGE}/opt"
+ edo cp -rT "${WORK}/usr" "${IMAGE}/usr"
+
+ edo mkdir -p "${IMAGE}/usr/${CHOST}"
+ edo mv "${IMAGE}/usr/bin" "${IMAGE}/usr/${CHOST}/"
+
+ if [[ -d "${IMAGE}/usr/lib" ]]; then
+ edo mv "${IMAGE}/usr/lib" "${IMAGE}/usr/${CHOST}/"
+ fi
+
+ local helper="${IMAGE}/usr/${CHOST}/bin/mullvad-exclude"
+ [[ -f ${helper} && ! -L ${helper} ]] || die "Mullvad exclusion helper is missing or not a regular file"
+ edo chown root:root "${helper}"
+ edo chmod 4755 "${helper}"
+
+ edo mkdir -p "${IMAGE}/usr/share/zsh/site-functions"
+ edo mv "${IMAGE}/usr/local/share/zsh/site-functions/_mullvad" "${IMAGE}/usr/share/zsh/site-functions/"
+ edo rmdir "${IMAGE}/usr/local/share/zsh/site-functions" "${IMAGE}/usr/local/share/zsh" \
+ "${IMAGE}/usr/local/share" "${IMAGE}/usr/local"
+}