2001-03-10 16:04:21 +01:00
|
|
|
# New ports collection makefile for: ettercap
|
|
|
|
# Date created: 19 February 2001
|
|
|
|
# Whom: George Reid <greid@ukug.uk.freebsd.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2005-09-09 17:24:38 +02:00
|
|
|
PORTNAME= ettercap
|
|
|
|
PORTVERSION= 0.7.3
|
2004-12-29 22:52:25 +01:00
|
|
|
DISTVERSIONPREFIX= NG-
|
2007-05-19 22:36:56 +02:00
|
|
|
PORTREVISION= 5
|
2005-09-09 17:24:38 +02:00
|
|
|
PORTEPOCH= 1
|
|
|
|
CATEGORIES= net-mgmt security
|
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED} \
|
|
|
|
${MASTER_SITE_PACKETSTORM:S:%SUBDIR%:sniffers/ettercap:}
|
2001-07-28 04:00:47 +02:00
|
|
|
MASTER_SITE_SUBDIR= ${PORTNAME}
|
2001-03-10 16:04:21 +01:00
|
|
|
|
2005-09-16 19:58:32 +02:00
|
|
|
MAINTAINER= mnag@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
|
|
|
|
2007-01-31 15:09:55 +01:00
|
|
|
BUILD_DEPENDS= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet
|
2004-10-25 13:40:20 +02:00
|
|
|
|
2005-09-09 17:24:38 +02:00
|
|
|
OPTIONS= GTK "Build with GTK2+ GUI" on \
|
|
|
|
ICONV "Build with support for UTF-8" on \
|
|
|
|
PLUGINS "Build with ettercap plugins" on \
|
|
|
|
SSL "Build with support for SSH1 and SSL decryption" on \
|
|
|
|
PCRE "Build with PCRE regexps in filters" on
|
|
|
|
|
|
|
|
WANT_GNOME= yes
|
2006-02-23 11:40:44 +01:00
|
|
|
USE_AUTOTOOLS= libltdl:15
|
2004-10-25 13:40:20 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2003-10-14 18:01:11 +02:00
|
|
|
|
2004-10-25 13:40:20 +02:00
|
|
|
MAN5= etter.conf.5
|
|
|
|
MAN8= ettercap.8 ettercap_curses.8 etterfilter.8 etterlog.8
|
|
|
|
DOCS= AUTHORS CHANGELOG README README.BINARIES README.BUGS \
|
|
|
|
README.CVS README.PLATFORMS THANKS TODO TODO.TESTING \
|
|
|
|
doc/capture doc/decoders doc/dissectors doc/threads
|
2001-03-10 16:04:21 +01:00
|
|
|
|
2007-01-31 15:09:55 +01:00
|
|
|
LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet11-config
|
|
|
|
|
2003-10-14 18:01:11 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
CFLAGS+= ${PTHREAD_CFLAGS}
|
2004-10-25 13:40:20 +02:00
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include
|
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib
|
2007-01-31 15:09:55 +01:00
|
|
|
CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" \
|
|
|
|
LIBS="${LDFLAGS}"
|
|
|
|
CONFIGURE_ARGS+= --enable-plugins
|
2004-10-25 13:40:20 +02:00
|
|
|
CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
|
2003-10-14 18:01:11 +02:00
|
|
|
|
2004-10-25 13:40:20 +02:00
|
|
|
.if ${OSVERSION} < 502111
|
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/lib/libpcap.a:${PORTSDIR}/net/libpcap
|
|
|
|
CONFIGURE_ARGS+= --with-libpcap=${LOCALBASE}
|
2003-10-14 18:01:11 +02:00
|
|
|
.endif
|
2004-10-25 13:40:20 +02:00
|
|
|
|
|
|
|
.if !defined(WITHOUT_GTK)
|
2005-09-09 17:24:38 +02:00
|
|
|
USE_GNOME= glib20 atk pango gtk20
|
|
|
|
PKGNAMESUFFIX+= -gtk2
|
2004-10-25 13:40:20 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-gtk
|
2003-10-14 18:01:11 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-gtk
|
|
|
|
.endif
|
2005-09-09 17:24:38 +02:00
|
|
|
|
2004-10-25 13:40:20 +02:00
|
|
|
.if !defined(WITHOUT_ICONV)
|
2005-09-09 17:24:38 +02:00
|
|
|
USE_ICONV= yes
|
2004-10-25 13:40:20 +02:00
|
|
|
CONFIGURE_ARGS+= --with-iconv=${LOCALBASE}
|
|
|
|
.endif
|
2005-09-09 17:24:38 +02:00
|
|
|
|
2004-10-25 13:40:20 +02:00
|
|
|
.if !defined(WITHOUT_PCRE)
|
2005-09-09 17:24:38 +02:00
|
|
|
LIB_DEPENDS+= pcre.0:${PORTSDIR}/devel/pcre
|
2004-10-25 13:40:20 +02:00
|
|
|
CONFIGURE_ARGS+= --with-libpcre=${LOCALBASE}
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-libpcre
|
|
|
|
.endif
|
2005-09-09 17:24:38 +02:00
|
|
|
|
2004-10-25 13:40:20 +02:00
|
|
|
.if !defined(WITHOUT_PLUGINS)
|
2005-09-09 17:24:38 +02:00
|
|
|
MAN8+= ettercap_plugins.8
|
|
|
|
DOCS+= doc/plugins
|
2004-10-25 13:40:20 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-plugins
|
2005-09-09 17:24:38 +02:00
|
|
|
PLIST_SUB+= PLUGINS=""
|
2004-10-25 13:40:20 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-plugins
|
|
|
|
PLIST_SUB+= PLUGINS="@comment "
|
|
|
|
.endif
|
2005-09-09 17:24:38 +02:00
|
|
|
|
2004-10-25 13:40:20 +02:00
|
|
|
.if !defined(WITHOUT_SSL)
|
2005-09-09 17:24:38 +02:00
|
|
|
.include "${PORTSDIR}/Mk/bsd.openssl.mk"
|
2004-10-25 13:40:20 +02:00
|
|
|
CONFIGURE_ARGS+= --with-openssl=${OPENSSLBASE}
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-openssl
|
2001-03-10 16:04:21 +01:00
|
|
|
.endif
|
|
|
|
|
2004-02-27 12:30:18 +01:00
|
|
|
post-patch:
|
2007-01-31 15:09:55 +01:00
|
|
|
@${REINPLACE_CMD} -Ee \
|
|
|
|
's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|; \
|
|
|
|
s|test -f /usr/include/libnet\.h|${TRUE}|; \
|
|
|
|
s|(LNETINC=).*|\1"`${LIBNET_CONFIG} --cflags`"|; \
|
|
|
|
s|(LNETLIB=).*|\1"`${LIBNET_CONFIG} --libs`"|' \
|
|
|
|
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
|
2004-10-25 13:40:20 +02:00
|
|
|
@${REINPLACE_CMD} -E -e 's|(^pkgdatadir.+=).+|\1 ${DATADIR}|' \
|
|
|
|
${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:
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/share/etter.conf \
|
|
|
|
${PREFIX}/etc/etter.conf.sample
|
2005-09-09 17:24:38 +02:00
|
|
|
. if !exists(${PREFIX}/etc/etter.conf)
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/share/etter.conf ${PREFIX}/etc/etter.conf
|
|
|
|
. endif
|
|
|
|
. if !defined(NOPORTDOCS)
|
|
|
|
@${MKDIR} ${DOCSDIR}
|
|
|
|
. for i in ${DOCS}
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/$i ${DOCSDIR}
|
|
|
|
. endfor
|
|
|
|
. endif
|
2001-03-10 16:04:21 +01:00
|
|
|
|
2003-10-14 18:01:11 +02:00
|
|
|
.include <bsd.port.post.mk>
|