summaryrefslogtreecommitdiff
path: root/network/ettercap/ettercap.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/ettercap/ettercap.SlackBuild')
-rw-r--r--network/ettercap/ettercap.SlackBuild62
1 files changed, 31 insertions, 31 deletions
diff --git a/network/ettercap/ettercap.SlackBuild b/network/ettercap/ettercap.SlackBuild
index 34a8728aa4..5b01e0ada8 100644
--- a/network/ettercap/ettercap.SlackBuild
+++ b/network/ettercap/ettercap.SlackBuild
@@ -1,9 +1,7 @@
#!/bin/sh
# Slackbuild for ettercap
-# forked off ettercap-NG.SlackBuild by Matteo Bernardini <ponce@slackbuilds.org>
-#
-# Copyright 2008 meckafett <tom[DOT]bradish[AT]gmail[DOT]com>
+# Copyright 2013 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +22,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=ettercap
-VERSION=${VERSION:-0.7.4.1}
+VERSION=${VERSION:-0.8.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -55,40 +53,42 @@ else
LIBDIRSUFFIX=""
fi
+IPV6=${IPV6:-OFF}
+LUA=${LUA:-OFF}
+
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM
+rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM
+cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r,a-s .
-
-sed -i "s|-O2 -funroll-loops|$SLKCFLAGS -funroll-loops|" configure.in
-
-sh autogen.sh
-
-CFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib$LIBDIRSUFFIX \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --enable-plugins \
- --enable-gtk \
- --disable-debug \
- --build=$ARCH-slackware-linux \
-
-make
-make install DESTDIR=$PKG
-
-mkdir -p $PKG/usr/share/applications
-cat $CWD/ettercap.desktop > $PKG/usr/share/applications/ettercap.desktop
-
-mv $PKG/etc/etter.conf $PKG/etc/etter.conf.new
+find -L . \
+ \( -perm 777 -o -perm 775 -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 {} \;
+
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DMAN_INSTALLDIR=/usr/man \
+ -DBUNDLED_LIBS=OFF \
+ -DENABLE_IPV6=$IPV6 \
+ -DENABLE_LUA=$LUA \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ make install DESTDIR=$PKG
+cd ..
+
+# don't clobber the config files
+( cd $PKG/etc/ettercap
+ for i in conf dns mdns nbns; do mv etter.$i etter.$i.new ; done )
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true