aboutsummaryrefslogtreecommitdiff
path: root/network/sslscan/sslscan.SlackBuild
diff options
context:
space:
mode:
authorAndrew Clemons <andrew.clemons@gmail.com>2017-02-26 08:58:39 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-02-26 08:58:55 +0700
commited41a8193edb9a4aaf0d1eeb0a138823ff77120b (patch)
tree15d1b9791a512fd0ba451f8bf80ebf43237b8795 /network/sslscan/sslscan.SlackBuild
parentf85077be7b92a6ade91007fe50733e1b61f06cf7 (diff)
network/sslscan: Updated for version 1.11.8_rbsec + new maintainer.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/sslscan/sslscan.SlackBuild')
-rw-r--r--network/sslscan/sslscan.SlackBuild55
1 files changed, 42 insertions, 13 deletions
diff --git a/network/sslscan/sslscan.SlackBuild b/network/sslscan/sslscan.SlackBuild
index 5fdbdb9ea9b59..51ac3f0ead6fc 100644
--- a/network/sslscan/sslscan.SlackBuild
+++ b/network/sslscan/sslscan.SlackBuild
@@ -3,6 +3,9 @@
# Slackware build script for sslscan
# Copyright (c) 2010 Markus Reichelt, Aachen, DE
+# Copyright (c) 2014 Andrew Clemons, Wellington, New Zealand
+# Copyright (c) 2015 Andrew Clemons, Leimen, Germany
+# Copyright (c) 2016-2017 Andrew Clemons, Wellington, New Zealand
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -25,15 +28,20 @@
#
# markus reichelt, slackbuilds@mareichelt.de, 0xCCEEF115
# 2010 June 16 - initial release
+#
+# Andrew Clemons
+# 2014-10-23 - changed to build rbsec's fork from github
PRGNAM=sslscan
-VERSION=${VERSION:-1.10.2}
+VERSION=${VERSION:-1.11.8_rbsec}
+SRCVERS=$(echo "$VERSION" | tr _ -)
+BASEVERS=$(echo "$VERSION" | sed 's/_.*$//' )
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -44,8 +52,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -63,9 +71,23 @@ set -e
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
-cd $PRGNAM-$VERSION
+rm -rf $PRGNAM-$SRCVERS
+tar xvf $CWD/$PRGNAM-$SRCVERS.tar.gz
+cd $PRGNAM-$SRCVERS
+
+patch -p1 < $CWD/Makefile.diff
+
+sed -i "s/^GIT_VERSION = .*$/GIT_VERSION = $BASEVERS/" Makefile
+
+STATIC=${STATIC:-yes}
+
+if [ "$STATIC" = "yes" ] ; then
+ OPENSSLVERSION=${OPENSSLVERSION:-1.0.2k}
+
+ tar xf $CWD/OpenSSL_"$(echo "$OPENSSLVERSION" | tr '.' '_')".tar.gz
+ mv openssl-OpenSSL_"$(echo "$OPENSSLVERSION" | tr '.' '_')" openssl
+fi
+
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -73,13 +95,20 @@ 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 {} \;
-# Thanks to Arch for this patch:
-patch -p1 < $CWD/add-checks-for-ssl3.patch
-
mkdir -p $PKG/usr/bin $PKG/usr/man/man1
-make CFLAGS="$SLKCFLAGS" LDFLAGS="-lssl -lcrypto"
-make install BINPATH=$PKG/usr/bin MANPATH=$PKG/usr/man/
+sed -i "s/^\(CFLAGS.*$\)/\1 $SLKCFLAGS/" Makefile
+
+sed -i "s|^\(PREFIX\).*$|\1 = $PKG/usr|" Makefile
+sed -i "s|^\(MANDIR\).*$|\1 = $PKG/usr/man|" Makefile
+
+if [ "$STATIC" = "yes" ] ; then
+ make static
+else
+ make
+fi
+
+make install
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -87,7 +116,7 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
find $PKG/usr/man -type f -exec gzip -9 {} \;
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a Changelog LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a Changelog INSTALL LICENSE README.md TODO $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install