summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2014-02-03 14:07:47 +0000
committerMathieu Arnold <mat@FreeBSD.org>2014-02-03 14:07:47 +0000
commitd8d4832d58443dfff67b6a90646c6066ed09bb60 (patch)
tree4e963bcf8753e2ca45c35bb261ac4cb85ecde3d4
parent- Stage support (diff)
- Convert to stage
- Unmark as broken, it should be fixed on 8/9 and on 10 it'll build when net/libnids is fixed. Sponsored by: Absolight
-rw-r--r--security/dsniff/Makefile23
-rw-r--r--security/dsniff/files/patch-Makefile.in50
-rw-r--r--security/dsniff/pkg-plist13
3 files changed, 60 insertions, 26 deletions
diff --git a/security/dsniff/Makefile b/security/dsniff/Makefile
index 908aa6d0ca1d..32d7cebcb8d4 100644
--- a/security/dsniff/Makefile
+++ b/security/dsniff/Makefile
@@ -11,9 +11,8 @@ MASTER_SITES= http://www.monkey.org/~dugsong/${PORTNAME}/ \
MAINTAINER= sbz@FreeBSD.org
COMMENT= Various sniffing utilities for penetration testing
-BROKEN= Fails to build
-
-LICENSE= BSD
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${LOCALBASE}/lib/libnet10/libnet.a:${PORTSDIR}/net/libnet10 \
${LOCALBASE}/lib/libnids.a:${PORTSDIR}/net/libnids
@@ -24,10 +23,10 @@ WANT_GNOME= yes
OPTIONS_DEFINE= X11
OPTIONS_DEFAULT= X11
+OPTIONS_SUB= yes
-MAN8= arpspoof.8 ${PORTNAME}.8 macof.8 mailsnarf.8 tcpkill.8 \
- tcpnice.8 urlsnarf.8 filesnarf.8 dnsspoof.8 msgsnarf.8 \
- sshmitm.8 webmitm.8
+X11_USE= xorg=x11,xmu
+X11_CONFIGURE_WITH=x
LIBNET_VERSION= 10
LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet${LIBNET_VERSION}-config
@@ -37,9 +36,6 @@ LIBNET_INC= "`${LIBNET_CONFIG} --defines` `${LIBNET_CONFIG} --cflags`"
LIBNET_LIB= "-L${LOCALBASE}/include/libnet${LIBNET_VERSION} \
${LOCALBASE}/lib/libnet${LIBNET_VERSION}/libnet.a"
-NO_STAGE= yes
-.include <bsd.port.options.mk>
-
# If net/libnids has been compiled with the GLIB2 option then this port needs
# the corresponding library and additional linker flags.
LIBNIDS_GLIB2?=
@@ -51,15 +47,6 @@ LIBNIDS_GLIB2!= nm -u ${LOCALBASE}/lib/libnids.a | ${GREP} g_thread_init || ${EC
USE_GNOME+= glib20
.endif
-.if ${PORT_OPTIONS:MX11}
-USE_XORG= x11 xmu
-PLIST_SUB+= X11=''
-MAN8+= webspy.8
-.else
-CONFIGURE_ARGS+=--without-x
-PLIST_SUB+= X11='@comment '
-.endif
-
post-patch:
@${REINPLACE_CMD} -Ee \
's|libnet-config|${LIBNET_CONFIG:T}|; \
diff --git a/security/dsniff/files/patch-Makefile.in b/security/dsniff/files/patch-Makefile.in
index d5f9fd9344cc..21d8750b08e6 100644
--- a/security/dsniff/files/patch-Makefile.in
+++ b/security/dsniff/files/patch-Makefile.in
@@ -1,15 +1,23 @@
---- ./Makefile.in.orig 2000-12-15 21:03:26.000000000 +0100
-+++ ./Makefile.in 2013-03-15 07:33:57.000000000 +0100
-@@ -26,7 +26,7 @@
+--- ./Makefile.in.orig 2000-12-15 20:03:26.000000000 +0000
++++ ./Makefile.in 2014-02-03 13:13:21.000000000 +0000
+@@ -8,7 +8,6 @@
+ srcdir = @srcdir@
+ VPATH = @srcdir@
+
+-install_prefix =
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ libdir = @libdir@
+@@ -26,7 +25,7 @@
LNETLIB = @LNETLIB@
NIDSINC = @NIDSINC@
-NIDSLIB = @NIDSLIB@
-+NIDSLIB = @NIDSLIB@ `pkg-config --libs gthread-2.0` `pkg-config --libs gthread-2.0` `pkg-config --libs gthread-2.0`
++NIDSLIB = @NIDSLIB@ `pkg-config --libs gthread-2.0`
DBINC = @DBINC@
DBLIB = @DBLIB@
-@@ -37,9 +37,8 @@
+@@ -37,9 +36,8 @@
X11INC = @X_CFLAGS@
X11LIB = @X_LIBS@ @X_PRE_LIBS@ -lXmu -lX11 @X_EXTRA_LIBS@
@@ -21,7 +29,7 @@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
-@@ -76,22 +75,23 @@
+@@ -76,22 +74,23 @@
.c.o:
$(CC) $(CFLAGS) $(INCS) -c $(srcdir)/$*.c
@@ -51,11 +59,37 @@
-libmissing.a: $(LIBOBJS)
- ar -cr $@ $(LIBOBJS)
- $(RANLIB) $@
-+filesnarf.c: nfs_prot.h
++filesnarf.c: nfs_prot.h nfs_prot.c
dsniff: $(HDRS) $(SRCS) $(OBJS)
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) $(DBLIB) $(SSLLIB)
-@@ -153,7 +153,7 @@
+@@ -136,24 +135,24 @@
+ $(CC) $(LDFLAGS) -o $@ webspy.o base64.o buf.o remote.o $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) $(X11LIB)
+
+ install:
+- test -d $(install_prefix)$(sbindir) || \
+- $(INSTALL) -d $(install_prefix)$(sbindir)
++ test -d $(DESTDIR)$(sbindir) || \
++ $(INSTALL) -d $(DESTDIR)$(sbindir)
+ for file in $(PROGS); do \
+- $(INSTALL_PROGRAM) -m 755 $$file $(install_prefix)$(sbindir); \
++ $(INSTALL_PROGRAM) -m 755 $$file $(DESTDIR)$(sbindir); \
+ done
+- test -d $(install_prefix)$(libdir) || \
+- $(INSTALL) -d $(install_prefix)$(libdir)
++ test -d $(DESTDIR)$(libdir) || \
++ $(INSTALL) -d $(DESTDIR)$(libdir)
+ for file in $(CONFIGS); do \
+- $(INSTALL_DATA) $$file $(install_prefix)$(libdir); \
++ $(INSTALL_DATA) $$file $(DESTDIR)$(libdir); \
+ done
+- test -d $(install_prefix)$(mandir)/man8 || \
+- $(INSTALL) -d $(install_prefix)$(mandir)/man8
++ test -d $(DESTDIR)$(mandir)/man8 || \
++ $(INSTALL) -d $(DESTDIR)$(mandir)/man8
+ for file in *.8; do \
+- $(INSTALL_DATA) $$file $(install_prefix)$(mandir)/man8; \
++ $(INSTALL_DATA) $$file $(DESTDIR)$(mandir)/man8; \
done
clean:
diff --git a/security/dsniff/pkg-plist b/security/dsniff/pkg-plist
index 110054b1abf5..d50b478b0c51 100644
--- a/security/dsniff/pkg-plist
+++ b/security/dsniff/pkg-plist
@@ -14,3 +14,16 @@ sbin/tcpnice
sbin/urlsnarf
sbin/webmitm
%%X11%%sbin/webspy
+man/man8/arpspoof.8.gz
+man/man8/dsniff.8.gz
+man/man8/macof.8.gz
+man/man8/mailsnarf.8.gz
+man/man8/tcpkill.8.gz
+man/man8/tcpnice.8.gz
+man/man8/urlsnarf.8.gz
+man/man8/filesnarf.8.gz
+man/man8/dnsspoof.8.gz
+man/man8/msgsnarf.8.gz
+man/man8/sshmitm.8.gz
+man/man8/webmitm.8.gz
+%%X11%%man/man8/webspy.8.gz