summaryrefslogtreecommitdiffstats
path: root/perl/perl-xml-libxml/perl-xml-libxml.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'perl/perl-xml-libxml/perl-xml-libxml.SlackBuild')
-rw-r--r--perl/perl-xml-libxml/perl-xml-libxml.SlackBuild16
1 files changed, 13 insertions, 3 deletions
diff --git a/perl/perl-xml-libxml/perl-xml-libxml.SlackBuild b/perl/perl-xml-libxml/perl-xml-libxml.SlackBuild
index 2011f91aed..b502ce5b90 100644
--- a/perl/perl-xml-libxml/perl-xml-libxml.SlackBuild
+++ b/perl/perl-xml-libxml/perl-xml-libxml.SlackBuild
@@ -1,13 +1,16 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for perl-xml-libxml
# Written by Murat D. Kadirov <banderols@gmail.com>
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=perl-xml-libxml
VERSION=${VERSION:-2.0134}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
SRCNAM=XML-LibXML
@@ -19,7 +22,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}
@@ -68,4 +78,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