aboutsummaryrefslogtreecommitdiffstats
path: root/main/ulogd/APKBUILD
blob: 72a5181a8fc8c359db5e01f67918d32b0555aad6 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=ulogd
pkgver=2.0.2
pkgrel=0
pkgdesc="A userspace logging daemon for netfilter/iptables related logging"
url="http://netfilter.org/projects/ulogd/index.html"
arch="all"
license="GPL"
depends=
makedepends="libmnl-dev libpcap-dev libnetfilter_acct-dev 
	libnfnetlink-dev libnetfilter_conntrack-dev libnetfilter_log-dev 
	pkgconfig mysql-dev openssl-dev postgresql-dev zlib-dev"
subpackages="$pkgname-mysql $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 \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--with-pgsql \
		--with-mysql \
		|| return 1
	make || 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
	install -dm755 "$pkgdir"/usr/share/doc/ulogd
	install -Dm644 ulogd.conf "$pkgdir"/usr/share/doc/ulogd/ulogd.conf.sample
	install -Dm644 doc/ulogd.sgml "$pkgdir"/usr/share/doc/ulogd/ulogd.sgml
	install -dm0755 "$pkgdir"/usr/share/ulogd
	for file in $(ls doc/*.sql)
	do
		install -Dm644 $file "$pkgdir"/usr/share/ulogd/$file
	done
	find "$pkgdir" -name *.la -delete
}

mysql() {
	depends="$pkgname"
	mkdir -p "$subpkgdir"/usr/lib/ulogd/
	mv "$pkgdir"/usr/lib/ulogd/ulogd_output_MYSQL.so "$subpkgdir"/usr/lib/ulogd/
}

pgsql() {
	depends="$pkgname"
	mkdir -p "$subpkgdir"/usr/lib/ulogd/
	mv "$pkgdir"/usr/lib/ulogd/ulogd_output_PGSQL.so "$subpkgdir"/usr/lib/ulogd/
}

md5sums="660516de4b5b1e110c12dae414619e0f  ulogd-2.0.2.tar.bz2
5b229ed2622f1e5871a04cae62053112  ulogd.initd
b9b2fa217ee02211debee5a5dffdcda7  ulogd.confd
77688e9c300750f5423ed2ad37ae8b32  ulogd.logrotate"
sha256sums="a36c4032d83edaef1b13f96b6647e9e150d7f20b5af7035f0a91c17fe2e066c5  ulogd-2.0.2.tar.bz2
acf80bf734536e14e60dde91019a608d278f2cba906d470f89feab1738e059b6  ulogd.initd
78cfce3aceba3f29e08f37b2f29784aedde1266d3b7dfdbe2426d2ed258e9c18  ulogd.confd
1acb7dad5182a9b9f9df88ef15ca31076fdba3ba6a63a5faad0edc96e3204ca9  ulogd.logrotate"
sha512sums="a7ac243ec67ab4325855df631bae011284c716495e5e2d26c1f392207448b6b793117124c89b66e7745a05b74cdddb5ed7acb44c34c24618cc27948a25e978df  ulogd-2.0.2.tar.bz2
dcced874afa8fc6b02fdf6cedae2bde5eb04e9def32082b1f913b436786032f8c6a756cbd25b74c7df36cae2dda5a82a5a43d32b35a4bbe33d76abcfea41a9ba  ulogd.initd
bdae1ff90c671b6847dfda1947a33e24bfbe16ad963f85769d923ba33021bc4ca315fd410b46fac102f0a24e879e4be4ad7bb5978c5a6755e74e6b5d7c3e18ee  ulogd.confd
2ded9734ca903147ae2fc15af47d3f03ecc44f1f9b284d3c30d013a762d0cebf22e14ed3f5e7be8ee2d3d508c7b7afcdbc3819d4930c264416ed1fa463e03e6d  ulogd.logrotate"