summaryrefslogtreecommitdiffstats
path: root/development/tclvfs/tclvfs.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/tclvfs/tclvfs.SlackBuild')
-rw-r--r--development/tclvfs/tclvfs.SlackBuild54
1 files changed, 39 insertions, 15 deletions
diff --git a/development/tclvfs/tclvfs.SlackBuild b/development/tclvfs/tclvfs.SlackBuild
index 63abc249d2..7d57c5246f 100644
--- a/development/tclvfs/tclvfs.SlackBuild
+++ b/development/tclvfs/tclvfs.SlackBuild
@@ -2,13 +2,37 @@
# Slackware build script for tclvfs
-# Written by Zbigniew Baniewski, <Zbigniew [dot] Baniewski [at] gmail [dot] com>
+# Copyright 2011-2022 Zbigniew Baniewski <Zbigniew [dot] Baniewski [at] gmail [dot] com>
+# Copyright 2022 Juan M. Lasca <juanmlasca@gmail.com>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# 20222007 Modified by Juan M. Lasca:
+# - updated to version 1.4 (changed website and minor changes)
+# - added code to generate additional man pages
+# - updated patches, remove unneeded ones
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=tclvfs
-VERSION=${VERSION:-20080503}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-1.4}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -20,9 +44,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# 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
@@ -61,13 +82,10 @@ 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 {} \;
-cat $CWD/patches/01-configure.patch | patch -p1 || exit
-cat $CWD/patches/02-encoding.patch | patch -p1 || exit
-cat $CWD/patches/03-m4.patch | patch -p1 || exit
-cat $CWD/patches/04-man.patch | patch -p1 || exit
-cat $CWD/patches/05-pkgindex.patch | patch -p1 || exit
-cat $CWD/patches/06-zipfix.patch | patch -p1 || exit
-cat $CWD/patches/07-vfs.patch | patch -p1 || exit
+cat $CWD/patches/01-encoding.patch | patch -p1 || exit
+cat $CWD/patches/02-man.patch | patch -p1 || exit
+
+autoreconf -f
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -84,11 +102,17 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$PKG
+# remove empty directories
+rmdir $PKG/usr/include
+rmdir $PKG/usr/bin
+
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
-# Fix Manual page
-mv $PKG/usr/man/mann $PKG/usr/man/man1
+# if dtplite tool is installed (tcllib package), generate additional man pages
+[ -x /usr/bin/dtplite ] && \
+ dtplite -o $PKG/usr/man/mann/vfs-filesystems.n nroff doc/vfs-filesystems.man && \
+ dtplite -o $PKG/usr/man/mann/vfs-fsapi.n nroff doc/vfs-fsapi.man
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done