summaryrefslogtreecommitdiffstats
path: root/perl/perl-Text-Autoformat/perl-Text-Autoformat.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'perl/perl-Text-Autoformat/perl-Text-Autoformat.SlackBuild')
-rw-r--r--perl/perl-Text-Autoformat/perl-Text-Autoformat.SlackBuild21
1 files changed, 16 insertions, 5 deletions
diff --git a/perl/perl-Text-Autoformat/perl-Text-Autoformat.SlackBuild b/perl/perl-Text-Autoformat/perl-Text-Autoformat.SlackBuild
index 3089f4c6c0..53c42e3146 100644
--- a/perl/perl-Text-Autoformat/perl-Text-Autoformat.SlackBuild
+++ b/perl/perl-Text-Autoformat/perl-Text-Autoformat.SlackBuild
@@ -1,13 +1,17 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for perl-Text-Autoformat
# Written by Šime Ramov <s@ramov.com>
-SRCNAM=Text-Autoformat
-PRGNAM=perl-$SRCNAM
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=perl-Text-Autoformat
VERSION=${VERSION:-1.74}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+SRCNAM=Text-Autoformat
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -17,7 +21,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}
@@ -61,4 +72,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