summaryrefslogtreecommitdiff
path: root/package/ulogd
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/ulogd
Initial import
Diffstat (limited to 'package/ulogd')
-rw-r--r--package/ulogd/Config.in48
-rw-r--r--package/ulogd/Makefile92
-rw-r--r--package/ulogd/files/ulogd.init22
-rw-r--r--package/ulogd/ipkg/ulogd-mod-extra.control5
-rw-r--r--package/ulogd/ipkg/ulogd-mod-mysql.control5
-rw-r--r--package/ulogd/ipkg/ulogd-mod-pcap.control5
-rw-r--r--package/ulogd/ipkg/ulogd-mod-pgsql.control5
-rw-r--r--package/ulogd/ipkg/ulogd-mod-sqlite.control5
-rw-r--r--package/ulogd/ipkg/ulogd.conffiles1
-rw-r--r--package/ulogd/ipkg/ulogd.control4
-rw-r--r--package/ulogd/ipkg/ulogd.postinst3
-rw-r--r--package/ulogd/patches/patch-Rules_make_in12
-rw-r--r--package/ulogd/patches/patch-libipulog_Makefile_in12
-rw-r--r--package/ulogd/patches/patch-mysql_Makefile_in12
14 files changed, 231 insertions, 0 deletions
diff --git a/package/ulogd/Config.in b/package/ulogd/Config.in
new file mode 100644
index 000000000..e725f2807
--- /dev/null
+++ b/package/ulogd/Config.in
@@ -0,0 +1,48 @@
+#menu "ulogd............................. Netfilter userspace logging daemon"
+
+config ADK_PACKAGE_ULOGD
+ prompt "ulogd............................. Netfilter userspace logging daemon"
+ tristate
+ default n
+ select ADK_PACKAGE_IPTABLES
+ help
+ The netfilter userspace logging daemon
+
+ http://gnumonks.org/projects/ulogd
+
+config ADK_PACKAGE_ULOGD_MOD_MYSQL
+ prompt " ulogd-mod-mysql............... Output plugin for logging into a MySQL database"
+ tristate
+ default n
+ depends on ADK_CXX
+ depends ADK_PACKAGE_ULOGD
+ select ADK_PACKAGE_LIBMYSQLCLIENT
+
+config ADK_PACKAGE_ULOGD_MOD_PCAP
+ prompt " ulogd-mod-pcap................. Output plugin for logging into pcap format"
+ tristate
+ default n
+ depends ADK_PACKAGE_ULOGD
+ select ADK_PACKAGE_LIBPCAP
+
+config ADK_PACKAGE_ULOGD_MOD_PGSQL
+ prompt " ulogd-mod-pgsql............... Output plugin for logging into a PostgreSQL database"
+ tristate
+ default n
+ depends ADK_PACKAGE_ULOGD
+ select ADK_PACKAGE_LIBPQ
+
+config ADK_PACKAGE_ULOGD_MOD_SQLITE
+ prompt " ulogd-mod-sqlite.............. Output plugin for logging into an SQLite database"
+ tristate
+ default n
+ depends ADK_PACKAGE_ULOGD
+ select ADK_PACKAGE_LIBSQLITE
+
+config ADK_PACKAGE_ULOGD_MOD_EXTRA
+ prompt " ulogd-mod-extra............... All other plugins"
+ tristate
+ default n
+ depends ADK_PACKAGE_ULOGD
+
+#endmenu
diff --git a/package/ulogd/Makefile b/package/ulogd/Makefile
new file mode 100644
index 000000000..2135669c1
--- /dev/null
+++ b/package/ulogd/Makefile
@@ -0,0 +1,92 @@
+# $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:= ulogd
+PKG_VERSION:= 1.24
+PKG_RELEASE:= 7
+PKG_MD5SUM:= 05b4ed2926b9a22aaeaf642917bbf8ff
+MASTER_SITES:= ftp://ftp.netfilter.org/pub/ulogd/ \
+ ftp://ftp.be.netfilter.org/pub/netfilter/ulogd/ \
+ ftp://ftp.de.netfilter.org/pub/netfilter/ulogd/ \
+ ftp://ftp.no.netfilter.org/pub/netfilter/ulogd/
+DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
+
+include ${TOPDIR}/mk/package.mk
+
+$(eval $(call PKG_template,ULOGD,ulogd,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+$(eval $(call PKG_template,ULOGD_MOD_MYSQL,ulogd-mod-mysql,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+$(eval $(call PKG_template,ULOGD_MOD_PCAP,ulogd-mod-pcap,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+$(eval $(call PKG_template,ULOGD_MOD_PGSQL,ulogd-mod-pgsql,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+$(eval $(call PKG_template,ULOGD_MOD_SQLITE,ulogd-mod-sqlite,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+$(eval $(call PKG_template,ULOGD_MOD_EXTRA,ulogd-mod-extra,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+
+SUB_INSTALLS-y:=
+SUB_INSTALLS-m:=
+SUB_INSTALLS-${ADK_PACKAGE_ULOGD_MOD_PCAP}+= ulogd-mod-pcap-install
+SUB_INSTALLS-${ADK_PACKAGE_ULOGD_MOD_MYSQL}+= ulogd-mod-mysql-install
+SUB_INSTALLS-${ADK_PACKAGE_ULOGD_MOD_PGSQL}+= ulogd-mod-pgsql-install
+SUB_INSTALLS-${ADK_PACKAGE_ULOGD_MOD_SQLITE}+= ulogd-mod-sqlite-install
+SUB_INSTALLS-${ADK_PACKAGE_ULOGD_MOD_EXTRA}+= ulogd-mod-extra-install
+
+CONFIGURE_STYLE:= gnu
+BUILD_STYLE:= auto
+INSTALL_STYLE:= auto
+
+ifneq (${ADK_PACKAGE_ULOGD_MOD_PCAP},)
+CONFIGURE_ENV+= ac_cv_header_pcap_h=yes
+else
+CONFIGURE_ENV+= ac_cv_header_pcap_h=no
+endif
+
+ifneq (${ADK_PACKAGE_ULOGD_MOD_MYSQL},)
+CONFIGURE_ARGS+= --with-mysql=${STAGING_DIR}/usr
+endif
+
+ifneq (${ADK_PACKAGE_ULOGD_MOD_PGSQL},)
+CONFIGURE_ARGS+= --with-pgsql=${STAGING_DIR}/usr
+endif
+
+ifneq (${ADK_PACKAGE_ULOGD_MOD_SQLITE},)
+CONFIGURE_ARGS+= --with-sqlite3=${STAGING_DIR}/usr
+endif
+
+post-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y}
+ ${INSTALL_DIR} ${IDIR_ULOGD}/etc/init.d/
+ ${INSTALL_DATA} ${WRKINST}/etc/ulogd.conf ${IDIR_ULOGD}/etc/
+ ${INSTALL_BIN} ./files/ulogd.init \
+ ${IDIR_ULOGD}/etc/init.d/ulogd
+ ${INSTALL_DIR} ${IDIR_ULOGD}/usr/lib/ulogd/
+ ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_BASE.so ${IDIR_ULOGD}/usr/lib/ulogd/
+ ${INSTALL_DIR} ${IDIR_ULOGD}/usr/sbin
+ ${INSTALL_BIN} ${WRKINST}/usr/sbin/ulogd ${IDIR_ULOGD}/usr/sbin/
+
+ulogd-mod-extra-install:
+ ${INSTALL_DIR} ${IDIR_ULOGD_MOD_EXTRA}/usr/lib/ulogd
+ ${CP} ${WRKINST}/usr/lib/ulogd/ulogd_{LOCAL,LOGEMU,OPRINT,PWSNIFF,SYSLOG}.so \
+ ${IDIR_ULOGD_MOD_EXTRA}/usr/lib/ulogd
+
+ulogd-mod-pcap-install:
+ ${INSTALL_DIR} ${IDIR_ULOGD_MOD_PCAP}/usr/lib/ulogd
+ ${CP} ${WRKINST}/usr/lib/ulogd/ulogd_PCAP.so \
+ ${IDIR_ULOGD_MOD_PCAP}/usr/lib/ulogd
+
+ulogd-mod-sqlite-install:
+ ${INSTALL_DIR} ${IDIR_ULOGD_MOD_SQLITE}/usr/lib/ulogd
+ ${CP} ${WRKINST}/usr/lib/ulogd/ulogd_SQLITE3.so \
+ ${IDIR_ULOGD_MOD_SQLITE}/usr/lib/ulogd
+
+ulogd-mod-pgsql-install:
+ ${INSTALL_DIR} ${IDIR_ULOGD_MOD_PGSQL}/usr/lib/ulogd
+ ${CP} ${WRKINST}/usr/lib/ulogd/ulogd_PGSQL.so \
+ ${IDIR_ULOGD_MOD_PGSQL}/usr/lib/ulogd
+
+ulogd-mod-mysql-install:
+ ${INSTALL_DIR} ${IDIR_ULOGD_MOD_MYSQL}/usr/lib/ulogd
+ ${CP} ${WRKINST}/usr/lib/ulogd/ulogd_MYSQL.so \
+ ${IDIR_ULOGD_MOD_MYSQL}/usr/lib/ulogd
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/ulogd/files/ulogd.init b/package/ulogd/files/ulogd.init
new file mode 100644
index 000000000..34cbfe7b6
--- /dev/null
+++ b/package/ulogd/files/ulogd.init
@@ -0,0 +1,22 @@
+#!/bin/sh
+#FWINIT 49
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${ulogd:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ ulogd -d
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "usage: $0 {start | stop | restart}"
+ exit 1
+esac
+exit $?
diff --git a/package/ulogd/ipkg/ulogd-mod-extra.control b/package/ulogd/ipkg/ulogd-mod-extra.control
new file mode 100644
index 000000000..95332ba34
--- /dev/null
+++ b/package/ulogd/ipkg/ulogd-mod-extra.control
@@ -0,0 +1,5 @@
+Package: ulogd-mod-extra
+Priority: optional
+Section: net
+Description: Netfilter userspace logging daemon (extra plugins)
+Depends: ulogd
diff --git a/package/ulogd/ipkg/ulogd-mod-mysql.control b/package/ulogd/ipkg/ulogd-mod-mysql.control
new file mode 100644
index 000000000..3556bb155
--- /dev/null
+++ b/package/ulogd/ipkg/ulogd-mod-mysql.control
@@ -0,0 +1,5 @@
+Package: ulogd-mod-mysql
+Priority: optional
+Section: net
+Description: Netfilter userspace logging daemon (MySQL plugin)
+Depends: libmysqlclient, ulogd
diff --git a/package/ulogd/ipkg/ulogd-mod-pcap.control b/package/ulogd/ipkg/ulogd-mod-pcap.control
new file mode 100644
index 000000000..521ad94e8
--- /dev/null
+++ b/package/ulogd/ipkg/ulogd-mod-pcap.control
@@ -0,0 +1,5 @@
+Package: ulogd-mod-pcap
+Priority: optional
+Section: net
+Description: Netfilter userspace logging daemon (PCAP plugin)
+Depends: libpcap, ulogd
diff --git a/package/ulogd/ipkg/ulogd-mod-pgsql.control b/package/ulogd/ipkg/ulogd-mod-pgsql.control
new file mode 100644
index 000000000..dbc97765d
--- /dev/null
+++ b/package/ulogd/ipkg/ulogd-mod-pgsql.control
@@ -0,0 +1,5 @@
+Package: ulogd-mod-pgsql
+Priority: optional
+Section: net
+Description: Netfilter userspace logging daemon (PostgreSQL plugin)
+Depends: libpq, ulogd
diff --git a/package/ulogd/ipkg/ulogd-mod-sqlite.control b/package/ulogd/ipkg/ulogd-mod-sqlite.control
new file mode 100644
index 000000000..d76b2d62f
--- /dev/null
+++ b/package/ulogd/ipkg/ulogd-mod-sqlite.control
@@ -0,0 +1,5 @@
+Package: ulogd-mod-sqlite
+Priority: optional
+Section: net
+Description: Netfilter userspace logging daemon (SQLite plugin)
+Depends: libsqlite, ulogd
diff --git a/package/ulogd/ipkg/ulogd.conffiles b/package/ulogd/ipkg/ulogd.conffiles
new file mode 100644
index 000000000..287b91c95
--- /dev/null
+++ b/package/ulogd/ipkg/ulogd.conffiles
@@ -0,0 +1 @@
+/etc/ulogd.conf
diff --git a/package/ulogd/ipkg/ulogd.control b/package/ulogd/ipkg/ulogd.control
new file mode 100644
index 000000000..48eda41f3
--- /dev/null
+++ b/package/ulogd/ipkg/ulogd.control
@@ -0,0 +1,4 @@
+Package: ulogd
+Priority: optional
+Section: net
+Description: Netfilter userspace logging daemon
diff --git a/package/ulogd/ipkg/ulogd.postinst b/package/ulogd/ipkg/ulogd.postinst
new file mode 100644
index 000000000..86e3d4348
--- /dev/null
+++ b/package/ulogd/ipkg/ulogd.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf ulogd ulogd NO
diff --git a/package/ulogd/patches/patch-Rules_make_in b/package/ulogd/patches/patch-Rules_make_in
new file mode 100644
index 000000000..454248384
--- /dev/null
+++ b/package/ulogd/patches/patch-Rules_make_in
@@ -0,0 +1,12 @@
+$Id$
+--- ulogd-1.24.orig/Rules.make.in 2005-11-25 19:58:27.000000000 +0000
++++ ulogd-1.24/Rules.make.in 2007-02-15 21:22:28.000000000 +0000
+@@ -22,7 +22,7 @@ CFLAGS=@CFLAGS@ @CPPFLAGS@ -Wall
+ CFLAGS+=-DULOGD_CONFIGFILE=\"$(ULOGD_CONFIGFILE)\"
+ # doesn't work for subdirs
+ #CFLAGS+=$(INCIPULOG) $(INCCONFFILE)
+-CFLAGS+=-I/lib/modules/`uname -r`/build/include
++#CFLAGS+=-I/lib/modules/`uname -r`/build/include
+ #CFLAGS+=@DEFS@
+ #CFLAGS+=-g -DDEBUG -DDEBUG_MYSQL -DDEBUG_PGSQL
+
diff --git a/package/ulogd/patches/patch-libipulog_Makefile_in b/package/ulogd/patches/patch-libipulog_Makefile_in
new file mode 100644
index 000000000..8ce425d83
--- /dev/null
+++ b/package/ulogd/patches/patch-libipulog_Makefile_in
@@ -0,0 +1,12 @@
+$Id$
+--- ulogd-1.24.orig/libipulog/Makefile.in 2005-11-25 19:58:25.000000000 +0000
++++ ulogd-1.24/libipulog/Makefile.in 2007-02-15 21:29:49.000000000 +0000
+@@ -1,7 +1,7 @@
+ #
+
+ include @top_srcdir@/Rules.make
+-CFLAGS+=-Iinclude -I/usr/src/linux/include
++CFLAGS+=-Iinclude
+
+ libipulog.a: libipulog.o
+ $(LD) -i $< -o $@
diff --git a/package/ulogd/patches/patch-mysql_Makefile_in b/package/ulogd/patches/patch-mysql_Makefile_in
new file mode 100644
index 000000000..e019da0ff
--- /dev/null
+++ b/package/ulogd/patches/patch-mysql_Makefile_in
@@ -0,0 +1,12 @@
+$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
+--- ulogd-1.24.orig/mysql/Makefile.in 2005-11-25 20:58:27.000000000 +0100
++++ ulogd-1.24/mysql/Makefile.in 2008-10-16 10:38:34.000000000 +0200
+@@ -14,7 +14,7 @@ all: $(SHARED_LIBS)
+ distrib:
+
+ $(SHARED_LIBS): %.so: %_sh.o
+- $(LD) -shared $(MYSQL_LDFLAGS) -o $@ $< -lc
++ $(LD) -shared -o $@ $< -lc
+
+ %_sh.o: %.c
+ $(CC) $(MYSQL_CFLAGS) $(SH_CFLAGS) -o $@ -c $<