aboutsummaryrefslogtreecommitdiffstats
path: root/main/xtables-addons-grsec/APKBUILD
blob: d2ae870d9f2b3cf2adfa6ae6d80820faf1d553a7 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_flavor=${FLAVOR:-grsec}
_kpkg=linux-$_flavor
_realname=xtables-addons
_name=$_realname-$_flavor

_kver=4.4.39
_kpkgrel=2

_realver=2.11
_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="Iptables extensions kernel modules"
url="http://xtables-addons.sourceforge.net/"
arch="x86 x86_64 armhf"
license="GPL"
depends="linux-${_flavor}=${_kernelver}"
makedepends="linux-${_flavor}-dev=${_kernelver} iptables-dev linux-headers"
install=
install_if="linux-$_flavor=$_kernelver $_realname"
subpackages=
source="http://downloads.sourceforge.net/$_realname/$_realname-$_realver.tar.xz"

_builddir="$srcdir/$_realname-$_realver"

prepare() {
	cd "$_builddir"
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--with-kbuild=/usr/src/linux-headers-${_abi_release} \
		|| return 1

	cd extensions
	make modules || return 1
}

package() {
	cd "$_builddir/extensions"
	make DESTDIR="$pkgdir" modules_install
}

md5sums="9f3123295db81a9d1bc08dabf075d0d6  xtables-addons-2.11.tar.xz"
sha256sums="f14f8953a9d3a70157a82883886ff6ec866c61dbea1585edb421478107279921  xtables-addons-2.11.tar.xz"
sha512sums="28a2b7335dc478b8efc5fa25357d2e2789303232ce31a7a6da3a3742fdaa84c7d222ebb0d6f1f900652d39b9caf9b13196309429a8aecd5e0cb936b6bd9de1bb  xtables-addons-2.11.tar.xz"