diff options
author | Andrew Clemons <andrew.clemons@gmail.com> | 2022-04-11 23:33:19 +1200 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-04-16 12:12:38 +0700 |
commit | 19c1bb011c8bb7c2d64ac00999857c5dfa7c9cb1 (patch) | |
tree | 37b22f6d9718c5ccae58ca87c84f0f0beacada28 /network/nordvpn | |
parent | 19fb5ded42dec235404566d7b1695b2936868693 (diff) | |
download | slackbuilds-19c1bb011c8bb7c2d64ac00999857c5dfa7c9cb1.tar.gz |
network/nordvpn: Fix ARCH handling.
Allow ARCH to be passed through the environment. Use a dedicated
variable for the ARCH of the debian package to avoid mixing usage
of the ARCH variable for two purposes.
Also update desktop database in doinst.sh.
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/nordvpn')
-rw-r--r-- | network/nordvpn/doinst.sh | 4 | ||||
-rw-r--r-- | network/nordvpn/nordvpn.SlackBuild | 36 |
2 files changed, 19 insertions, 21 deletions
diff --git a/network/nordvpn/doinst.sh b/network/nordvpn/doinst.sh index 4283e18ffc..51d3c3bd15 100644 --- a/network/nordvpn/doinst.sh +++ b/network/nordvpn/doinst.sh @@ -1,3 +1,7 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + if [ -x /usr/bin/update-mime-database ]; then /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 fi diff --git a/network/nordvpn/nordvpn.SlackBuild b/network/nordvpn/nordvpn.SlackBuild index 399f74f5cf..a65d05b5d3 100644 --- a/network/nordvpn/nordvpn.SlackBuild +++ b/network/nordvpn/nordvpn.SlackBuild @@ -28,42 +28,40 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=nordvpn VERSION=${VERSION:-3.12.5} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} # Select nordvpn's default group NORD_GROUP=${NORD_GROUP:-nordvpn} -if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then - echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" - exit 0 -fi - - if [ -z "$ARCH" ]; then case "$( uname -m )" in - x86_64) ARCH=amd64 ;; - i?86) ARCH=i386 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} set -e -if [ "$ARCH" = "i386" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "amd64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" +if [ "$ARCH" = "i586" ]; then + DEBARCH="i386" +elif [ "$ARCH" = "i686" ]; then + DEBARCH="i386" +elif [ "$ARCH" = "x86_64" ]; then + DEBARCH="amd64" else - echo "Package for $(uname -m) architecture is not available." + echo "Package for $ARCH architecture is not available." exit 1 fi @@ -88,7 +86,7 @@ rm -rf $PRGNAM-$VERSION mkdir -p $PRGNAM-$VERSION cd $PKG -ar p $CWD/${PRGNAM}_${VERSION}_${ARCH}.deb data.tar.gz | tar zxv +ar p $CWD/${PRGNAM}_${VERSION}_${DEBARCH}.deb data.tar.gz | tar zxv rm -fR etc usr/lib @@ -105,9 +103,5 @@ cat $CWD/doinst.sh > $PKG/install/doinst.sh mkdir -p $PKG/etc/rc.d install -m 0755 $CWD/rc.$PRGNAM $PKG/etc/rc.d/rc.$PRGNAM -if [ "$ARCH" = "amd64" ]; then - ARCH="x86_64" -fi - cd $PKG /sbin/makepkg -l y -p -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |