slackbuilds/_unmaintained/xap/mozillavpn-bin/SlackBuild

64 lines
2.1 KiB
Text
Raw Normal View History

#!/bin/bash
CWD=$(pwd)
2022-11-03 14:15:00 +01:00
PRGNAM=$(basename "$CWD")
GITHUB_REPO=mozilla-mobile/mozilla-vpn-client
VERSION=${VERSION:-$(curl -s https://api.github.com/repos/${GITHUB_REPO}/tags | jq -r '.[0].name' | tr -d v)}
ARCH=$(uname -m)
BUILD=${BUILD:-1}
TAG=${TAG:-gwh}
TMP=${TMP:-/tmp/$TAG}
PKG=$TMP/pkg-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
REPOSITORY=${REPOSITORY:-/var/cache/SlackBuilds.gwh/$PRGNAM}
UBUNTU_VERSION=jammy1
DEBARCH=amd64
2022-11-03 14:15:00 +01:00
mkdir -p "$REPOSITORY"
2022-11-03 14:15:00 +01:00
[ ! -e "$REPOSITORY"/"$PRGNAM-${VERSION}-${ARCH}.deb" ] && wget -c -O "$REPOSITORY"/"$PRGNAM-${VERSION}-${ARCH}.deb" \
"https://launchpad.net/~mozillacorp/+archive/ubuntu/mozillavpn/+files/mozillavpn_${VERSION}-${UBUNTU_VERSION}_${DEBARCH}.deb"
2022-11-03 14:15:00 +01:00
rm -fr "$PKG"
mkdir -p "$PKG"/
2022-11-03 14:15:00 +01:00
cd "$PKG"/ || exit 1
ar x "$REPOSITORY"/"$PRGNAM-${VERSION}-${ARCH}.deb"
rm debian-binary control.tar.zst
tar xvf data.tar.zst && rm data.tar.zst
mv usr/lib{,64}/
2022-11-03 14:15:00 +01:00
mkdir -p "$PKG"/install
2022-11-03 14:15:00 +01:00
cat <<EOF > "$PKG"/install/slack-desc
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
${PRGNAM}: ${PRGNAM} (A fast, secure and easy to use VPN. […] by […] Firefox.)
${PRGNAM}:
${PRGNAM}: One tap to privacy Surf, stream, game, and get work done while
${PRGNAM}: maintaining your privacy online. Whether youre traveling, using
${PRGNAM}: public WiFi, or simply looking for more online security, we will
${PRGNAM}: always put your privacy first.
${PRGNAM}:
${PRGNAM}:
${PRGNAM}:
${PRGNAM}: https://vpn.mozilla.org/
${PRGNAM}: DEPENDS: qt6, md4c
EOF
2022-11-03 14:15:00 +01:00
cd "$PKG" || exit 1
chown -R root:root ./*
rm -f "$PKG"/{,usr/}lib"$(uname -m | grep -o 64)"/*.la
2023-08-16 12:23:26 +02:00
/sbin/makepkg --linkadd y --chown n --prepend "${OUTPUT}"/"${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz"