summaryrefslogtreecommitdiffstats
path: root/system/tbsm/tbsm.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/tbsm/tbsm.SlackBuild')
-rw-r--r--system/tbsm/tbsm.SlackBuild42
1 files changed, 11 insertions, 31 deletions
diff --git a/system/tbsm/tbsm.SlackBuild b/system/tbsm/tbsm.SlackBuild
index 622bfb906a..6b0baace63 100644
--- a/system/tbsm/tbsm.SlackBuild
+++ b/system/tbsm/tbsm.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for tbsm
-# Copyright 2019-2022 Isaac Yu <isaacyu1@isaacyu1.com>
+# Copyright 2019-2023 Isaac Yu <isaacyu@protonmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,22 +25,13 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=tbsm
-VERSION=${VERSION:-0.6}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-0.7}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i586 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
- esac
-fi
+ARCH=noarch
-# 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
@@ -50,20 +41,6 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
set -e
rm -rf $PKG
@@ -79,17 +56,20 @@ 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 {} \;
+# Change doc folder location from /usr/share/tbsm to /usr/doc/tbsm-0.7/doc
+sed -i 's/share\/doc\/${MyName}/doc\/$(notdir $(CURDIR))\/doc/g' Makefile
+
+# within the tbsm binary, change docpath from /usr/share/tbsm/doc to /usr/doc/tbsm-0.7/doc
+sed -i 's/share\/doc\/tbsm/doc\/${myName}-${myVersion}\/doc/g' src/tbsm
+
make
make install PREFIX=/usr DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-# Redundant directory
-rm -r $PKG/usr/share/doc/tbsm
-
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a doc/ themes/ changelog license readme-install.txt README.md $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a themes/ changelog license readme-install.txt README.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE