summaryrefslogtreecommitdiffstats
path: root/system/cpuid2cpuflags/cpuid2cpuflags.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/cpuid2cpuflags/cpuid2cpuflags.SlackBuild')
-rw-r--r--system/cpuid2cpuflags/cpuid2cpuflags.SlackBuild23
1 files changed, 16 insertions, 7 deletions
diff --git a/system/cpuid2cpuflags/cpuid2cpuflags.SlackBuild b/system/cpuid2cpuflags/cpuid2cpuflags.SlackBuild
index 68f01eac11..b70d037b26 100644
--- a/system/cpuid2cpuflags/cpuid2cpuflags.SlackBuild
+++ b/system/cpuid2cpuflags/cpuid2cpuflags.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
#
# Slackware build script for cpuid2cpuflags.
#
-# Copyright 2017-2020 Edinaldo P. Silva, Rio de Janeiro, Brazil.
+# Copyright 2017-2024 Edinaldo P. Silva, Rio de Janeiro, Brazil.
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,14 @@
# 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=cpuid2cpuflags
-VERSION=${VERSION:-11.0}
+VERSION=${VERSION:-14.0}
+SRCVER="14"
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +39,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-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -56,8 +67,6 @@ fi
set -e
-SRCVER="11"
-
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -98,4 +107,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE