diff options
Diffstat (limited to 'office/wordgrinder/wordgrinder.SlackBuild')
-rw-r--r-- | office/wordgrinder/wordgrinder.SlackBuild | 45 |
1 files changed, 31 insertions, 14 deletions
diff --git a/office/wordgrinder/wordgrinder.SlackBuild b/office/wordgrinder/wordgrinder.SlackBuild index d9b19328cc..f664061b05 100644 --- a/office/wordgrinder/wordgrinder.SlackBuild +++ b/office/wordgrinder/wordgrinder.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for wordgrinder -# Copyright 2018 Dimitris Zlatanidis Orestiada, Greece +# Copyright 2018-2022 Dimitris Zlatanidis Orestiada, Greece # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +22,17 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20220218 bkw: Modified by SlackBuilds.org, BUILD=2: +# - fix 15.0 build. +# - use correct icon path in .desktop file. + +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=wordgrinder -VERSION=${VERSION:-0.7.2} +VERSION=${VERSION:-0.8} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,7 +42,11 @@ if [ -z "$ARCH" ]; then 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} @@ -65,25 +76,31 @@ 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 \ + -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 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ # Fix of paths for Slackware sed -i '7s!$(HOME)!'$PKG'/usr!' Makefile -sed -i 's!share\/!!' Makefile +sed -i '10s!SHAREDIR!PREFIX!' Makefile +sed -i '11s!SHAREDIR!PREFIX!' Makefile + +# 20220218 bkw: Slackware 15.0's ncurses headers don't define KEY_EVENT, +# and wordgrinder doesn't seem to actually use it anyway. +sed -i '/KEY_EVENT/d' src/c/arch/unix/cursesw/dpy.c -make +make CFLAGS="$SLKCFLAGS" make install DESTDIR=$PKG +gzip -9 $PKG/usr/man/man1/* -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 doc and mime paths +mv $PKG/usr/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION +mv $PKG/usr/share/mime-info $PKG/usr/share/mime/ -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 +# 20220218 bkw: binaries are stripped by default mkdir -p $PKG/usr/share/applications -install -D -m644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop +install -D -m644 extras/$PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop mkdir -p $PKG/usr/share/pixmaps/ install -D -m644 extras/icon.png $PKG/usr/share/pixmaps/${PRGNAM}.png @@ -97,4 +114,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh 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 |