# Maintainer: Natanael Copa _flavor=grsec _kpkg=linux-$_flavor _kver=3.14.20 _kpkgrel=1 # when chaning _ver we *must* bump _mypkgrel _ver=2.0 _mypkgrel=0 # verify the kernel version before entering chroot if [ -f ../linux-${_flavor}/APKBUILD ]; then . ../linux-${_flavor}/APKBUILD pkgname=ipt-netflow-${_flavor} [ "$_kver" != "$pkgver" ] && die "please update _kver to $pkgver" [ "$_kpkgrel" != "$pkgrel" ] && die "please update _kpkgrel to $pkgrel" fi _kpkgver="$_kver-r$_kpkgrel" _abi_release=${_kver}-${_kpkgrel}-${_flavor} pkgname=ipt-netflow-${_flavor} pkgver=$_kver pkgrel=$(( $_kpkgrel + $_mypkgrel )) pkgdesc="Linux kernel netflow sensor module" url="http://ipt-netflow.sourceforge.net/" arch="all" license=GPL3+ source="ipt-netflow-$_ver.tar.gz::https://github.com/aabc/ipt-netflow/archive/v$_ver.tar.gz " depends="$_kpkg-dev=$_kpkgver" makedepends="linux-${_flavor}-dev=$_kpkgver iptables-dev bash" install_if="$_kpkg=$_kpkgver ipt-netflow" _builddir="$srcdir"/ipt-netflow-$_ver prepare() { cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" ./configure --kver=$_abi_release \ --ipt-inc=/usr/include/libiptc \ || return 1 make ipt_NETFLOW.ko || return 1 } package() { cd "$_builddir" make -j1 minstall DEPMOD=: DESTDIR="$pkgdir" || return 1 } # override dev() from kernel's APKBUILD dev() { default_dev } md5sums="d1b40ee12b563edc4faae5e3234c3436 ipt-netflow-2.0.tar.gz" sha256sums="547ca6c2e8d82fc7d3d113d2ab3f602106d1efa7739167f8c7850a43e5bbe46e ipt-netflow-2.0.tar.gz" sha512sums="7bf330ac665180218ea4cc42fe6ac6d365b45632039ff9601559f7a4675738c409853433b15dd431dba68cfe36269d6992754154411e2761041fec021e19bf8d ipt-netflow-2.0.tar.gz"