# Maintainer: Natanael Copa # when chaning _ver we *must* bump _rel _name=ipt-netflow _ver=2.3 _rel=0 _flavor=${FLAVOR:-vanilla} _kpkg=linux-$_flavor _kver=4.19.87 _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.87.tar.gz"