summaryrefslogtreecommitdiffstats
path: root/audio/ntk/ntk.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'audio/ntk/ntk.SlackBuild')
-rw-r--r--audio/ntk/ntk.SlackBuild48
1 files changed, 27 insertions, 21 deletions
diff --git a/audio/ntk/ntk.SlackBuild b/audio/ntk/ntk.SlackBuild
index 6a5bc29cd8..fcc74a417e 100644
--- a/audio/ntk/ntk.SlackBuild
+++ b/audio/ntk/ntk.SlackBuild
@@ -1,7 +1,7 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for non
-# Copyright 2013 Klaatu @ member.fsf.org
+# Copyright 2013-22 Klaatu @ member.fsf.org
# GNU All-Permissive License
# Copying and distribution of this file, with or without modification,
@@ -9,30 +9,36 @@
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
-PRGNAM=ntk
-SRCNAM=ntk #comment out if building from git
-#to build from git uncomment this one
-#SRCNAM=non
+cd $(dirname $0) ; CWD=$(pwd)
-VERSION=${VERSION:-23092014}
+PRGNAM=ntk
+VERSION=${VERSION:-1.3.1001}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
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-$SRCNAM
+PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -49,9 +55,14 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $SRCNAM-git-$VERSION
-tar xvf $CWD/$SRCNAM-git-$VERSION.tar.bz2
-cd $SRCNAM-git-$VERSION
+rm -rf $PRGNAM
+TARBALL=$CWD/v"${VERSION}".tar.gz
+if [ ! -e "$TARBALL" ] ; then
+ TARBALL=$CWD/$PRGNAM-v"${VERSION}".tar.gz
+fi
+tar xvf "$TARBALL"
+cd $PRGNAM
+
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -59,11 +70,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 {} \;
-# do this if cloning from git
-#git submodule update --init
-
-# we are at project root, ie non/
-cd lib/ntk
./waf configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
@@ -84,4 +90,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