summaryrefslogtreecommitdiffstats
path: root/network/masscan/masscan.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/masscan/masscan.SlackBuild')
-rw-r--r--network/masscan/masscan.SlackBuild24
1 files changed, 15 insertions, 9 deletions
diff --git a/network/masscan/masscan.SlackBuild b/network/masscan/masscan.SlackBuild
index 2f2f6040af..3d7d7236ce 100644
--- a/network/masscan/masscan.SlackBuild
+++ b/network/masscan/masscan.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for masscan
@@ -22,10 +22,13 @@
# 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=masscan
-VERSION=${VERSION:-1.0.5}
+VERSION=${VERSION:-1.3.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,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}
@@ -60,7 +70,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -69,10 +79,6 @@ 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 {} \;
-# gcc-5 fixes thanks to Arch Linux
-sed -i "s|#elif defined(__GNUC__) && (__GNUC__ == 4)|#elif defined(__GNUC__)|" src/string_s.h
-sed -i -r "s|(CFLAGS )=|\1+=|g" Makefile
-
make
make install DESTDIR=$PKG
install -pDm644 doc/masscan.8 $PKG/usr/man/man8/masscan.8
@@ -91,4 +97,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