blob: 1fa399f0d6b87a61703c196ddd18f0b9c9e176a5 (
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
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_flavor=grsec
_kpkg=linux-$_flavor
_kver=4.4.17
_kpkgrel=0
# when chaning _ver we *must* bump _mypkgrel
_ver=2.1
_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
git.patch
"
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 KCFLAGS="-fno-pie" ipt_NETFLOW.ko || return 1
}
package() {
cd "$_builddir"
make -j1 minstall KCFLAGS="-fno-pie" DEPMOD=: DESTDIR="$pkgdir" \
|| return 1
}
# override dev() from kernel's APKBUILD
dev() {
default_dev
}
md5sums="bd8fc7d609c12832f5052f342640a839 ipt-netflow-2.1.tar.gz
98c5286c6471e47d3bb25026ac406b30 git.patch"
sha256sums="a3eafe7a09f09e15d330539fab983b88c887db56e5614bc820619e8462bc7749 ipt-netflow-2.1.tar.gz
4d45daecb82ca29a513ebaed7c9bab91f0d16fa7834b52a7ff06dc0d1cd4cd3a git.patch"
sha512sums="4ec48cb4612bd99d06ed2832d165fcddaf265f0c9555c7c49e012375c38c72cd57d5ee194a6b11e32eecfd2750e710a2bd167f3f2b2597b2e880a3f9b13ba27e ipt-netflow-2.1.tar.gz
3714c78ae8e8ca432a3216c2067ec00f64f1e25985b39996907f4638835509ab587605937c81d823a9dc95cf3b963a0119eade75a3f2286d425aa0d333a44bc9 git.patch"
|