summaryrefslogtreecommitdiff
path: root/package/libnids
diff options
context:
space:
mode:
authorwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
committerwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
commit219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch)
treeb9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/libnids
Initial import
Diffstat (limited to 'package/libnids')
-rw-r--r--package/libnids/Config.in11
-rw-r--r--package/libnids/Makefile29
-rw-r--r--package/libnids/ipkg/libnids.control5
-rw-r--r--package/libnids/patches/configure.patch73
-rw-r--r--package/libnids/patches/no_asm_for_i386.patch12
5 files changed, 130 insertions, 0 deletions
diff --git a/package/libnids/Config.in b/package/libnids/Config.in
new file mode 100644
index 000000000..aea5d4e2f
--- /dev/null
+++ b/package/libnids/Config.in
@@ -0,0 +1,11 @@
+config ADK_PACKAGE_LIBNIDS
+ prompt "libnids........................... A network intrusion detection library"
+ tristate
+ select ADK_PACKAGE_LIBPCAP
+ select ADK_PACKAGE_LIBNET
+ default n
+ help
+ An implementation of an E-component of Network Intrusion Detection System.
+
+ http://www.packetfactory.net/projects/libnids/
+
diff --git a/package/libnids/Makefile b/package/libnids/Makefile
new file mode 100644
index 000000000..eb0f92e79
--- /dev/null
+++ b/package/libnids/Makefile
@@ -0,0 +1,29 @@
+# $Id$
+#-
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include ${TOPDIR}/rules.mk
+
+PKG_NAME:= libnids
+PKG_VERSION:= 1.18
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 9ee6dcdfac97bae6fe611aa27d2594a5
+MASTER_SITES:= http://www.packetfactory.net/projects/libnids/dist/
+
+include ${TOPDIR}/mk/package.mk
+
+$(eval $(call PKG_template,LIBNIDS,libnids,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+
+CONFIGURE_STYLE= gnu
+CONFIGURE_ARGS+= --with-libnet="${STAGING_DIR}/usr" \
+ --with-libpcap="${STAGING_DIR}/usr"
+XAKE_FLAGS+= install_prefix="${WRKINST}"
+BUILD_STYLE= auto
+INSTALL_STYLE= auto
+
+post-install:
+ ${INSTALL_DIR} ${IDIR_LIBNIDS}/usr/lib
+ ${CP} ${WRKINST}/usr/lib/libnids.so.* ${IDIR_LIBNIDS}/usr/lib/
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/libnids/ipkg/libnids.control b/package/libnids/ipkg/libnids.control
new file mode 100644
index 000000000..f34274269
--- /dev/null
+++ b/package/libnids/ipkg/libnids.control
@@ -0,0 +1,5 @@
+Package: libnids
+Priority: optional
+Section: libs
+Description: implementation of an E-component of Network Intrusion Detection System.
+Depends: libpcap, libnet
diff --git a/package/libnids/patches/configure.patch b/package/libnids/patches/configure.patch
new file mode 100644
index 000000000..b6ec19388
--- /dev/null
+++ b/package/libnids/patches/configure.patch
@@ -0,0 +1,73 @@
+diff -Nur libnids-1.18/configure libnids-1.18.patched/configure
+--- libnids-1.18.orig/configure 2003-10-15 01:40:09.000000000 +0200
++++ libnids-1.18/configure 2007-01-23 00:18:43.000000000 +0100
+@@ -3253,7 +3253,7 @@ presetting ac_cv_c_bigendian=no (or yes)
+ esac
+
+
+-CFLAGS="$CFLAGS -D_BSD_SOURCE"
++CFLAGS="$CFLAGS"
+
+ for ac_func in gettimeofday
+ do
+@@ -3489,17 +3489,21 @@ if test "${with_libpcap+set}" = set; the
+ echo "${ECHO_T}no" >&6
+ ;;
+ *)
+- echo "$as_me:$LINENO: result: $withval" >&5
+-echo "${ECHO_T}$withval" >&6
++ echo "$ac_t""$withval" 1>&6
+ if test -f $withval/pcap.h -a -f $withval/libpcap.a; then
+ owd=`pwd`
+ if cd $withval; then withval=`pwd`; cd $owd; fi
+- PCAP_CFLAGS="-I$withval -I$withval/bpf"
++ PCAPINC="-I$withval -I$withval/bpf"
+ PCAPLIB="-L$withval -lpcap"
++ elif test -f $withval/include/pcap.h -a \
++ -f $withval/include/pcap-bpf.h -a \
++ -f $withval/lib/libpcap.a; then
++ owd=`pwd`
++ if cd $withval; then withval=`pwd`; cd $owd; fi
++ PCAPINC="-I$withval/include"
++ PCAPLIB="-L$withval/lib -lpcap"
+ else
+- { { echo "$as_me:$LINENO: error: pcap.h or libpcap.a not found in $withval" >&5
+-echo "$as_me: error: pcap.h or libpcap.a not found in $withval" >&2;}
+- { (exit 1); exit 1; }; }
++ { echo "configure: error: pcap.h" 1>&2; exit 1; }
+ fi
+ ;;
+ esac
+@@ -3605,18 +3609,18 @@ echo "${ECHO_T}no" >&6
+ *)
+ echo "$as_me:$LINENO: result: $withval" >&5
+ echo "${ECHO_T}$withval" >&6
+- if test -f $withval/include/libnet.h -a -f $withval/lib/libnet.a -a -f $withval/libnet-config ; then
++ if test -f $withval/include/libnet.h -a -f $withval/bin/libnet-config ; then
+ owd=`pwd`
+ if cd $withval; then withval=`pwd`; cd $owd; fi
+- LNET_CFLAGS="-I$withval/include `$withval/libnet-config --defines`"
++ LNET_CFLAGS="-I$withval/include `$withval/bin/libnet-config --defines`"
+ LNETLIB="-L$withval/lib -lnet"
+- elif test -f $withval/include/libnet.h -a -f $withval/src/libnet.a; then
++ elif test -f $withval/include/libnet.h; then
+ owd=`pwd`
+ if cd $withval; then withval=`pwd`; cd $owd; fi
+ LNET_CFLAGS="-I$withval/include"
+- LNETLIB="-L$withval/src -lnet"
++ LNETLIB="-L$withval/lib -lnet"
+ else
+- echo "A working combination of libnet.h, libnet.a and libnet-config not found in $withval; get libnet from www.packetfactory.net/projects/libnet and reinstall"
++ echo "A working combination of libnet.h and libnet-config not found in $withval; get libnet from www.packetfactory.net/projects/libnet and reinstall"
+ { { echo "$as_me:$LINENO: error: libnet" >&5
+ echo "$as_me: error: libnet" >&2;}
+ { (exit 1); exit 1; }; }
+@@ -3861,7 +3865,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-HAVE_BSD_UDPHDR=0
++HAVE_BSD_UDPHDR=1
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+
diff --git a/package/libnids/patches/no_asm_for_i386.patch b/package/libnids/patches/no_asm_for_i386.patch
new file mode 100644
index 000000000..ff6fde7b1
--- /dev/null
+++ b/package/libnids/patches/no_asm_for_i386.patch
@@ -0,0 +1,12 @@
+diff -ruN libnids-1.18-orig/src/checksum.c libnids-1.18/src/checksum.c
+--- libnids-1.18-orig/src/checksum.c 2003-09-20 22:40:44.000000000 +0200
++++ libnids-1.18/src/checksum.c 2005-08-09 23:55:00.000000000 +0200
+@@ -4,7 +4,7 @@
+ #include <netinet/tcp.h>
+ #include <netinet/udp.h>
+
+-#if ( __i386__ || __i386 )
++#if 0
+ // all asm procedures are copied from Linux 2.0.36 and 2.2.10 kernels
+
+ /*