2012-10-09 16:18:24 +02:00
|
|
|
# Created by: George Reid <greid@ukug.uk.freebsd.org>
|
2001-03-10 16:04:21 +01:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2012-02-07 10:45:08 +01:00
|
|
|
PORTNAME= ettercap
|
2012-04-18 10:40:43 +02:00
|
|
|
PORTVERSION= 0.7.4.1
|
2012-06-01 07:26:28 +02:00
|
|
|
PORTREVISION= 1
|
2012-02-07 10:45:08 +01:00
|
|
|
PORTEPOCH= 1
|
|
|
|
CATEGORIES= net-mgmt security
|
2012-04-18 10:40:43 +02:00
|
|
|
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION:R}-Lazarus \
|
2012-02-07 10:45:08 +01:00
|
|
|
${MASTER_SITE_PACKETSTORM:S:%SUBDIR%:sniffers/ettercap:}
|
|
|
|
|
|
|
|
MAINTAINER= sunpoet@FreeBSD.org
|
2003-03-07 07:14:21 +01:00
|
|
|
COMMENT= A network sniffer/interceptor/injector/logger for switched LANs
|
2001-03-10 16:04:21 +01:00
|
|
|
|
2012-02-09 01:59:31 +01:00
|
|
|
BUILD_DEPENDS= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet
|
2004-10-25 13:40:20 +02:00
|
|
|
|
2012-10-09 16:18:24 +02:00
|
|
|
# GTK -> GTK2, ICONV -> UTF8
|
|
|
|
OPTIONS_DEFINE= DOCS GTK2 PCRE PLUGINS SSL UTF8
|
|
|
|
OPTIONS_DEFAULT=GTK2 PCRE PLUGINS SSL UTF8
|
|
|
|
PCRE_DESC= Use PCRE in filters
|
|
|
|
SSL_DESC= SSH1 and SSL decryption support
|
2005-09-09 17:24:38 +02:00
|
|
|
|
2012-02-07 10:45:08 +01:00
|
|
|
CFLAGS+= ${PTHREAD_CFLAGS}
|
|
|
|
CONFIGURE_ENV= LIBS="${LDFLAGS}"
|
|
|
|
CONFIGURE_ARGS= --enable-plugins
|
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include
|
2004-10-25 13:40:20 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2012-02-07 10:45:08 +01:00
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib
|
2010-09-09 21:37:42 +02:00
|
|
|
MAKE_JOBS_UNSAFE= yes
|
2012-02-07 10:45:08 +01:00
|
|
|
USE_AUTOTOOLS= libltdl libtool
|
|
|
|
USE_BISON= build
|
|
|
|
WANT_GNOME= yes
|
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}
|
2003-10-14 18:01:11 +02:00
|
|
|
|
2004-10-25 13:40:20 +02:00
|
|
|
DOCS= AUTHORS CHANGELOG README README.BINARIES README.BUGS \
|
2012-02-07 10:45:08 +01:00
|
|
|
README.GIT README.PLATFORMS THANKS TODO TODO.TESTING \
|
2004-10-25 13:40:20 +02:00
|
|
|
doc/capture doc/decoders doc/dissectors doc/threads
|
2012-10-09 16:18:24 +02:00
|
|
|
MAN5= etter.conf.5
|
|
|
|
MAN8= ettercap.8 ettercap_curses.8 etterfilter.8 etterlog.8
|
2001-03-10 16:04:21 +01:00
|
|
|
|
2012-02-09 01:59:31 +01:00
|
|
|
LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet11-config
|
|
|
|
|
2012-02-07 10:45:08 +01:00
|
|
|
.include <bsd.port.options.mk>
|
2003-10-14 18:01:11 +02:00
|
|
|
|
2012-10-09 16:18:24 +02:00
|
|
|
.if ${PORT_OPTIONS:MGTK2}
|
2012-02-07 10:45:08 +01:00
|
|
|
PKGNAMESUFFIX+= -gtk2
|
|
|
|
CONFIGURE_ARGS+=--enable-gtk
|
2012-10-09 16:18:24 +02:00
|
|
|
USE_GNOME= atk glib20 gtk20 pango
|
2003-10-14 18:01:11 +02:00
|
|
|
.else
|
2012-02-07 10:45:08 +01:00
|
|
|
CONFIGURE_ARGS+=--disable-gtk
|
2003-10-14 18:01:11 +02:00
|
|
|
.endif
|
2005-09-09 17:24:38 +02:00
|
|
|
|
2012-10-09 16:18:24 +02:00
|
|
|
.if ${PORT_OPTIONS:MUTF8}
|
2012-02-07 10:45:08 +01:00
|
|
|
CONFIGURE_ARGS+=--with-iconv=${LOCALBASE}
|
2012-10-09 16:18:24 +02:00
|
|
|
USE_ICONV= yes
|
2004-10-25 13:40:20 +02:00
|
|
|
.endif
|
2005-09-09 17:24:38 +02:00
|
|
|
|
2012-10-09 16:18:24 +02:00
|
|
|
.if ${PORT_OPTIONS:MPCRE}
|
|
|
|
LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre
|
2012-02-07 10:45:08 +01:00
|
|
|
CONFIGURE_ARGS+=--with-libpcre=${LOCALBASE}
|
2004-10-25 13:40:20 +02:00
|
|
|
.else
|
2012-02-07 10:45:08 +01:00
|
|
|
CONFIGURE_ARGS+=--without-libpcre
|
2004-10-25 13:40:20 +02:00
|
|
|
.endif
|
2005-09-09 17:24:38 +02:00
|
|
|
|
2012-10-09 16:18:24 +02:00
|
|
|
.if ${PORT_OPTIONS:MPLUGINS}
|
2012-02-07 10:45:08 +01:00
|
|
|
CONFIGURE_ARGS+=--enable-plugins
|
2012-10-09 16:18:24 +02:00
|
|
|
DOCS+= doc/plugins
|
|
|
|
MAN8+= ettercap_plugins.8
|
2012-02-07 10:45:08 +01:00
|
|
|
PLIST_SUB+= PLUGINS=""
|
2004-10-25 13:40:20 +02:00
|
|
|
.else
|
2012-02-07 10:45:08 +01:00
|
|
|
CONFIGURE_ARGS+=--disable-plugins
|
|
|
|
PLIST_SUB+= PLUGINS="@comment "
|
2004-10-25 13:40:20 +02:00
|
|
|
.endif
|
2005-09-09 17:24:38 +02:00
|
|
|
|
2012-10-09 16:18:24 +02:00
|
|
|
.if ${PORT_OPTIONS:MSSL}
|
2012-02-07 10:45:08 +01:00
|
|
|
CONFIGURE_ARGS+=--with-openssl=${OPENSSLBASE}
|
2012-10-09 16:18:24 +02:00
|
|
|
USE_OPENSSL= yes
|
2004-10-25 13:40:20 +02:00
|
|
|
.else
|
2012-02-07 10:45:08 +01:00
|
|
|
CONFIGURE_ARGS+=--without-openssl
|
2001-03-10 16:04:21 +01:00
|
|
|
.endif
|
|
|
|
|
2012-03-02 22:38:59 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if ${OSVERSION} < 800000
|
|
|
|
BROKEN= does not compile on FreeBSD 7.X
|
|
|
|
.endif
|
|
|
|
|
2004-02-27 12:30:18 +01:00
|
|
|
post-patch:
|
2012-02-07 10:45:08 +01:00
|
|
|
@${REINPLACE_CMD} -E \
|
|
|
|
-e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|' \
|
|
|
|
-e 's|test -f /usr/include/libnet\.h|${TRUE}|' \
|
|
|
|
-e 's|(LNETINC=).*|\1"`${LIBNET_CONFIG} --cflags`"|' \
|
|
|
|
-e 's|(LNETLIB=).*|\1"`${LIBNET_CONFIG} --libs`"|' \
|
|
|
|
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
|
|
|
|
@${REINPLACE_CMD} -E \
|
|
|
|
-e 's|(^pkgdatadir.+=).+|\1 ${DATADIR}|' \
|
|
|
|
-e '/^install-exec-am:/ s|: .*$$|:|'\
|
|
|
|
${WRKSRC}/share/Makefile.in
|
2007-02-06 12:33:41 +01:00
|
|
|
# Fix objformat
|
|
|
|
@${REINPLACE_CMD} -E -e 's|(^.*=).*/usr/bin/objformat.*|\1"elf"|' \
|
|
|
|
${WRKSRC}/aclocal.m4 ${WRKSRC}/configure
|
2003-10-14 18:01:11 +02:00
|
|
|
|
2004-10-25 13:40:20 +02:00
|
|
|
post-install:
|
2012-02-07 10:45:08 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/share/etter.conf ${PREFIX}/etc/etter.conf.sample
|
|
|
|
.if !exists(${PREFIX}/etc/etter.conf)
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/share/etter.conf ${PREFIX}/etc/etter.conf
|
|
|
|
.endif
|
2012-10-09 16:18:24 +02:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2012-02-07 10:45:08 +01:00
|
|
|
${MKDIR} ${DOCSDIR}/
|
|
|
|
cd ${WRKSRC}/ && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}/
|
|
|
|
.endif
|
2001-03-10 16:04:21 +01:00
|
|
|
|
2012-03-02 22:38:59 +01:00
|
|
|
.include <bsd.port.post.mk>
|