summaryrefslogtreecommitdiffstats
path: root/slackpkg.SlackBuild
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackware.com>2018-05-24 02:23:40 -0500
committerRobby Workman <rworkman@slackware.com>2018-05-24 02:23:40 -0500
commit90f437c32494785cf467c46cdd465efe30e803f2 (patch)
tree4d97c8eaf13abbd1aaa0fff5aa2fbc81b0ada430 /slackpkg.SlackBuild
parent9c3bd23c8a5ed5c895576c2deb1dc8f29dec07af (diff)
downloadslackpkg-90f437c32494785cf467c46cdd465efe30e803f2.tar.xz
slackpkg.SlackBuild: tweaks to support PRINT_PACKAGE_NAME et al
Diffstat (limited to 'slackpkg.SlackBuild')
-rwxr-xr-xslackpkg.SlackBuild15
1 files changed, 12 insertions, 3 deletions
diff --git a/slackpkg.SlackBuild b/slackpkg.SlackBuild
index 4e30311..a68ee8a 100755
--- a/slackpkg.SlackBuild
+++ b/slackpkg.SlackBuild
@@ -20,15 +20,24 @@
# 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)
PKGNAM=slackpkg
-VERSION=${VERSION:-2.83.0beta2}
+VERSION=${VERSION:-2.83.0}
+ARCH="noarch"
BUILD=${BUILD:-1}
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
+# 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 "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
rm -rf $PKG
mkdir -p $TMP $PKG
@@ -109,5 +118,5 @@ cat $CWD/doinst.sh | sed -e "s/@VERSION@/$VERSION/g" > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-noarch-$BUILD.txz
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz