From 90f437c32494785cf467c46cdd465efe30e803f2 Mon Sep 17 00:00:00 2001 From: Robby Workman Date: Thu, 24 May 2018 02:23:40 -0500 Subject: slackpkg.SlackBuild: tweaks to support PRINT_PACKAGE_NAME et al --- slackpkg.SlackBuild | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'slackpkg.SlackBuild') 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 -- cgit v1.2.3