summaryrefslogtreecommitdiffstats
path: root/network/sshfs-fuse/sshfs-fuse.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/sshfs-fuse/sshfs-fuse.SlackBuild')
-rw-r--r--network/sshfs-fuse/sshfs-fuse.SlackBuild76
1 files changed, 48 insertions, 28 deletions
diff --git a/network/sshfs-fuse/sshfs-fuse.SlackBuild b/network/sshfs-fuse/sshfs-fuse.SlackBuild
index 1e43941878..1a4e9412a0 100644
--- a/network/sshfs-fuse/sshfs-fuse.SlackBuild
+++ b/network/sshfs-fuse/sshfs-fuse.SlackBuild
@@ -1,7 +1,8 @@
#!/bin/sh
-# Copyright 2012, Michiel van Wessem, Leicester, United Kingdom
# Copyright 2006-2009 Alan Hicks, Lizella, GA
+# Copyright 2012, Michiel van Wessem, Leicester, United Kingdom
+# Copyright 2020, B. Watson
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,9 +22,19 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Now maintained by B. Watson <yalhcru@gmail.com>
+
+# Note: I'm aware the fixrst.diff isn't being applied. Please leave
+# it in the repo, it's the source for the sshfs.1.gz, which *is*
+# installed. Need the diff to comply with the GPL.
+
+# 20200101 bkw:
+# - take over maintenance
+# - update for v3.6.0. too many changes to build old versions.
+
PRGNAM=sshfs-fuse
SRCNAM=sshfs
-VERSION=${VERSION:-2.8}
+VERSION=${VERSION:-3.6.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -60,36 +71,45 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-$VERSION
-tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+tar xvf $CWD/$SRCNAM-$VERSION.tar.?z*
cd $SRCNAM-$VERSION
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -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" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --build=$ARCH-slackware-linux
-
-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
-
-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
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+mkdir build
+cd build
+ CFLAGS="-Wl,-s $SLKCFLAGS" \
+ CXXFLAGS="-Wl,-s $SLKCFLAGS" \
+ meson .. \
+ --buildtype=release \
+ --infodir=/usr/info \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --prefix=/usr \
+ --sysconfdir=/etc
+ ninja
+ DESTDIR=$PKG ninja install
+cd ..
+
+# Use prebuilt man page, so this build doesn't depend on docutils.
+# Also, the supplied sshfs.rst is slightly broken, this man page was
+# made from a slightly fixed version (see fixrst.diff).
+# Don't use the one installed by ninja, if there was one.
+MANDIR=$PKG/usr/man/man1
+rm -f $MANDIR/$SRCNAM.1
+mkdir -p $MANDIR
+cat $CWD/$SRCNAM.1.gz > $MANDIR/$SRCNAM.1.gz
+
+# We got symlinks for commands, so link the man pages too. Slightly
+# wrong, as the linked commands are in /usr/sbin, but the man page
+# is section 1 (not 8). I can live with it.
+ln -s $SRCNAM.1.gz $MANDIR/mount.fuse.sshfs.1.gz
+ln -s $SRCNAM.1.gz $MANDIR/mount.sshfs.1.gz
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING ChangeLog $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING ChangeLog* README* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install