summaryrefslogtreecommitdiff
path: root/community/ulogd
diff options
context:
space:
mode:
Diffstat (limited to 'community/ulogd')
-rw-r--r--community/ulogd/PKGBUILD60
-rw-r--r--community/ulogd/ulogd.conf20
-rw-r--r--community/ulogd/ulogd.logrotate10
-rw-r--r--community/ulogd/ulogd.service9
4 files changed, 99 insertions, 0 deletions
diff --git a/community/ulogd/PKGBUILD b/community/ulogd/PKGBUILD
new file mode 100644
index 000000000..aa519f85c
--- /dev/null
+++ b/community/ulogd/PKGBUILD
@@ -0,0 +1,60 @@
+# $Id: PKGBUILD 90538 2013-05-13 00:36:03Z seblu $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer: Sébastien Luttringer
+# Contributor: Dale Blount <dale@archlinux.org>
+# Contributor: Sergej Pupykin <ps@lx-ltd.ru>
+
+pkgname=ulogd
+pkgver=2.0.2
+pkgrel=2
+pkgdesc='Userspace Packet Logging for netfilter'
+arch=('i686' 'x86_64')
+url='http://www.netfilter.org/projects/ulogd/index.html'
+license=('GPL2')
+depends=('libmnl' 'libnfnetlink')
+backup=('etc/ulogd.conf')
+makedepends=('libmariadbclient'
+ 'libnetfilter_acct'
+ 'libnetfilter_conntrack'
+ 'libnetfilter_log'
+ 'libpcap'
+ 'libdbi'
+ 'postgresql-libs'
+ 'sqlite')
+optdepends=("${makedepends[@]}")
+options=('!libtool')
+source=("ftp://ftp.netfilter.org/pub/$pkgname/$pkgname-$pkgver.tar.bz2"
+ "$pkgname.logrotate"
+ "$pkgname.conf"
+ "$pkgname.service")
+md5sums=('660516de4b5b1e110c12dae414619e0f'
+ 'dd32eeee0949adff4188544419acd17e'
+ 'c21531312f95e790ed19aa267a17d35a'
+ '092d72209e30c132e0a08112e4062772')
+
+
+build() {
+ cd $pkgname-$pkgver
+ ./configure \
+ --prefix=/usr \
+ --sbindir=/usr/bin \
+ --sysconfdir=/etc \
+ --with-mysql \
+ --with-pgsql \
+ --with-dbi
+ make
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+ install -dm755 "$pkgdir/usr/share/doc/ulogd"
+ install -Dm644 ulogd.conf "$pkgdir/usr/share/doc/ulogd/ulogd.conf"
+ install -m644 doc/*.{table,sql} "$pkgdir/usr/share/doc/ulogd"
+ cd "$srcdir"
+ install -Dm644 $pkgname.service "$pkgdir/usr/lib/systemd/system/$pkgname.service"
+ install -Dm644 $pkgname.logrotate "$pkgdir/etc/logrotate.d/$pkgname"
+ install -Dm644 $pkgname.conf "$pkgdir/etc/$pkgname.conf"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/community/ulogd/ulogd.conf b/community/ulogd/ulogd.conf
new file mode 100644
index 000000000..822575613
--- /dev/null
+++ b/community/ulogd/ulogd.conf
@@ -0,0 +1,20 @@
+[global]
+nlgroup=1
+logfile="/var/log/ulogd.log"
+loglevel=5
+rmem=131071
+bufsize=150000
+
+plugin="/usr/lib/ulogd/ulogd_inppkt_ULOG.so"
+plugin="/usr/lib/ulogd/ulogd_raw2packet_BASE.so"
+plugin="/usr/lib/ulogd/ulogd_filter_IP2STR.so"
+plugin="/usr/lib/ulogd/ulogd_filter_PRINTPKT.so"
+plugin="/usr/lib/ulogd/ulogd_output_LOGEMU.so"
+
+stack=ulog1:ULOG,base1:BASE,ip2str1:IP2STR,print1:PRINTPKT,emu1:LOGEMU
+
+[ulog1]
+nlgroup=1
+
+[emu1]
+file=/var/log/ulogd.syslogemu
diff --git a/community/ulogd/ulogd.logrotate b/community/ulogd/ulogd.logrotate
new file mode 100644
index 000000000..312c71acb
--- /dev/null
+++ b/community/ulogd/ulogd.logrotate
@@ -0,0 +1,10 @@
+/var/log/ulogd.log /var/log/ulogd.syslogemu {
+ missingok
+ notifempty
+ sharedscripts
+ create 0640 root root
+
+ postrotate
+ [ -e /var/run/ulogd.pid ] && /etc/rc.d/ulogd restart > /dev/null
+ endscript
+}
diff --git a/community/ulogd/ulogd.service b/community/ulogd/ulogd.service
new file mode 100644
index 000000000..12450c9cc
--- /dev/null
+++ b/community/ulogd/ulogd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Netfilter Ulogd daemon
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/ulogd
+
+[Install]
+WantedBy=multi-user.target