From acb71a16b134bd29209fed8870143c7867ed2621 Mon Sep 17 00:00:00 2001 From: Mxzcabel Date: Fri, 9 May 2025 15:21:16 -0300 Subject: [PATCH] -- add libxml2-legacy as needed dependency as community request --- PKGBUILD | 5 ++--- nordvpn-bin.install | 28 +++------------------------- 2 files changed, 5 insertions(+), 28 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 4e7b6b8..24dae7b 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -5,13 +5,12 @@ pkgname=nordvpn-bin pkgver=3.20.2 -pkgrel=3 +pkgrel=4 pkgdesc="NordVPN CLI tool for Linux" arch=('x86_64' 'i686' 'armv7h' 'aarch64' 'armeabi') url="https://nordvpn.com/download/linux/" license=('GPL3') -depends=('libxml2') -optdepends=('libxml2-legacy') +depends=('libxml2-legacy') provides=('nordvpn') conflicts=('openvpn-nordvpn') install=nordvpn-bin.install diff --git a/nordvpn-bin.install b/nordvpn-bin.install index 94abf64..fda9160 100644 --- a/nordvpn-bin.install +++ b/nordvpn-bin.install @@ -5,7 +5,7 @@ post_install() { echo " sudo gpasswd -a USERNAME nordvpn" echo ':: You then have to restart for the group to be created:' echo " reboot" - # Add logic to avoid interposing with sqlite library if it already exists + # 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 @@ -16,7 +16,7 @@ post_install() { } post_upgrade() { - # Add logic to avoid interposing with sqlite library if it already exists + # 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 @@ -33,33 +33,15 @@ pre_install() { if [ -d /var/lib/nordvpn/data/ ] ; then chattr -i /var/lib/nordvpn/data/* fi - ## Remove symbolic link from latest patch - if [[ $(readlink -- /usr/lib/libxml2.so.2) == /usr/lib/nordvpn/libxml2.so.2 ]] ; then - unlink /usr/lib/libxml2.so.2 - fi - echo "::: README" - echo "::: Before use, install libxml2-legacy from extra repository." - echo "::: It is flagged as optional, but it will be mandatory in next release," - echo "::: in case NordVPN had not built against the new libxml2 just yet." - echo "::: 3.20.2-3 was made to remove the symbolic link from previous patch" } pre_upgrade() { chattr -i /var/lib/nordvpn/data/* - ## Remove symbolic link from latest patch - if [[ $(readlink -- /usr/lib/libxml2.so.2) == /usr/lib/nordvpn/libxml2.so.2 ]] ; then - unlink /usr/lib/libxml2.so.2 - fi - echo "::: README" - echo "::: Before use, install libxml2-legacy from extra repository." - echo "::: It is flagged as optional, but it will be mandatory in next release," - echo "::: in case NordVPN had not built against the new libxml2 just yet." - echo "::: 3.20.2-3 was made to remove the symbolic link from previous patch" } pre_remove() { chattr -i /var/lib/nordvpn/data/* - # Add logic to avoid interposing with sqlite library if it already exists + # 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 @@ -67,8 +49,4 @@ pre_remove() { fi fi done - ## Remove symbolic link from latest patch - if [[ $(readlink -- /usr/lib/libxml2.so.2) == /usr/lib/nordvpn/libxml2.so.2 ]] ; then - unlink /usr/lib/libxml2.so.2 - fi }