summaryrefslogtreecommitdiffstats
path: root/development/fossil/fossil.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/fossil/fossil.SlackBuild')
-rw-r--r--development/fossil/fossil.SlackBuild25
1 files changed, 16 insertions, 9 deletions
diff --git a/development/fossil/fossil.SlackBuild b/development/fossil/fossil.SlackBuild
index 488eff5e00..7e7aac0803 100644
--- a/development/fossil/fossil.SlackBuild
+++ b/development/fossil/fossil.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for fossil
-# Copyright 2019 Andy Goth <andrew.m.goth@gmail.com>
+# Copyright 2021 Andy Goth <andrew.m.goth@gmail.com> USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=fossil
-VERSION=${VERSION:-2.9}
+VERSION=${VERSION:-2.14}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -56,12 +56,21 @@ fi
set -e
+FILE=$CWD/$PRGNAM-src-$VERSION.tar.gz
+DIR=$PRGNAM-$VERSION
+
+if [ ! -e "$FILE" ]; then
+ FILE=$CWD/$PRGNAM-src.tar.gz
+ DIR=$PRGNAM-src
+ VERSION=$( tar -xOf $FILE $DIR/manifest | sed '/^D/!d;s/\..*//;s/[-:D ]//g' )
+fi
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-src-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+rm -rf $DIR
+tar xvf $FILE
+cd $DIR
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -69,8 +78,7 @@ 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 {} \;
-CFLAGS=$SLKCFLAGS \
-CXXFLAGS=$SLKCFLAGS \
+CFLAGS=${CFLAGS:-$SLKCFLAGS} \
./configure \
--prefix=/usr \
--libdir=/usr/lib$LIBDIRSUFFIX \
@@ -79,8 +87,7 @@ CXXFLAGS=$SLKCFLAGS \
make
make install 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
+strip --strip-unneeded $PKG/usr/bin/fossil
mkdir -p $PKG/usr/man/man1
gzip -9c fossil.1 > $PKG/usr/man/man1/fossil.1.gz