summaryrefslogtreecommitdiffstats
path: root/source/d/cmake/cmake.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/d/cmake/cmake.SlackBuild')
-rwxr-xr-xsource/d/cmake/cmake.SlackBuild28
1 files changed, 18 insertions, 10 deletions
diff --git a/source/d/cmake/cmake.SlackBuild b/source/d/cmake/cmake.SlackBuild
index 1f832f00f..6bd22500c 100755
--- a/source/d/cmake/cmake.SlackBuild
+++ b/source/d/cmake/cmake.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
-# Copyright 2008, 2009, 2010, 2011, 2013, 2015 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2011, 2013, 2015, 2017, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,8 +20,10 @@
# 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=cmake
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
@@ -34,6 +36,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 "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
NUMJOBS=${NUMJOBS:-" -j7 "}
if [ "$ARCH" = "i586" ]; then
@@ -46,7 +56,6 @@ else
SLKCFLAGS="-O2"
fi
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
@@ -55,8 +64,8 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf $PKGNAM-$VERSION
-tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
-cd $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
+cd $PKGNAM-$VERSION || exit 1
chown -R root:root .
find . \
@@ -76,7 +85,7 @@ cd cmake-build
--no-system-jsoncpp \
--system-zlib \
--system-bzip2 \
- --system-libarchive
+ --system-libarchive || exit 1
# --system-libs
# --sphinx-man \
@@ -93,8 +102,7 @@ CXXFLAGS="$SLKCFLAGS" \
--no-system-jsoncpp \
--system-zlib \
--system-bzip2 \
- --system-libarchive \
- --build=$ARCH-slackware-linux
+ --system-libarchive || exit 1
# --system-libs \
# --sphinx-man \
@@ -104,7 +112,7 @@ make install DESTDIR=$PKG || exit 1
# Install preprocessed man pages instead of adding six new python packages:
( cd $PKG
- tar xf $CWD/cmake.manpages.tar.xz
+ tar xf $CWD/cmake.manpages.tar.?z
)
# If there's a ChangeLog, installing at least part of the recent history