summaryrefslogtreecommitdiffstats
path: root/network/r8168/r8168.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/r8168/r8168.SlackBuild')
-rw-r--r--network/r8168/r8168.SlackBuild26
1 files changed, 18 insertions, 8 deletions
diff --git a/network/r8168/r8168.SlackBuild b/network/r8168/r8168.SlackBuild
index 3603724cc5..59274c56fb 100644
--- a/network/r8168/r8168.SlackBuild
+++ b/network/r8168/r8168.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for r8168
-# Copyright 2016-2019 Hunter Sezen California, USA
+# Copyright 2016-2020 Hunter Sezen California, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,16 @@
# 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)
+
PRGNAM=r8168
-VERSION=${VERSION:-8.047.04}
+VERSION=${VERSION:-8.048.03}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+KERNEL="${KERNEL:-"$(uname -r)"}"
+PKGVER="$(printf %s "${VERSION}_$KERNEL" | tr - _)"
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +41,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# 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 "$PRGNAM-$PKGVER-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -69,9 +82,6 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-KERNEL="${KERNEL:-"$(uname -r)"}"
-PKGVER="$(printf %s "${VERSION}_$KERNEL" | tr - _)"
-
(
unset ARCH
cd /lib/modules/$KERNEL/build
@@ -97,4 +107,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
sed "s%@KERNEL@%$KERNEL%" $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$PKGVER-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$PKGVER-$ARCH-$BUILD$TAG.$PKGTYPE