diff options
Diffstat (limited to 'games/cowsay/cowsay.SlackBuild')
-rw-r--r-- | games/cowsay/cowsay.SlackBuild | 54 |
1 files changed, 37 insertions, 17 deletions
diff --git a/games/cowsay/cowsay.SlackBuild b/games/cowsay/cowsay.SlackBuild index 39ffbf7104..3e04332fa9 100644 --- a/games/cowsay/cowsay.SlackBuild +++ b/games/cowsay/cowsay.SlackBuild @@ -1,10 +1,10 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for cowsay # Written by David Miller dave@frop.net # Modified by the slackbuilds.org project. -# Copyright 2017 Johannes Schoepfer +# Copyright 2017-2023 Johannes Schoepfer, Germany # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,13 +24,20 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=cowsay -VERSION=${VERSION:-3.03} +VERSION=${VERSION:-3.7.0} ARCH=noarch BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi -CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -45,27 +52,40 @@ 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 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + \( -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 {} \; -patch -p1 < $CWD/cowsay.SlackBuild.patch +make install prefix=$PKG/usr +mv $PKG/usr/share/man $PKG/usr -DESTDIR=$PKG \ -sh ./install.sh /usr +# add bob cow +cat << 'EOF' > $PKG/usr/share/cowsay/cows/bob.cow +## +## Slackware bob cow, probably by David Miller +## +$the_cow = <<"EOC"; + $thoughts ___ + $thoughts /_ _\\ + $thoughts |/ ~ \\| + |'-.-`| + (|e|e|? + `._^_,' + \\\\=// + U/_/ +EOC +EOF find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -( cd $PKG/usr/man - find . -type f -exec gzip -9 {} \; - for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -) +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 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ - ChangeLog INSTALL LICENSE MANIFEST README pgp_public_key.txt \ + ChangeLog LICENSE.txt README \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild @@ -73,4 +93,4 @@ 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 |