diff options
Diffstat (limited to 'system/megacli/megacli.SlackBuild')
-rw-r--r-- | system/megacli/megacli.SlackBuild | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/system/megacli/megacli.SlackBuild b/system/megacli/megacli.SlackBuild index 2c0850425c..8cdbaf55a1 100644 --- a/system/megacli/megacli.SlackBuild +++ b/system/megacli/megacli.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for MegaCLI -# Copyright 2020 Ebben Aries <e@dscp.org> +# Copyright 2020 Ebben Aries <slackbuilds@dscp.org> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,13 +22,17 @@ # 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) + PRGNAM=megacli ZIPNAM=MegaCLI RPMNAM=MegaCli VERSION=${VERSION:-8.07.14} ZIPVER="$(echo $VERSION | sed -e 's/\./\-/g')" BUILD=${BUILD:-1} +RPMBUILD=${RPMBUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -38,7 +42,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} @@ -58,7 +69,7 @@ rm -rf $PRGNAM-$VERSION unzip -d $PRGNAM-$VERSION $CWD/${ZIPVER}_$ZIPNAM.zip cd $PRGNAM-$VERSION/Linux -rpm2cpio < ${RPMNAM}-${VERSION}-${BUILD}.noarch.rpm | cpio -imdv +rpm2cpio < ${RPMNAM}-${VERSION}-${RPMBUILD}.noarch.rpm | cpio -imdv chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -81,4 +92,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 |