APKBUILD 1.86 KB
Newer Older
1
# Maintainer: Leonardo Arena <rnalrd@gmail.com>
Carlo Landmeter's avatar
Carlo Landmeter committed
2
pkgname=ulogd
3
<<<<<<< HEAD
Carlo Landmeter's avatar
Carlo Landmeter committed
4 5
pkgver=2.0.0_beta3
_pkgver=2.0.0beta3
6
pkgrel=1
7 8
=======
pkgver=1.24
9
<<<<<<< HEAD
10 11
pkgrel=0
>>>>>>> 52acbbb... testing/ulogd: downgraded to stable v1.24
12 13 14
=======
pkgrel=1
>>>>>>> 629d95e... testing/ulogd: logrotate support added
Carlo Landmeter's avatar
Carlo Landmeter committed
15 16 17
pkgdesc="A userspace logging daemon for netfilter/iptables related logging"
url="http://netfilter.org/projects/ulogd/index.html"
license="GPL"
18
depends=
19 20 21 22 23
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
24 25
	ulogd.confd
	ulogd.logrotate"
26 27

_builddir="$srcdir/$pkgname-$pkgver"
Carlo Landmeter's avatar
Carlo Landmeter committed
28 29

build() {
30
	cd "$_builddir"
Carlo Landmeter's avatar
Carlo Landmeter committed
31 32 33 34

	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
35 36 37 38 39
		--infodir=/usr/share/info \
		--with-pgsql \
		--with-sqlite3 \
		--with-pgsql-log-ip-as-string
	make -j1|| return 1
40 41 42
}

package() {
43
	cd "$_builddir"
Carlo Landmeter's avatar
Carlo Landmeter committed
44 45
	make DESTDIR="$pkgdir" install
	install -Dm644 ulogd.conf "$pkgdir"/etc/ulogd.conf
46
	install -Dm644 ulogd.logrotate "$pkgdir"/etc/logrotate.d/ulogd
Carlo Landmeter's avatar
Carlo Landmeter committed
47
	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
48 49 50
	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
Carlo Landmeter's avatar
Carlo Landmeter committed
51 52 53 54
}

sqlite() {
	mkdir -p "$subpkgdir"/usr/lib/ulogd/
55
	mv "$pkgdir"/usr/lib/ulogd/ulogd_SQLITE3.so "$subpkgdir"/usr/lib/ulogd/
Carlo Landmeter's avatar
Carlo Landmeter committed
56 57 58 59
}

pgsql() {
	mkdir -p "$subpkgdir"/usr/lib/ulogd/
60
	mv "$pkgdir"/usr/lib/ulogd/ulogd_PGSQL.so "$subpkgdir"/usr/lib/ulogd/
Carlo Landmeter's avatar
Carlo Landmeter committed
61 62
}

63 64
md5sums="05b4ed2926b9a22aaeaf642917bbf8ff  ulogd-1.24.tar.bz2
bd2f808297a9c67e0dc51aa57a1805e0  ulogd.initd
65 66
b9b2fa217ee02211debee5a5dffdcda7  ulogd.confd
836332074f6cbc19d2d0553e2076dab7  ulogd.logrotate"