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

_kver=3.3.6
_kpkgrel=2

# 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-${_flavor}

pkgname=$_name
pkgver=$_kver
_realver=1.42
_mypkgrel=1
pkgrel=$(($_kpkgrel + $_mypkgrel))
pkgdesc="Iptables extensions kernel modules"
url="http://xtables-addons.sourceforge.net/"
arch="all"
license="GPL"
depends="linux-${_flavor}=${_kernelver}"
makedepends="linux-${_flavor}-dev=${_kernelver} iptables-dev pkgconfig"
install=
install_if="linux-$_flavor=$_kernelver $_realname"
subpackages=
source="http://downloads.sourceforge.net/$_realname/$_realname-$_realver.tar.xz"

# override kernel's prepare()
prepare() {
	:
}

build() {
	cd "$srcdir/$_realname-$_realver"
	./configure --prefix=/usr \
		--with-kbuild=/usr/src/linux-headers-${_abi_release}

	cd extensions
	export GCC_SPECS=/usr/share/gcc/hardenednopie.specs
	make CC="${CC:-gcc}" modules || return 1
}

package() {
	cd "$srcdir/$_realname-$_realver"/extensions
	make DESTDIR="$pkgdir" modules_install
}

md5sums="7c996a0400667b57ab4fb53a013ae742  xtables-addons-1.42.tar.xz"