summaryrefslogtreecommitdiffstats
path: root/source/n/links/links.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/links/links.SlackBuild')
-rwxr-xr-xsource/n/links/links.SlackBuild25
1 files changed, 16 insertions, 9 deletions
diff --git a/source/n/links/links.SlackBuild b/source/n/links/links.SlackBuild
index be6dac9e6..7de324090 100755
--- a/source/n/links/links.SlackBuild
+++ b/source/n/links/links.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
-# Copyright 2008, 2009, 2010, 2013, 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2013, 2015, 2018 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,8 +20,10 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PKGNAM=links
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
@@ -34,9 +36,16 @@ if [ -z "$ARCH" ]; then
esac
fi
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
NUMJOBS=${NUMJOBS:-" -j7 "}
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-links
@@ -54,7 +63,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf links-$VERSION
-tar xvf $CWD/links-$VERSION.tar.?z* || exit 1
+tar xvf $CWD/links-$VERSION.tar.?z || exit 1
cd links-$VERSION || exit 1
chown -R root:root .
find . \
@@ -70,11 +79,9 @@ CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
- --enable-javascript \
--enable-graphics \
- --without-x \
- --without-sdl \
- --build=$ARCH-slackware-linux
+ --with-ssl \
+ --build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1