summaryrefslogtreecommitdiff
path: root/package/snort
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/snort
Initial import
Diffstat (limited to 'package/snort')
-rw-r--r--package/snort/Config.in18
-rw-r--r--package/snort/Makefile48
-rw-r--r--package/snort/files/snort.init21
-rw-r--r--package/snort/ipkg/snort.conffiles2
-rw-r--r--package/snort/ipkg/snort.control6
-rw-r--r--package/snort/ipkg/snort.postinst4
6 files changed, 99 insertions, 0 deletions
diff --git a/package/snort/Config.in b/package/snort/Config.in
new file mode 100644
index 000000000..cb376c2f4
--- /dev/null
+++ b/package/snort/Config.in
@@ -0,0 +1,18 @@
+config ADK_PACKAGE_SNORT
+ prompt "snort............................. Ligthweight Network Intrusion Detection System (NIDS)"
+ tristate
+ default n
+ select ADK_PACKAGE_LIBNET
+ select ADK_PACKAGE_LIBPCAP
+ select ADK_PACKAGE_LIBPCRE
+ help
+
+ A ligthweight Network Intrusion Detection System (NIDS)
+
+ http://www.snort.org/
+
+ Depends:
+ - libnet
+ - libpcap
+ - libpcre
+
diff --git a/package/snort/Makefile b/package/snort/Makefile
new file mode 100644
index 000000000..a81c7ac70
--- /dev/null
+++ b/package/snort/Makefile
@@ -0,0 +1,48 @@
+# $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:= snort
+PKG_VERSION:= 2.6.1.2
+PKG_RELEASE:= 8
+PKG_MD5SUM:= 22c448e25538cdf74c62abe586aeac0a
+MASTER_SITES:= http://www.snort.org/dl/current/
+
+include ${TOPDIR}/mk/package.mk
+
+$(eval $(call PKG_template,SNORT,snort,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+
+CONFIGURE_STYLE= gnu
+CONFIGURE_ARGS+= --enable-flexresp \
+ --with-libnet-includes="${STAGING_DIR}/usr/include" \
+ --with-libnet-libraries="${STAGING_DIR}/usr/lib" \
+ --with-libpcap-includes="${STAGING_DIR}/usr/include" \
+ --with-libpcap-libraries="${STAGING_DIR}/usr/lib" \
+ --with-libpcre-includes="${STAGING_DIR}/usr/include" \
+ --with-libpcre-libraries="${STAGING_DIR}/usr/lib" \
+ --without-mysql \
+ --without-postgresql \
+ --disable-inline
+BUILD_STYLE= auto
+INSTALL_STYLE= auto
+
+post-install:
+ ${INSTALL_DIR} ${IDIR_SNORT}/usr/bin
+ ${INSTALL_DIR} ${IDIR_SNORT}/etc/init.d
+ ${INSTALL_DIR} ${IDIR_SNORT}/etc/snort
+ ${INSTALL_BIN} ./files/snort.init \
+ ${IDIR_SNORT}/etc/init.d/snort
+ ${INSTALL_DATA} ${WRKBUILD}/etc/snort.conf ${IDIR_SNORT}/etc/snort/
+ ${INSTALL_DATA} ${WRKBUILD}/etc/classification.config \
+ ${IDIR_SNORT}/etc/snort/
+ ${INSTALL_DATA} ${WRKBUILD}/etc/gen-msg.map ${IDIR_SNORT}/etc/snort/
+ ${INSTALL_DATA} ${WRKBUILD}/etc/reference.config ${IDIR_SNORT}/etc/snort/
+ ${INSTALL_DATA} ${WRKBUILD}/etc/sid-msg.map ${IDIR_SNORT}/etc/snort/
+ ${INSTALL_DATA} ${WRKBUILD}/etc/threshold.conf ${IDIR_SNORT}/etc/snort/
+ ${INSTALL_DATA} ${WRKBUILD}/etc/unicode.map ${IDIR_SNORT}/etc/snort/
+ ${INSTALL_BIN} ${WRKINST}/usr/bin/snort ${IDIR_SNORT}/usr/bin
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/snort/files/snort.init b/package/snort/files/snort.init
new file mode 100644
index 000000000..4880fd549
--- /dev/null
+++ b/package/snort/files/snort.init
@@ -0,0 +1,21 @@
+#!/bin/sh
+#FWINIT 60
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${snort:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ snort $snort_flags
+ ;;
+stop)
+ killall snort
+ ;;
+*)
+ echo "usage: $0 {start | stop | restart}"
+ exit 1
+esac
+exit $?
diff --git a/package/snort/ipkg/snort.conffiles b/package/snort/ipkg/snort.conffiles
new file mode 100644
index 000000000..a224c4c1d
--- /dev/null
+++ b/package/snort/ipkg/snort.conffiles
@@ -0,0 +1,2 @@
+/etc/snort/snort.conf
+/etc/snort/threshold.conf
diff --git a/package/snort/ipkg/snort.control b/package/snort/ipkg/snort.control
new file mode 100644
index 000000000..23ed58724
--- /dev/null
+++ b/package/snort/ipkg/snort.control
@@ -0,0 +1,6 @@
+Package: snort
+Priority: optional
+Section: net
+Description: a flexible Network Intrusion Detection System (NIDS),
+ built without database logging support
+Depends: libnet, libpcap, libpcre
diff --git a/package/snort/ipkg/snort.postinst b/package/snort/ipkg/snort.postinst
new file mode 100644
index 000000000..c491d1c5b
--- /dev/null
+++ b/package/snort/ipkg/snort.postinst
@@ -0,0 +1,4 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf snort snort NO
+add_rcconf snort_flags snort_flags "-i eth0.0 -c /etc/snort/snort.conf -D -N -q -s"