diff options
Diffstat (limited to 'libraries/sdformat/sdformat.SlackBuild')
-rw-r--r-- | libraries/sdformat/sdformat.SlackBuild | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/libraries/sdformat/sdformat.SlackBuild b/libraries/sdformat/sdformat.SlackBuild index 5dea256ef6..daf4f7834c 100644 --- a/libraries/sdformat/sdformat.SlackBuild +++ b/libraries/sdformat/sdformat.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for sdformat @@ -23,11 +23,14 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=sdformat -DIRNAME=osrf-sdformat-e5ac5aaa49f2 VERSION=${VERSION:-4.2.0} +SRCNAM="$PRGNAM"-sdformat4_"$VERSION" BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -37,7 +40,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} @@ -61,9 +71,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $DIRNAME -tar xvf $CWD/${PRGNAM}4_$VERSION.tar.gz || tar xvf $CWD/$DIRNAME.tar.gz -cd $DIRNAME +rm -rf $SRCNAM +tar xvf $CWD/$SRCNAM.tar.gz +cd $SRCNAM chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -71,6 +81,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# Patch for cmake >= 3.9.x +patch -p1 < $CWD/cmake.patch + mkdir -p build cd build cmake \ @@ -92,4 +105,4 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc 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 |