aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ipt-netflow-vanilla/APKBUILD
blob: 54ca5e22a3735ce6e3480ce0bdfc32f03397490c (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>

# when chaning _ver we *must* bump _rel
_name=ipt-netflow
_ver=2.3
_rel=0

_flavor=${FLAVOR:-vanilla}
_kpkg=linux-$_flavor
_kver=4.19.86
_krel=0

_kpkgver="$_kver-r$_krel"
_kabi="$_kver-$_krel-$_flavor"

pkgname=$_name-$_flavor
pkgver=$_kver
pkgrel=$(( $_krel + $_rel ))

pkgdesc="Linux kernel netflow sensor module"
url="http://ipt-netflow.sourceforge.net/"
arch="x86 x86_64 armhf armv7"
license="GPL-3.0-or-later"
depends="$_kpkg=$_kpkgver"
makedepends="$_kpkg-dev=$_kpkgver iptables-dev bash"
install_if="$_kpkg=$_kpkgver ipt-netflow"
#provides="${_name}-grsec=${pkgver}-r${pkgrel}"
source="$pkgname-$pkgver.tar.gz::https://github.com/aabc/ipt-netflow/archive/v$_ver.tar.gz"
builddir="$srcdir/$_name-$_ver"

prepare() {
	default_prepare
	# verify the kernel version
	local _kapkbuild=../../main/linux-$_pkgver/APKBUILD
	if [ -f $_kapkbuild ]; then
		(	. $_kapkbuild
			pkgname=$_name-$_flavor
			[ "$_kver" != "$pkgver" ] && die "please update _kver to $pkgver"
			[ "$_krel" != "$pkgrel" ] && die "please update _krel to $pkgrel"
			return 0
		)
	fi
}

build() {
	cd "$builddir"
	./configure --kver=$_kabi --ipt-inc=/usr/include/libiptc
	make ipt_NETFLOW.ko
}

package() {
	cd "$builddir"
	make -j1 minstall DEPMOD=: DESTDIR="$pkgdir"
}

sha512sums="e5ba66da9cae6fb9652e5532383233d433dd30dd16634734860f7e6910e46080e562e2d72c74584a86ead31156cffd4c5c44b438f617a9e5b3e5fdc1470045fc  ipt-netflow-vanilla-4.19.86.tar.gz"