summaryrefslogtreecommitdiffstats
path: root/network/ucarp/ucarp.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/ucarp/ucarp.SlackBuild')
-rw-r--r--network/ucarp/ucarp.SlackBuild20
1 files changed, 15 insertions, 5 deletions
diff --git a/network/ucarp/ucarp.SlackBuild b/network/ucarp/ucarp.SlackBuild
index 815e891e40..3e7d283ae7 100644
--- a/network/ucarp/ucarp.SlackBuild
+++ b/network/ucarp/ucarp.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for ucarp
@@ -30,10 +30,13 @@
# Patch release to correct a bug that prevents the '-o' flag from working.
#
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=ucarp
VERSION=${VERSION:-1.5.2}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -43,7 +46,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}
@@ -79,7 +89,7 @@ find -L . \
patch -p1 <$CWD/getopt.patch
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="$SLKCFLAGS -fcommon" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
@@ -106,4 +116,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