diff options
Diffstat (limited to 'network/translate-shell/translate-shell.SlackBuild')
-rw-r--r-- | network/translate-shell/translate-shell.SlackBuild | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/network/translate-shell/translate-shell.SlackBuild b/network/translate-shell/translate-shell.SlackBuild index 712d4e73e1..47817dea45 100644 --- a/network/translate-shell/translate-shell.SlackBuild +++ b/network/translate-shell/translate-shell.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for translate-shell -# Copyright 2018 Azure Zanculmarktum <zanculmarktum@gmail.com> +# Copyright 2018, 2019, 2020 Azure Zanculmarktum <zanculmarktum@gmail.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +22,13 @@ # 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=translate-shell -VERSION=${VERSION:-0.9.6.7} +VERSION=${VERSION:-0.9.6.11} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# 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 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -75,6 +85,7 @@ sed -i \ -e '/^PREFIX/s,\(/usr\)/local,\1,' \ -e '/^TARGET/s,bash,'"$TARGET"',' \ -e '/\$(PREFIX)\/share\/man/s/\(\$(PREFIX)\)\/share\(\/man\)/\1\2/' \ + -e '/install \$(MANDIR)\/\$(COMMAND)\.1/s,install,& -m644,' \ Makefile make @@ -84,11 +95,11 @@ 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 CONTRIBUTING.md LICENSE Makefile README.md README.template.md WAIVER $PKG/usr/doc/$PRGNAM-$VERSION +cp -p CONTRIBUTING.md LICENSE README.md README.template.md WAIVER $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild 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 |