summaryrefslogtreecommitdiffstats
path: root/development/xtruss/xtruss.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/xtruss/xtruss.SlackBuild')
-rw-r--r--development/xtruss/xtruss.SlackBuild54
1 files changed, 37 insertions, 17 deletions
diff --git a/development/xtruss/xtruss.SlackBuild b/development/xtruss/xtruss.SlackBuild
index 894639819e..ec340a3f36 100644
--- a/development/xtruss/xtruss.SlackBuild
+++ b/development/xtruss/xtruss.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for xtruss.
@@ -7,10 +7,23 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20230103 bkw: update for v20211025.c25bf48. can't build older versions
+# as upstream has switched to cmake.
+
+# 20210907 bkw: update for v20210225.2addd50
+
+# 20201102 bkw:
+# - update for v20200918.a94a153
+# - switch to self-hosted source, as upstream disappears the old source
+# immediately on every new release.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=xtruss
-VERSION=${VERSION:-20181001.82973f5}
+VERSION=${VERSION:-20211025.c25bf48}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -20,11 +33,16 @@ 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}
+# Note: upstream default adds -O3 after our flags :(
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
@@ -51,21 +69,23 @@ chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --build=$ARCH-slackware-linux
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make VERBOSE=1
+ make install/strip DESTDIR=$PKG
+cd ..
-make
-make install-strip DESTDIR=$PKG
+# 20230103 bkw: to avoid having halibut as a dependency, use a
+# prebuilt man page.
+mkdir -p $PKG/usr/man/man1
+gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
-find $PKG/usr/man -type f -exec gzip -9 {} \;
+# in case halibut actually is installed (nothing in /usr/share but man/)
+rm -rf $PKG/usr/share
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a LICENCE README $PKG/usr/doc/$PRGNAM-$VERSION
@@ -75,4 +95,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