diff options
author | Brenton Earl <brent@exitstatusone.com> | 2016-12-15 21:07:32 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-12-17 06:55:49 +0700 |
commit | 57d0dbb7d66d15de8f87b70e085986e9eda3ad13 (patch) | |
tree | 129bbc4f1b631253019a59195678e6ee51957ef6 /network/sqlmap/sqlmap.SlackBuild | |
parent | 2bc7e6ffeb74818353d7d14fa1b993e21b0a098b (diff) |
network/sqlmap: Updated for version 1.0.12.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'network/sqlmap/sqlmap.SlackBuild')
-rw-r--r-- | network/sqlmap/sqlmap.SlackBuild | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/network/sqlmap/sqlmap.SlackBuild b/network/sqlmap/sqlmap.SlackBuild index cbf7d1c4c66a0..9906bdca7af85 100644 --- a/network/sqlmap/sqlmap.SlackBuild +++ b/network/sqlmap/sqlmap.SlackBuild @@ -3,7 +3,7 @@ # Slackware build script for sqlmap. # Copyright 2010-2011 Marco Bonetti <sid77@slackware.it> -# Copyright 2015 Brenton Earl <brent@exitstatusone.com> +# Copyright 2015-2016 Brenton Earl <brent@exitstatusone.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,7 +24,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=sqlmap -VERSION=${VERSION:-0.9} +VERSION=${VERSION:-1.0.12} ARCH=noarch BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -38,30 +38,37 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT - -# Install sqlmap in /opt +# Extract to opt mkdir -p $PKG/opt -tar xvf $CWD/$VERSION.tar.gz -C $PKG/opt || \ - tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -C $PKG/opt +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -C $PKG/opt chown -R root:root $PKG/opt/$PRGNAM-$VERSION find -L $PKG/opt/$PRGNAM-$VERSION \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# Byte compile to speed up execution +# Taken from Arch Linux +python -m compileall $PKG/opt/$PRGNAM-$VERSION/ +python -O -m compileall $PKG/opt/$PRGNAM-$VERSION/ # Make the wrapper script less prone to maintainer forgetfulness... ln -s $PRGNAM-$VERSION $PKG/opt/$PRGNAM -# rename sqlmap.conf -mv $PKG/opt/$PRGNAM-$VERSION/sqlmap.conf $PKG/opt/$PRGNAM-$VERSION/sqlmap.conf.new +# Install and rename sqlmap.conf +# Without this sqlmap cannot find its config +install -d $PKG/etc +install -Dm644 $PKG/opt/$PRGNAM-$VERSION/sqlmap.conf $PKG/etc/sqlmap.conf.new -# Install an application launcher -mkdir -p $PKG/usr/bin -install -m 0755 $CWD/sqlmap $PKG/usr/bin/ +# Install application wrappers +install -Dm 0755 $CWD/sqlmap $PKG/usr/bin/sqlmap +install -Dm 0755 $CWD/sqlmapapi $PKG/usr/bin/sqlmapapi +# relocate docs mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mv $PKG/opt/$PRGNAM-$VERSION/doc/* $PKG/usr/doc/$PRGNAM-$VERSION +mv $PKG/opt/$PRGNAM-$VERSION/*.md $PKG/usr/doc/$PRGNAM-$VERSION rmdir $PKG/opt/$PRGNAM-$VERSION/doc ln -s /usr/doc/$PRGNAM-$VERSION $PKG/opt/$PRGNAM-$VERSION/doc cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild |