summaryrefslogtreecommitdiffstats
path: root/development/cf-cli/cf-cli.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/cf-cli/cf-cli.SlackBuild')
-rw-r--r--development/cf-cli/cf-cli.SlackBuild36
1 files changed, 23 insertions, 13 deletions
diff --git a/development/cf-cli/cf-cli.SlackBuild b/development/cf-cli/cf-cli.SlackBuild
index 863c43a9b5..a43d59064c 100644
--- a/development/cf-cli/cf-cli.SlackBuild
+++ b/development/cf-cli/cf-cli.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for cf-cli
@@ -22,11 +22,14 @@
# 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=cf-cli
BIN=cf
-PRGNAM=$BIN-cli
-VERSION=${VERSION:-6.50.0}
+VERSION=${VERSION:-7.1.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,24 +38,29 @@ 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}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
+if [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
+ mv $CWD/${BIN}7-cli\_$VERSION\_linux\_$ARCH.tgz $CWD/$PRGNAM\_$VERSION\_linux\_$ARCH.tgz
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
- mv $CWD/$PRGNAM\_$VERSION\_linux\_x86-64.tgz $CWD/$PRGNAM\_$VERSION\_linux\_$ARCH.tgz
+ mv $CWD/${BIN}7-cli\_$VERSION\_linux\_x86-64.tgz $CWD/$PRGNAM\_$VERSION\_linux\_$ARCH.tgz
else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
+ echo "$ARCH is unsupported."
+ exit 1
fi
set -e
@@ -71,10 +79,12 @@ 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 {} \;
+mv ${BIN}7 $PKG/usr/bin/.
mv $BIN $PKG/usr/bin/.
find -L $PKG -type d -exec chmod 755 {} \;
-chmod 755 $PKG/usr/bin/*
+chmod 755 $PKG/usr/bin/${BIN}7
+chmod 755 $PKG/usr/bin/$BIN
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -89,4 +99,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