diff options
author | Leonardo Arena <rnalrd@gmail.com> | 2010-08-27 13:50:45 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@gmail.com> | 2010-08-27 13:50:45 +0000 |
commit | f6ad56cf5e99a98dc23c955145e7beeee39094a1 (patch) | |
tree | e8d93d42ee6c10e8997c83ebeace92dcce6ef97a /main/ulogd | |
parent | 629d95e6e23f32f373c812782af627a2bcc84315 (diff) | |
download | aports-f6ad56cf5e99a98dc23c955145e7beeee39094a1.tar.bz2 aports-f6ad56cf5e99a98dc23c955145e7beeee39094a1.tar.xz |
main/ulogd: moved to main
Diffstat (limited to 'main/ulogd')
-rw-r--r-- | main/ulogd/APKBUILD | 56 | ||||
-rw-r--r-- | main/ulogd/ulogd.confd | 2 | ||||
-rw-r--r-- | main/ulogd/ulogd.initd | 39 | ||||
-rw-r--r-- | main/ulogd/ulogd.logrotate | 12 |
4 files changed, 109 insertions, 0 deletions
diff --git a/main/ulogd/APKBUILD b/main/ulogd/APKBUILD new file mode 100644 index 000000000..887b8785e --- /dev/null +++ b/main/ulogd/APKBUILD @@ -0,0 +1,56 @@ +# Maintainer: Leonardo Arena <rnalrd@gmail.com> +pkgname=ulogd +pkgver=1.24 +pkgrel=1 +pkgdesc="A userspace logging daemon for netfilter/iptables related logging" +url="http://netfilter.org/projects/ulogd/index.html" +license="GPL" +depends= +makedepends="sqlite-dev postgresql-dev libpcap-dev libnfnetlink-dev +libnetfilter_conntrack-dev pkgconfig openssl-dev" +subpackages="$pkgname-sqlite $pkgname-pgsql $pkgname-doc" +source="http://www.netfilter.org/projects/$pkgname/files/$pkgname-$pkgver.tar.bz2 + ulogd.initd + ulogd.confd + ulogd.logrotate" + +_builddir="$srcdir/$pkgname-$pkgver" + +build() { + cd "$_builddir" + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --with-pgsql \ + --with-sqlite3 \ + --with-pgsql-log-ip-as-string + make -j1|| return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" install + install -Dm644 ulogd.conf "$pkgdir"/etc/ulogd.conf + install -Dm644 ulogd.logrotate "$pkgdir"/etc/logrotate.d/ulogd + install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname + mkdir -p $pkgdir/usr/share/doc/$pkgname + cp doc/*table* doc/*.txt doc/*.html $pkgdir/usr/share/doc/$pkgname +} + +sqlite() { + mkdir -p "$subpkgdir"/usr/lib/ulogd/ + mv "$pkgdir"/usr/lib/ulogd/ulogd_SQLITE3.so "$subpkgdir"/usr/lib/ulogd/ +} + +pgsql() { + mkdir -p "$subpkgdir"/usr/lib/ulogd/ + mv "$pkgdir"/usr/lib/ulogd/ulogd_PGSQL.so "$subpkgdir"/usr/lib/ulogd/ +} + +md5sums="05b4ed2926b9a22aaeaf642917bbf8ff ulogd-1.24.tar.bz2 +bd2f808297a9c67e0dc51aa57a1805e0 ulogd.initd +b9b2fa217ee02211debee5a5dffdcda7 ulogd.confd +836332074f6cbc19d2d0553e2076dab7 ulogd.logrotate" diff --git a/main/ulogd/ulogd.confd b/main/ulogd/ulogd.confd new file mode 100644 index 000000000..ac035b24c --- /dev/null +++ b/main/ulogd/ulogd.confd @@ -0,0 +1,2 @@ +# Argument to be passed to ulog daemon +ARGS="-d" diff --git a/main/ulogd/ulogd.initd b/main/ulogd/ulogd.initd new file mode 100644 index 000000000..8cf5567f5 --- /dev/null +++ b/main/ulogd/ulogd.initd @@ -0,0 +1,39 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/app-admin/ulogd/files/ulogd,v 1.2 2004/07/13 16:32:25 aliz Exp $ + +opts="reload" + +depend() { + need net + after firewall +} + +checkconfig() { + if [ ! -e /etc/ulogd.conf ]; then + eerror "You need /etc/ulogd.conf" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting ulogd" + start-stop-daemon --start --quiet --exec /usr/sbin/ulogd -- \ + $ARGS >/dev/null 2>&1 + eend $? +} + +stop() { + ebegin "Stopping ulogd" + start-stop-daemon --stop --quiet --exec /usr/sbin/ulogd >/dev/null 2>&1 + eend $? +} + +reload() { + ebegin "Reloading ulogd.conf file" + killall -HUP ulogd &>/dev/null + eend $? +} + diff --git a/main/ulogd/ulogd.logrotate b/main/ulogd/ulogd.logrotate new file mode 100644 index 000000000..6974d41b1 --- /dev/null +++ b/main/ulogd/ulogd.logrotate @@ -0,0 +1,12 @@ +/var/log/ulogd.log /var/log/ulog.syslogemu { + rotate 4 + daily + missingok + notifempty + compress + delaycompress + sharedscripts + postrotate + /etc/init.d/ulogd reload &>/dev/null + endscript +} |