APKBUILD 1.68 KB
Newer Older
1 2
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_flavor=${FLAVOR:-grsec}
3
_kpkg=linux-$_flavor
4
_realname=xtables-addons
5 6
_name=$_realname-$_flavor

7
_kver=3.8.11
8
_kpkgrel=1
9

10
_realver=2.2
11 12
_mypkgrel=0

13 14 15
# source the kernel version
if [ -f ../linux-$_flavor/APKBUILD ]; then
	. ../linux-$_flavor/APKBUILD
16 17
	[ "$_kver" != "$pkgver" ] && die "$_name: Please update _kver to $pkgver"
	[ "$_kpkgrel" != "$pkgrel" ] && die "$_name: Please update _kpkgrel to $pkgrel"
18 19
fi

20
_kernelver=$_kver-r$_kpkgrel
21
_abi_release=${_kver}-${_kpkgrel}-${_flavor}
22 23 24

pkgname=$_name
pkgver=$_kver
25
pkgrel=$(($_kpkgrel + $_mypkgrel))
26 27
pkgdesc="Iptables extensions kernel modules"
url="http://xtables-addons.sourceforge.net/"
28
arch="all"
29
license="GPL"
Natanael Copa's avatar
Natanael Copa committed
30 31
depends="linux-${_flavor}=${_kernelver}"
makedepends="linux-${_flavor}-dev=${_kernelver} iptables-dev pkgconfig"
32
install=
33
install_if="linux-$_flavor=$_kernelver $_realname"
34
subpackages=
35
source="http://downloads.sourceforge.net/$_realname/$_realname-$_realver.tar.xz"
36

37 38 39 40
# override kernel's prepare()
prepare() {
	:
}
41

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

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

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

57 58 59
md5sums="bc60abaa3cacc907f646ec6f873054f5  xtables-addons-2.2.tar.xz"
sha256sums="bafaf53b896272adcf17f240339c866eff07d30b51be8893a08deaf69f8f13ef  xtables-addons-2.2.tar.xz"
sha512sums="1bfdfe5a540a4aeb32511c8092662a9694bc8b58c5b369065380fdca2044b24edb1e47ed7bf301771ee36c782f8ff457fd1f8cfa76ded5aaadf35f41292f6f8e  xtables-addons-2.2.tar.xz"