aboutsummaryrefslogtreecommitdiffstats
path: root/main/open-iscsi-grsec/APKBUILD
blob: 2cfd6f1c8eb1fa7e0f2fe6ceba9ec50365ab6f4e (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: Leonardo Arena <rnalrd@gmail.com>

_flavor=grsec
_realname=open-iscsi
_realver=2.0-872
# source the kernel version
if [ -f ../../main/linux-$_flavor/APKBUILD ]; then
	. ../../main/linux-$_flavor/APKBUILD
fi
_kver=$pkgver
_kernelver=$pkgver-r$pkgrel
_abi_release=$pkgver-${_flavor}
_kpkgrel=$pkgrel
_ksrc=/usr/src/linux-headers-${_abi_release}

_iscsiver=$_realver

pkgname=${_realname}-${_flavor}
pkgver=$_kver
_mypkgrel=0
pkgrel=$(($_kpkgrel + $_mypkgrel))
pkgdesc="$_flavor kernel modules for open-iscsi $_iscsiver"
url="http://www.open-iscsi.org"
arch="all"
license="GPL-2"
depends="linux-${_flavor}=${_kernelver}"
install=
makedepends="linux-${_flavor}-dev=${_kernelver}"
subpackages=
source="http://www.open-iscsi.org/bits/$_realname-$_realver.tar.gz
	Makefile-Alpine-kernels-support.patch"

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

prepare() {
	cd "$_builddir"
	patch -p1 < "$srcdir"/Makefile-Alpine-kernels-support.patch || return 1
}

build() {
	cd "$_builddir"
	unset ARCH
	export GCC_SPECS=/usr/share/gcc/hardenednopie.specs
	make KSRC="$_ksrc" kernel || return 1
}

package() {
	cd "$_builddir"
	make KSRC="$_ksrc" DESTDIR="$pkgdir" \
	 INSTALL_MOD_DIR="extra/drivers/scsi" \
	 install_kernel
}

md5sums="b4df94f08c241352bb964043b3e44779  open-iscsi-2.0-872.tar.gz
7b7ba39a7e8e869939168865a5f8b495  Makefile-Alpine-kernels-support.patch"