Add nordvpn-bin v5.2.0 from AUR
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ls3ump7hcv46oNnjWW5AXmn
This commit is contained in:
co-authored by
Claude Fable 5
parent
98628968a3
commit
515434db6a
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"source": "aur",
|
||||||
|
"release_ring": "fast",
|
||||||
|
"upstream_commit": "57f2c8d02bdad754f16c1f327939ccb99b62a24d"
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
# Maintainer: Cabel <mxzcabel at tuta dot com>
|
||||||
|
# Contributor: metiis <aur at metiis dot com>
|
||||||
|
# Contributor: Julio Gutierrez <bubuntux at gmail dot com>
|
||||||
|
# Contributor: Martoko <mbastholm at gmail dot com>
|
||||||
|
|
||||||
|
pkgname=nordvpn-bin
|
||||||
|
pkgver=5.2.0
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="NordVPN CLI tool for Linux"
|
||||||
|
arch=('x86_64' 'i686' 'armv7h' 'aarch64' 'armeabi')
|
||||||
|
url="https://nordvpn.com/download/linux/"
|
||||||
|
license=('GPL3')
|
||||||
|
provides=('nordvpn')
|
||||||
|
conflicts=('openvpn-nordvpn')
|
||||||
|
install=nordvpn-bin.install
|
||||||
|
source_x86_64=("https://repo.nordvpn.com/deb/nordvpn/debian/pool/main/n/nordvpn/nordvpn_${pkgver//_/-}_amd64.deb")
|
||||||
|
source_i686=("https://repo.nordvpn.com/deb/nordvpn/debian/pool/main/n/nordvpn/nordvpn_${pkgver//_/-}_i386.deb")
|
||||||
|
source_armv7h=("https://repo.nordvpn.com/deb/nordvpn/debian/pool/main/n/nordvpn/nordvpn_${pkgver//_/-}_armhf.deb")
|
||||||
|
source_aarch64=("https://repo.nordvpn.com/deb/nordvpn/debian/pool/main/n/nordvpn/nordvpn_${pkgver//_/-}_arm64.deb")
|
||||||
|
source_armeabi=("https://repo.nordvpn.com/deb/nordvpn/debian/pool/main/n/nordvpn/nordvpn_${pkgver//_/-}_armel.deb")
|
||||||
|
sha256sums_x86_64=('9850701f589e742e4d92c43eee1f2188262ddb71f40e5453d3a2ad79503db89b')
|
||||||
|
sha256sums_i686=('c119fd9190a1893be659aae1749a8b1a56641f72fe64852b1d27cc35f65b2872')
|
||||||
|
sha256sums_armv7h=('9ffb7020b0f154209c33fb83f30ea4405256d7068ce0ba602c60fb78350f107c')
|
||||||
|
sha256sums_aarch64=('7167223efdca6daf1f84281ed4d2781414a51a4992c51aaa5cab9eb44c979eb4')
|
||||||
|
sha256sums_armeabi=('7289bb44e29ec3f037a05e4047f1d3559536252ccbe94e07ba99c617c25bfcab')
|
||||||
|
|
||||||
|
package() {
|
||||||
|
bsdtar -O -xf *.deb data.tar.gz | bsdtar -C "${pkgdir}" -xJf -
|
||||||
|
|
||||||
|
mv "${pkgdir}/usr/sbin/nordvpnd" "${pkgdir}/usr/bin"
|
||||||
|
rm -r "${pkgdir}/etc/init.d"
|
||||||
|
rm -r "${pkgdir}/usr/sbin"
|
||||||
|
chmod 750 "${pkgdir}/var/lib/nordvpn/"
|
||||||
|
chmod 750 "${pkgdir}/var/lib/nordvpn/data/"
|
||||||
|
echo "g nordvpn - -" | install -Dm644 /dev/stdin "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
post_install() {
|
||||||
|
echo ':: In order to enable nordvpn you have to start the following service:'
|
||||||
|
echo ' sudo systemctl enable --now nordvpnd'
|
||||||
|
echo ':: You have to add yourself to the nordvpn group:'
|
||||||
|
echo " sudo gpasswd -a USERNAME nordvpn"
|
||||||
|
echo ':: You then have to restart for the group to be created:'
|
||||||
|
echo " reboot"
|
||||||
|
# Create symbolic link to library files
|
||||||
|
for lib in /usr/lib/nordvpn/*.so ; do
|
||||||
|
if [[ -f $lib ]] ; then
|
||||||
|
if [[ ! -f "/usr/lib/$(printf '%s' $lib | cut -d '/' -f 5)" ]] ; then
|
||||||
|
ln -s $lib /usr/lib/
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
post_upgrade() {
|
||||||
|
# Create symbolic link to library files
|
||||||
|
for lib in /usr/lib/nordvpn/*.so ; do
|
||||||
|
if [[ -f $lib ]] ; then
|
||||||
|
if [[ $(readlink -- /usr/lib/$(printf '%s' $lib | cut -d '/' -f 5)) == $lib ]] ; then
|
||||||
|
unlink /usr/lib/$(printf '%s' $lib | cut -d '/' -f 5)
|
||||||
|
fi
|
||||||
|
if [[ ! -f "/usr/lib/$(printf '%s' $lib | cut -d '/' -f 5)" ]] ; then
|
||||||
|
ln -s $lib /usr/lib/
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
pre_install() {
|
||||||
|
if [ -d /var/lib/nordvpn/data/ ] ; then
|
||||||
|
chattr -i /var/lib/nordvpn/data/*
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
pre_upgrade() {
|
||||||
|
chattr -i /var/lib/nordvpn/data/*
|
||||||
|
}
|
||||||
|
|
||||||
|
pre_remove() {
|
||||||
|
chattr -i /var/lib/nordvpn/data/*
|
||||||
|
# Create symbolic link to library files
|
||||||
|
for lib in /usr/lib/nordvpn/*.so ; do
|
||||||
|
if [[ -f $lib ]] ; then
|
||||||
|
if [[ $(readlink -- /usr/lib/$(printf '%s' $lib | cut -d '/' -f 5)) == $lib ]] ; then
|
||||||
|
unlink /usr/lib/$(printf '%s' $lib | cut -d '/' -f 5)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user