summaryrefslogtreecommitdiffstats
path: root/system/ciopfs/ciopfs.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/ciopfs/ciopfs.SlackBuild')
-rw-r--r--system/ciopfs/ciopfs.SlackBuild50
1 files changed, 29 insertions, 21 deletions
diff --git a/system/ciopfs/ciopfs.SlackBuild b/system/ciopfs/ciopfs.SlackBuild
index 27b116836c..88cb9f58e7 100644
--- a/system/ciopfs/ciopfs.SlackBuild
+++ b/system/ciopfs/ciopfs.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for ciopfs
# Copyright 2015 Dugan Chen Canada
+# Copyright 2020 B. Watson
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,26 +23,38 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20200413 bkw:
+# - take over maintenance
+# - i486 => i586
+# - include "links -dump" of web page as ciopfs.txt
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=ciopfs
VERSION=${VERSION:-0.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
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}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -63,30 +76,25 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$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 {} \;
-
+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" \
-make
-install -Dm755 ciopfs $PKG/bin/ciopfs
-mkdir -p $PKG/sbin
-( cd $PKG/sbin
-ln -s ../bin/ciopfs mount.ciopfs
-)
+ make
-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
+install -s -Dm755 ciopfs $PKG/bin/ciopfs
+mkdir -p $PKG/sbin
+ln -s ../bin/ciopfs $PKG/sbin/mount.ciopfs
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# 20200413 bkw: Upstream includes no documentation. Text file made from
+# upstream's web site.
+cat $CWD/$PRGNAM.txt > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.txt
+
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