aboutsummaryrefslogtreecommitdiffstats
path: root/main/iscsitarget-grsec/APKBUILD
blob: 710647021a53a3874f93d14939b2980c9cf0775c (plain) (blame)
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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>

_flavor=grsec
_realname=iscsitarget
# source the kernel version
if [ -f ../linux-$_flavor/APKBUILD ]; then
	. ../linux-$_flavor/APKBUILD
fi
_kver=$pkgver
_kernelver=$pkgver-r$pkgrel
_abi_release=$pkgver-${_flavor}
_kpkgrel=$pkgrel

_iscsiver=1.4.19

pkgname=${_realname}-${_flavor}
pkgver=$_kver
_mypkgrel=1
pkgrel=$(($_kpkgrel + $_mypkgrel))
pkgdesc="$_flavor kernel modules for iscsitarget $_iscsiver"
url="http://iscsitarget.sourceforge.net/"
license="GPL-2"
depends="linux-${_flavor}=${_kernelver}"
install=
makedepends="linux-${_flavor}-dev=${_kernelver}"
subpackages=
source="http://downloads.sourceforge.net/$_realname/$_realname-$_iscsiver.tar.gz
	iscsitarget-1.4.18+linux-2.6.32.patch
	"

prepare() {
	cd "$srcdir"/$_realname-$_iscsiver
	for i in ../*.patch; do
		msg "Applying $i"
		patch -p1 < $i || return 1
	done
}

build() {
	cd "$srcdir"/$_realname-$_iscsiver
	unset ARCH
	local ksrc=/usr/src/linux-headers-${_abi_release}
	make KSRC="$ksrc" kernel || return 1
}

package() {
	cd "$srcdir"/$_realname-$_iscsiver
	local ksrc=/usr/src/linux-headers-${_abi_release}
	make KSRC="$ksrc" DISTDIR="$pkgdir" install-kernel || return 1
}

md5sums="9beca214c28949cce1716b49fec57de4  iscsitarget-1.4.19.tar.gz
07f6fb7a35172b3be4c4b0101983fe86  iscsitarget-1.4.18+linux-2.6.32.patch"