summaryrefslogtreecommitdiffstats
path: root/development/perf/perf.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/perf/perf.SlackBuild')
-rw-r--r--development/perf/perf.SlackBuild19
1 files changed, 13 insertions, 6 deletions
diff --git a/development/perf/perf.SlackBuild b/development/perf/perf.SlackBuild
index 11a90ad0e3..6617210b7b 100644
--- a/development/perf/perf.SlackBuild
+++ b/development/perf/perf.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for perf
@@ -26,13 +26,16 @@
# version and allow the user to override it. Avoids having this build
# break every time Pat releases a new kernel in patches/.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=perf
# This VERSION is actually a dummy. Use KERNEL to set the version.
-VERSION=${VERSION:-5.10.13}
+VERSION=${VERSION:-5.15.19}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -42,7 +45,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+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}
@@ -78,11 +85,11 @@ EOF
case "$KERNEL" in
# if unset, use the running kernel:
- "") SRCDIR="/usr/src/linux-$( uname -r )" ;;
+ "") SRCDIR="/usr/src/linux-$( uname -r )" ; SRCDIR=${SRCDIR%-smp} ;;
# if it's an absolute path, use it as-is:
/*) SRCDIR="$KERNEL" ;;
# otherwise assume it's a version number:
- *) SRCDIR="/usr/src/linux-$KERNEL" ;;
+ *) KERNEL=${KERNEL%-smp} ; SRCDIR="/usr/src/linux-$KERNEL" ;;
esac
[ -f "$SRCDIR/Makefile" ] || die "Can't find kernel source in \"$SRCDIR\""
@@ -141,4 +148,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