aboutsummaryrefslogtreecommitdiffstats
path: root/main/conntrack-tools/APKBUILD
blob: d38b77dc57dc0b964f934c89ffc330a367d2f4ea (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=conntrack-tools
pkgver=1.4.3
pkgrel=0
pkgdesc="Connection tracking userspace tools"
url="http://conntrack-tools.netfilter.org"
arch="all"
license="GPL2+"
subpackages="$pkgname-doc"
depends=
makedepends="linux-headers libnfnetlink-dev libnetfilter_conntrack-dev bison flex
	libmnl-dev libnetfilter_cttimeout-dev libnetfilter_cthelper-dev
	libnetfilter_queue-dev libtirpc-dev"
source="http://www.netfilter.org/projects/conntrack-tools/files/$pkgname-$pkgver.tar.bz2
	conntrackd.initd
	conntrackd.confd
	"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	update_config_sub || return 1
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	export CFLAGS="$CFLAGS -D_GNU_SOURCE `pkgconf --cflags libtirpc`"
	export LDFLAGS="$LDFLAGS `pkgconf --libs libtirpc`"

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1

	install -Dm755 ../conntrackd.initd "$pkgdir"/etc/init.d/conntrackd
	install -Dm644 ../conntrackd.confd "$pkgdir"/etc/conf.d/conntrackd
	install -Dm644 doc/stats/conntrackd.conf \
		"$pkgdir"/etc/conntrackd/conntrackd.conf
}

md5sums="966a5d8f846ddf5304bcd12685c0707f  conntrack-tools-1.4.3.tar.bz2
30bafeed166c9af8f3f0e084984431b4  conntrackd.initd
8ebf3838b69d20e6bb4a173844502039  conntrackd.confd"
sha256sums="af3ccc60356cfedf941065fdaaf9cd5e51f3df7484f56858af37106feecf3f57  conntrack-tools-1.4.3.tar.bz2
089fe7ceea1bb514f71ce8fa26a2fa82fc6246e8e4d1128df3ed8e1b6a9e84f4  conntrackd.initd
6171121881f824bccc2709d6e74e2d5955391fbb9c591afcca741a3239fd3ed7  conntrackd.confd"
sha512sums="be76a0ddb7470249c58ceab72cb94ffc05f5cc6d740a0755c9c782e948b4234eb1da4f7c7df1f14e4125cca9f12f3b4d2dcd444fe011941952aa3eeb13cb72c3  conntrack-tools-1.4.3.tar.bz2
1d8e6d6eec79233b276d12e78c5d184d356df85ede299bfa9f6967ace30987f3b2f8c8077a1e2f9123a817f2805fdb9bf8fa9ec441882a112d83cabf84932e16  conntrackd.initd
fd8cfab207867844db6671a8395efadca792d6085c3436381e574dc52f3b4e41d9526b3db6114dd98e534a5419ca19f291d21c091f8cf0426024d73d18133e6f  conntrackd.confd"