summaryrefslogtreecommitdiffstats
path: root/testing/ettercap
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2012-10-25 11:10:54 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2012-10-25 11:11:31 +0000
commitd485a0b7a7259e67b841e8de251432a2d5c5b6b9 (patch)
tree53e129458083f06a156131e9853e80061ca4769b /testing/ettercap
parent26689a8255c2429aa344b3c0c94ea9a9333eb0e4 (diff)
downloadaports-d485a0b7a7259e67b841e8de251432a2d5c5b6b9.tar.bz2
aports-d485a0b7a7259e67b841e8de251432a2d5c5b6b9.tar.xz
testing/ettercap: new aport
Comprehensive suite for man in the middle attacks
Diffstat (limited to 'testing/ettercap')
-rw-r--r--testing/ettercap/APKBUILD50
-rw-r--r--testing/ettercap/ettercap-0.7.4-autotools.patch168
2 files changed, 218 insertions, 0 deletions
diff --git a/testing/ettercap/APKBUILD b/testing/ettercap/APKBUILD
new file mode 100644
index 000000000..c385381d3
--- /dev/null
+++ b/testing/ettercap/APKBUILD
@@ -0,0 +1,50 @@
+# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
+# Maintainer:
+pkgname=ettercap
+pkgver=0.7.4.1
+pkgrel=0
+pkgdesc="Comprehensive suite for man in the middle attacks"
+url="http://ettercap.sourceforge.net/"
+arch="all"
+license="GPL"
+depends=
+depends_dev="autoconf automake bison flex libnet-dev libpcap-dev libtool
+ ncurses-dev openssl-dev pkgconfig"
+makedepends="$depends_dev"
+install=
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
+ ettercap-0.7.4-autotools.patch"
+
+
+_builddir="$srcdir"/$pkgname
+
+prepare() {
+ cd "$_builddir"
+ patch -p1 < ../ettercap-0.7.4-autotools.patch
+}
+
+build() {
+ cd "$_builddir"
+ ./autogen.sh
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --disable-gtk \
+ --enable-plugins \
+ --enable-https
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+
+ # remove the 2 lines below (and this) if there is no init.d script
+ # install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ # install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+}
+
+md5sums="8e13ff5504b5bb4f1fc6a465d57ce7ea ettercap-0.7.4.1.tar.gz
+ec7418a5c21dcda2edae6e36fe7cad72 ettercap-0.7.4-autotools.patch"
diff --git a/testing/ettercap/ettercap-0.7.4-autotools.patch b/testing/ettercap/ettercap-0.7.4-autotools.patch
new file mode 100644
index 000000000..34c6ac89c
--- /dev/null
+++ b/testing/ettercap/ettercap-0.7.4-autotools.patch
@@ -0,0 +1,168 @@
+--- ettercap.orig/configure.in
++++ ettercap/configure.in
+@@ -20,7 +20,7 @@
+ dnl $Id: ettercap-0.7.4-autotools.patch,v 1.2 2011/12/09 20:14:11 radhermit Exp $
+ dnl
+
+-AC_INIT
++AC_INIT(ettercap, 0.7.4)
+ AC_CONFIG_SRCDIR([include/ec.h])
+
+ dnl Force autoconf 2.57
+@@ -32,16 +32,8 @@
+ dnl Do not recompile configure Makefile et similia
+ AM_MAINTAINER_MODE
+
+-VERSION=`grep EC_VERSION\ ./include/ec_version.h | cut -f2 -d"\""`
+-SB=`./shtool echo -n -e %B`
+-EB=`./shtool echo -n -e %b`
+-AC_SUBST(SB)
+-AC_SUBST(EB)
+-AC_SUBST(VERSION)
+-EC_MESSAGE(Configuring ettercap $VERSION)
+-
+ AC_CONFIG_SRCDIR(src)
+-AM_INIT_AUTOMAKE(ettercap, $VERSION)
++AM_INIT_AUTOMAKE([subdir-objects])
+
+ AC_CONFIG_HEADERS([include/config.h])
+ dnl AC_CONFIG_HEADERS(include/config.h)
+@@ -285,29 +277,18 @@
+
+ AC_CONFIG_LIBOBJ_DIR([src/missing])
+
+-AM_CONDITIONAL(MISSING_STRLCPY, false)
+-AM_CONDITIONAL(MISSING_STRLCAT, false)
+-AM_CONDITIONAL(MISSING_STRSEP, false)
+-AM_CONDITIONAL(MISSING_MEMMEM, false)
+-AM_CONDITIONAL(MISSING_MEMCMP, false)
+-AM_CONDITIONAL(MISSING_BASENAME, false)
+-AM_CONDITIONAL(MISSING_GETOPT_LONG, false)
+-AM_CONDITIONAL(MISSING_STRCASESTR, false)
+-AM_CONDITIONAL(MISSING_INET_ATON, false)
+-AM_CONDITIONAL(MISSING_SCANDIR, false)
+-
+ dnl AC_REPLACE_FUNCS(strlcpy)
+
+-AC_CHECK_FUNCS([strlcpy], , [AC_LIBOBJ(strlcpy) AM_CONDITIONAL(MISSING_STRLCPY, true)])
+-AC_CHECK_FUNCS([strlcat], , [AC_LIBOBJ(strlcat) AM_CONDITIONAL(MISSING_STRLCAT, true)])
+-AC_CHECK_FUNCS([strsep], , [AC_LIBOBJ(strsep) AM_CONDITIONAL(MISSING_STRSEP, true)])
+-AC_CHECK_FUNCS([memmem], , [AC_LIBOBJ(memmem) AM_CONDITIONAL(MISSING_MEMMEM, true)])
+-AC_CHECK_FUNCS([memcmp], , [AC_LIBOBJ(memcmp) AM_CONDITIONAL(MISSING_MEMCMP, true)])
+-AC_CHECK_FUNCS([basename], , [AC_LIBOBJ(basename) AM_CONDITIONAL(MISSING_BASENAME, true)])
+-AC_CHECK_FUNCS([getopt_long], , [AC_LIBOBJ(getopt) AM_CONDITIONAL(MISSING_GETOPT_LONG, true)])
+-AC_CHECK_FUNCS([strcasestr], , [AC_LIBOBJ(strcasestr) AM_CONDITIONAL(MISSING_STRCASESTR, true)])
+-AC_CHECK_FUNCS([scandir], , [AC_LIBOBJ(scandir) AM_CONDITIONAL(MISSING_SCANDIR, true)])
+-AC_CHECK_FUNCS([inet_aton], , [AC_LIBOBJ(inet_aton) AM_CONDITIONAL(MISSING_INET_ATON, true)])
++AC_CHECK_FUNCS([strlcpy], , [AC_LIBOBJ(strlcpy)])
++AC_CHECK_FUNCS([strlcat], , [AC_LIBOBJ(strlcat)])
++AC_CHECK_FUNCS([strsep], , [AC_LIBOBJ(strsep)])
++AC_CHECK_FUNCS([memmem], , [AC_LIBOBJ(memmem)])
++AC_CHECK_FUNCS([memcmp], , [AC_LIBOBJ(memcmp)])
++AC_CHECK_FUNCS([basename], , [AC_LIBOBJ(basename)])
++AC_CHECK_FUNCS([getopt_long], , [AC_LIBOBJ(getopt)])
++AC_CHECK_FUNCS([strcasestr], , [AC_LIBOBJ(strcasestr)])
++AC_CHECK_FUNCS([scandir], , [AC_LIBOBJ(scandir)])
++AC_CHECK_FUNCS([inet_aton], , [AC_LIBOBJ(inet_aton)])
+
+ AC_CHECK_LIB(resolv, inet_aton,
+ AM_CONDITIONAL(INET_ATON_WANTS_RESOLV, true),
+@@ -561,7 +542,7 @@
+ dnl ---------
+
+ AH_TEMPLATE(HAVE_PCRE, [perl compatible regex])
+-
++AM_CONDITIONAL(HAVE_PCRE, false)
+ ac_ec_pcre=no
+
+ AC_MSG_CHECKING(for libpcre)
+--- ettercap.orig/utils/etterfilter/Makefile.am
++++ ettercap/utils/etterfilter/Makefile.am
+@@ -8,7 +8,8 @@
+
+ bin_PROGRAMS = etterfilter
+
+-AM_YFLAGS = --defines
++BUILT_SOURCES = ef_grammar.h ef_syntax.c
++AM_YFLAGS = -d
+
+ etterfilter_SOURCES = ef_compiler.c \
+ ef_main.c \
+@@ -26,22 +27,6 @@
+ $(top_srcdir)/src/ec_strings.c
+
+ noinst_HEADERS = ef_grammar.h
+-
+-if MISSING_STRSEP
+- etterfilter_SOURCES += $(top_srcdir)/src/missing/strsep.c
+-endif
+-if MISSING_STRLCPY
+- etterfilter_SOURCES += $(top_srcdir)/src/missing/strlcpy.c
+-endif
+-if MISSING_MEMMEM
+- etterfilter_SOURCES += $(top_srcdir)/src/missing/memmem.c
+-endif
+-if MISSING_INET_ATON
+- etterfilter_SOURCES += $(top_srcdir)/src/missing/inet_aton.c
+-endif
+-if MISSING_GETOPT_LONG
+- etterfilter_SOURCES += $(top_srcdir)/src/missing/getopt.c
+-endif
+
+ etterfilter_CFLAGS = @EC_CFLAGS@
+
+@@ -49,7 +34,7 @@
+ etterfilter_CFLAGS += -pthread
+ endif
+
+-etterfilter_LDADD =
++etterfilter_LDADD = @LIBOBJS@
+
+ if INET_ATON_WANTS_RESOLV
+ etterfilter_LDADD += -lresolv
+--- ettercap.orig/utils/etterlog/Makefile.am
++++ ettercap/utils/etterlog/Makefile.am
+@@ -30,32 +30,10 @@
+ $(top_srcdir)/src/ec_passive.c \
+ $(top_srcdir)/src/ec_strings.c \
+ $(top_srcdir)/src/ec_format.c
+-
+-if MISSING_STRSEP
+- etterlog_SOURCES += $(top_srcdir)/src/missing/strsep.c
+-endif
+-if MISSING_STRLCAT
+- etterlog_SOURCES += $(top_srcdir)/src/missing/strlcat.c
+-endif
+-if MISSING_STRCASESTR
+- etterlog_SOURCES += $(top_srcdir)/src/missing/strcasestr.c
+-endif
+-if MISSING_MEMMEM
+- etterlog_SOURCES += $(top_srcdir)/src/missing/memmem.c
+-endif
+-if MISSING_BASENAME
+- etterlog_SOURCES += $(top_srcdir)/src/missing/basename.c
+-endif
+-if MISSING_INET_ATON
+- etterlog_SOURCES += $(top_srcdir)/src/missing/inet_aton.c
+-endif
+-if MISSING_GETOPT_LONG
+- etterlog_SOURCES += $(top_srcdir)/src/missing/getopt.c
+-endif
+
+ etterlog_CFLAGS = @EC_CFLAGS@
+
+-etterlog_LDADD = -lz @ICONVLIB@
++etterlog_LDADD = -lz @ICONVLIB@ @LIBOBJS@
+
+ if INET_ATON_WANTS_RESOLV
+ etterlog_LDADD += -lresolv
+--- ettercap.orig/Makefile.am
++++ ettercap/Makefile.am
+@@ -43,6 +43,6 @@
+ ./shtool fixperm ./
+
+ install-exec-hook:
+- rm -f $(libdir)/ettercap/*.la
++ rm -f $(DESTDIR)$(libdir)/ettercap/*.la
+ # vim:ts=4:noexpandtab
+