aboutsummaryrefslogtreecommitdiff
path: root/games/zennode/zennode.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-10-11 21:59:20 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-10-13 00:52:42 +0700
commit981d71e8b92e9623d287e8684dd7c82257c4c327 (patch)
tree9cf293d81eb1d3fea6ba53196d2d43ab4996816e /games/zennode/zennode.SlackBuild
parent8e4083e4833bdcfacdb8d3a70d6f346b4b95fb5d (diff)
games/zennode: Update slack-desc, add man page.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/zennode/zennode.SlackBuild')
-rw-r--r--games/zennode/zennode.SlackBuild38
1 files changed, 23 insertions, 15 deletions
diff --git a/games/zennode/zennode.SlackBuild b/games/zennode/zennode.SlackBuild
index 58d53c910766b..3a8ac56258de4 100644
--- a/games/zennode/zennode.SlackBuild
+++ b/games/zennode/zennode.SlackBuild
@@ -6,6 +6,10 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20211011 bkw: BUILD=3
+# - flesh out slack-desc with some real information.
+# - add man pages for the other tools.
+
# 20180215 bkw: BUILD=2, move binary to /usr/games
cd $(dirname $0) ; CWD=$(pwd)
@@ -24,9 +28,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
@@ -59,15 +60,16 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $ZIPNAME-$VERSION
-unzip $CWD/$PRGNAM-$VERSION.zip
+
+# 20211011 bkw: the -x stuff skips extracting the prebuilt binaries
+# and saves ~700KB in /tmp.
+unzip $CWD/$PRGNAM-$VERSION.zip -x '*/linux*/*' '*/win32/*'
cd $ZIPNAME-$VERSION
unzip $PRGNAM-src.zip
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 {} \;
+
+# 20211011 bkw: permissions suck, do not revert to template.
+find . -type d -exec chmod 755 {} + -o -type f -exec chmod 644 {} +
# Don't install "compare" as /usr/bin/compare, it conflicts with imagemagick.
# This patch just adds a note to compare.html explaining the situation.
@@ -84,17 +86,23 @@ cd src/$ZIPNAME
ln -s $PRGNAM $PKG/usr/games/$ZIPNAME
cd -
-# man page written for this SlackBuild
+# Man pages written for this SlackBuild. The main zennode.6 was written
+# in raw troff, because I knew no better way to do it back then. The
+# tools man page is generated from zennode-tools.rst, q.v.
+PKGMAN6=$PKG/usr/man/man6
mkdir -p $PKG/usr/man/man6
sed "s,@DOCDIR@,/usr/doc/$PRGNAM-$VERSION/," < $CWD/$PRGNAM.6 \
- | gzip -c > $PKG/usr/man/man6/$PRGNAM.6.gz
+ | gzip -c > $PKGMAN6/$PRGNAM.6.gz
+ln -s $PRGNAM.6.gz $PKGMAN6/$ZIPNAME.6.gz
-# install docs with "install -m0644" rather than "cp -a" because upstream's
-# permissions aren't what we want.
+gzip -9c < $CWD/zennode-tools.6 > $PKGMAN6/zennode-tools.6.gz
+for i in bspdiff bspinfo zn-compare; do
+ ln -s zennode-tools.6.gz $PKGMAN6/$i.6.gz
+done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/samples
-install -m0644 doc/* src/COPYING $PKG/usr/doc/$PRGNAM-$VERSION
-install -m0644 Samples/* $PKG/usr/doc/$PRGNAM-$VERSION/samples
+cp -a doc/* src/COPYING $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a Samples/* $PKG/usr/doc/$PRGNAM-$VERSION/samples
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install