blob: 5011108452c2c71ccd8ffbaa43bc8bb624deac9b (
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
|
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
_flavor=${FLAVOR:-grsec}
_kpkg=linux-$_flavor
_realname=ipfw
_name=$_realname-$_flavor
_kver=3.14.2
_kpkgrel=0
_realver=20130607
_mypkgrel=0
# source the kernel version
if [ -f ../linux-$_flavor/APKBUILD ]; then
. ../linux-$_flavor/APKBUILD
[ "$_kver" != "$pkgver" ] && die "$_name: Please update _kver to $pkgver"
[ "$_kpkgrel" != "$pkgrel" ] && die "$_name: Please update _kpkgrel to $pkgrel"
fi
_kernelver=$_kver-r$_kpkgrel
_abi_release=${_kver}-${_kpkgrel}-${_flavor}
pkgname=$_name
pkgver=$_kver
pkgrel=$(($_kpkgrel + $_mypkgrel))
pkgdesc="BSD ipfw firewall and dummynet suite (linux-grsec modules)"
url="http://info.iet.unipi.it/~luigi/dummynet/"
arch=""
license="BSD"
depends="linux-${_flavor}=${_kernelver}"
makedepends="linux-${_flavor}-dev=${_kernelver} iptables-dev pkgconfig"
install=
install_if="linux-$_flavor=$_kernelver $_realname"
source="http://info.iet.unipi.it/~luigi/doc/${_realver}-${_realname}3.tgz
ipfw-kmod-dereffix.patch
ipfw-cgroup.patch
ipfw-strict-uidgid.patch
ipfw-hookops.patch"
subpackages=""
_builddir="$srcdir/ipfw3-2012"
prepare() {
local i
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"
make kipfw KSRC=/usr/src/linux-headers-${_abi_release} V=1
}
package() {
cd "$_builddir/kipfw-mod"
mkdir -p "$pkgdir/lib/modules/${_abi_release}/misc/"
for module in `find . -type f -name '*.ko'`; do
install -D -m644 $module "$pkgdir/lib/modules/${_abi_release}/misc/"
done
}
|