aboutsummaryrefslogtreecommitdiffstats
path: root/main/ulogd/APKBUILD
blob: 263e6ccd3e3ae33a530c46361850e997c748759f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=ulogd
pkgver=1.24
pkgrel=7
pkgdesc="A userspace logging daemon for netfilter/iptables related logging"
url="http://netfilter.org/projects/ulogd/index.html"
arch="all"
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() {
	depends="$pkgname"
	mkdir -p "$subpkgdir"/usr/lib/ulogd/
	mv "$pkgdir"/usr/lib/ulogd/ulogd_SQLITE3.so "$subpkgdir"/usr/lib/ulogd/
}

pgsql() {
	depends="$pkgname"
	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
5b229ed2622f1e5871a04cae62053112  ulogd.initd
b9b2fa217ee02211debee5a5dffdcda7  ulogd.confd
77688e9c300750f5423ed2ad37ae8b32  ulogd.logrotate"