aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@slackbuilds.org>2021-07-03 10:38:53 +0200
committerHeinz Wiesinger <pprkut@slackbuilds.org>2021-07-03 12:16:56 +0200
commitae9928fc788ce46e4e9664f2e037e8cc2eb996a0 (patch)
treefd919e0b3cc1850c710bf284ce1c97d4919a3555
parentc6c65e5629bd27c2255ae5070dd57842147a267e (diff)
*.SlackBuild: Support $PRINT_PACKAGE_NAME env var
Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
-rw-r--r--autotools-template.SlackBuild11
-rw-r--r--cmake-template.SlackBuild11
-rw-r--r--haskell-template.SlackBuild11
-rw-r--r--meson-template.SlackBuild11
-rw-r--r--perl-template.SlackBuild11
-rw-r--r--python-template.SlackBuild11
-rw-r--r--rubygem-template.SlackBuild11
7 files changed, 70 insertions, 7 deletions
diff --git a/autotools-template.SlackBuild b/autotools-template.SlackBuild
index fffa185..52c3e13 100644
--- a/autotools-template.SlackBuild
+++ b/autotools-template.SlackBuild
@@ -54,6 +54,7 @@ PRGNAM=appname # replace 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}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -65,6 +66,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
@@ -168,4 +177,4 @@ cat $CWD/doinst.sh > $PKG/install/doinst.sh
# your custom contents of doinst.sh runs, then add the -p switch to
# the makepkg command below -- see makepkg(8) for details
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
diff --git a/cmake-template.SlackBuild b/cmake-template.SlackBuild
index 5920127..26d51ff 100644
--- a/cmake-template.SlackBuild
+++ b/cmake-template.SlackBuild
@@ -54,6 +54,7 @@ PRGNAM=appname # replace 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}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -65,6 +66,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
@@ -154,4 +163,4 @@ cat $CWD/doinst.sh > $PKG/install/doinst.sh
# your custom contents of doinst.sh runs, then add the -p switch to
# the makepkg command below -- see makepkg(8) for details
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
diff --git a/haskell-template.SlackBuild b/haskell-template.SlackBuild
index 206b16f..764511a 100644
--- a/haskell-template.SlackBuild
+++ b/haskell-template.SlackBuild
@@ -54,6 +54,7 @@ PRGNAM=haskell-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="$( echo $PRGNAM | cut -d- -f2- )"
@@ -69,6 +70,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
@@ -151,4 +160,4 @@ cat $CWD/doinst.sh > $PKG/install/doinst.sh
# your custom contents of doinst.sh runs, then add the -p switch to
# the makepkg command below -- see makepkg(8) for details
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
diff --git a/meson-template.SlackBuild b/meson-template.SlackBuild
index d132576..b3fad40 100644
--- a/meson-template.SlackBuild
+++ b/meson-template.SlackBuild
@@ -54,6 +54,7 @@ PRGNAM=appname # replace 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}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -65,6 +66,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
@@ -169,4 +178,4 @@ cat $CWD/doinst.sh > $PKG/install/doinst.sh
# your custom contents of doinst.sh runs, then add the -p switch to
# the makepkg command below -- see makepkg(8) for details
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
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
diff --git a/python-template.SlackBuild b/python-template.SlackBuild
index 53edbe1..ecf7492 100644
--- a/python-template.SlackBuild
+++ b/python-template.SlackBuild
@@ -54,6 +54,7 @@ PRGNAM=appname # replace 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}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -65,6 +66,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
@@ -136,4 +145,4 @@ cat $CWD/doinst.sh > $PKG/install/doinst.sh
# your custom contents of doinst.sh runs, then add the -p switch to
# the makepkg command below -- see makepkg(8) for details
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
diff --git a/rubygem-template.SlackBuild b/rubygem-template.SlackBuild
index 9b27048..b4fbdb0 100644
--- a/rubygem-template.SlackBuild
+++ b/rubygem-template.SlackBuild
@@ -54,6 +54,7 @@ PRGNAM=rubygem-appname # replace 'appname' with name of gem
VERSION=${VERSION:-1.4.1} # replace with version of program
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo} # the "_SBo" is required
+PKGTYPE=${PKGTYPE:-tgz}
SRCNAM=appname # replace with name of gem
@@ -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
@@ -160,4 +169,4 @@ cat $CWD/doinst.sh > $PKG/install/doinst.sh
# your custom contents of doinst.sh runs, then add the -p switch to
# the makepkg command below -- see makepkg(8) for details
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