summaryrefslogtreecommitdiffstats
path: root/misc/ssss/ssss.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'misc/ssss/ssss.SlackBuild')
-rw-r--r--misc/ssss/ssss.SlackBuild82
1 files changed, 53 insertions, 29 deletions
diff --git a/misc/ssss/ssss.SlackBuild b/misc/ssss/ssss.SlackBuild
index fa4a21816c..27c75fc97f 100644
--- a/misc/ssss/ssss.SlackBuild
+++ b/misc/ssss/ssss.SlackBuild
@@ -23,14 +23,27 @@
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# markus reichelt, slackbuilds@mareichelt.de, 0xCCEEF115
+# markus reichelt, email removed.
# 2011 Apr 07 - initial release
+# 20230911 bkw: update for v0.5.7.
+# - switch to MrJoy's fork, which has some minor enhancements.
+# - get rid of ssss.1.html: the existing one in our repo is outdated,
+# and the updated one doesn't build properly. it's the same content
+# as the man page, anyway, so redundant.
+
+# 20230709 bkw: BUILD=2
+# - new maintainer.
+# - man page symlinks to the actual command names.
+# - borrow patches from Debian to fix a bug (bad use of memset) and
+# clean up doc.html so it doesn't load an image from paypal.com every
+# time you view it.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=ssss
-VERSION=${VERSION:-0.5}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-0.5.7}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -42,9 +55,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
@@ -56,16 +66,12 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
fi
set -e
@@ -73,34 +79,52 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+rm -rf $PRGNAM-releases-v$VERSION
+# 20230911 bkw: since upstream puts a / in the tag name (releases/v0.5.7),
+# the magic github URL includes a "v" in the filename.
+tar xvf $CWD/$PRGNAM-releases-v$VERSION.tar.gz
+cd $PRGNAM-releases-v$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 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 {} +
-mkdir -p $PKG/usr/bin $PKG/usr/man/man1 $PKG/usr/doc/$PRGNAM-$VERSION
+# 20230709 bkw: Some patches taken from Debian's ssss-0.5-5. Don't
+# need the Makefile patch, and the "man page" patch really patches the
+# XML source to the man page, which doesn't help us because we can't
+# rebuild the man page anyway.
+# 20230911 bkw: no longer need the memset patch, upstream applied it already.
+for i in $( cat $CWD/patches/series ); do
+ patch -p1 < $CWD/patches/$i
+done
-sed -i "s/-O2/${SLKCFLAGS}/" Makefile
+# 20230709 bkw: No 'make install', so manual install.
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+PKGBIN=$PKG/usr/bin
+PKGMAN1=$PKG/usr/man/man1
-make ssss-split
-make ssss-combine
+mkdir -p $PKGBIN $PKGDOC $PKGMAN1
-cp -a ssss-split ssss-combine $PKG/usr/bin
-cp $CWD/ssss.1 $PKG/usr/man/man1/
+sed -i "s/-O2/${SLKCFLAGS}/" Makefile
+# 20230709 bkw: 'make ssss.1' is supposed to build the man page, but
+# fails. Original script author included the man page with the
+# script. We can't do "make" with no argument here...
+# 20230911 bkw: MrJoy's fork has a 'make install', but it doesn't do
+# what we want. Manual install still works.
+make ssss-split
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+# 20230709 bkw: ssss-combine is just a symlink.
+cp -a ssss-split $PKGBIN
+ln -s ssss-split $PKGBIN/ssss-combine
-gzip -9 $PKG/usr/man/man1/ssss.1
+# 20230709 bkw: symlink the man pages to the actual command names, to
+# avoid guesswork on the user's part.
+gzip -9c < $CWD/ssss.1 > $PKGMAN1/ssss.1.gz
+ln -s ssss.1.gz $PKGMAN1/ssss-split.1.gz
+ln -s ssss.1.gz $PKGMAN1/ssss-combine.1.gz
-cp -a HISTORY LICENSE doc.html $CWD/ssss.1.html $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cp -a README* HISTORY* LICENSE* THANKS* doc.html $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc