aboutsummaryrefslogtreecommitdiffstats
path: root/main/ulogd/APKBUILD
blob: 86bd96d0fd6deb9fbfa0edf34c91830eaf8c0899 (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@gmail.com>
pkgname=ulogd
pkgver=1.24
pkgrel=3
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
a9a4262961a9cf4b8dd34a91701dbb0a  ulogd.initd
b9b2fa217ee02211debee5a5dffdcda7  ulogd.confd
836332074f6cbc19d2d0553e2076dab7  ulogd.logrotate"