diff options
Diffstat (limited to 'perl-template.SlackBuild')
-rw-r--r-- | perl-template.SlackBuild | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/perl-template.SlackBuild b/perl-template.SlackBuild index cb20ee0..88aa177 100644 --- a/perl-template.SlackBuild +++ b/perl-template.SlackBuild @@ -54,6 +54,7 @@ PRGNAM=perl-appname # replace "appname" with name of program VERSION=${VERSION:-1.4.1} # replace with version of program BUILD=${BUILD:-1} TAG=${TAG:-_SBo} # the "_SBo" is required +PKGTYPE=${PKGTYPE:-tgz} SRCNAM="$(printf $PRGNAM | cut -d- -f2-)" @@ -67,6 +68,14 @@ 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 +fi + TMP=${TMP:-/tmp/SBo} # For consistency's sake, use this PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} # Drop the package in /tmp @@ -156,4 +165,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc # Make the package; be sure to leave it in $OUTPUT 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 |