summaryrefslogtreecommitdiffstats
path: root/network/ipcalc
diff options
context:
space:
mode:
Diffstat (limited to 'network/ipcalc')
-rw-r--r--network/ipcalc/README9
-rw-r--r--network/ipcalc/ipcalc.SlackBuild16
2 files changed, 18 insertions, 7 deletions
diff --git a/network/ipcalc/README b/network/ipcalc/README
index 93860e8cac..54cea5ec5d 100644
--- a/network/ipcalc/README
+++ b/network/ipcalc/README
@@ -1,4 +1,5 @@
-ipcalc takes an IP address and netmask and calculates the resulting broadcast,
-network, Cisco wildcard mask, and host range. By giving a second netmask, you
-can design sub- and supernetworks. It is also intended to be a teaching tool
-and presents the results as easy-to-understand binary values.
+ipcalc takes an IP address and netmask and calculates the resulting
+broadcast, network, Cisco wildcard mask, and host range. By giving
+a second netmask, you can design sub- and supernetworks. It is
+also intended to be a teaching tool and presents the results as
+easy-to-understand binary values.
diff --git a/network/ipcalc/ipcalc.SlackBuild b/network/ipcalc/ipcalc.SlackBuild
index b7fd6185c5..d5c2cd48c0 100644
--- a/network/ipcalc/ipcalc.SlackBuild
+++ b/network/ipcalc/ipcalc.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for ipcalc
@@ -22,15 +22,25 @@
# 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=ipcalc
VERSION=${VERSION:-0.41}
ARCH=noarch
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
CGIBINDIR=${CGIBINDIR:-/var/www/cgi-bin}
-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}
@@ -63,4 +73,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