summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2011-10-07 08:38:07 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2011-10-07 08:38:07 +0000
commit5078eab5bdabc158c46bbc24f30884d475c01dfa (patch)
tree3b5bd2183d46d32aedb16ddb6f548204ecd00cd9
parent2c377e58dba5c5484b130d8b778229b85f78a924 (diff)
downloadaports-fcolista-5078eab5bdabc158c46bbc24f30884d475c01dfa.tar.bz2
aports-fcolista-5078eab5bdabc158c46bbc24f30884d475c01dfa.tar.xz
main/open-iscsi-grsec: add support for kernel 3.0.4
-rw-r--r--main/open-iscsi-grsec/APKBUILD8
-rw-r--r--main/open-iscsi-grsec/Makefile-Alpine-kernels-support.patch33
2 files changed, 37 insertions, 4 deletions
diff --git a/main/open-iscsi-grsec/APKBUILD b/main/open-iscsi-grsec/APKBUILD
index 2402ec508c..2cfd6f1c8e 100644
--- a/main/open-iscsi-grsec/APKBUILD
+++ b/main/open-iscsi-grsec/APKBUILD
@@ -21,20 +21,20 @@ _mypkgrel=0
pkgrel=$(($_kpkgrel + $_mypkgrel))
pkgdesc="$_flavor kernel modules for open-iscsi $_iscsiver"
url="http://www.open-iscsi.org"
-arch=""
+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.kernel.patch"
+ Makefile-Alpine-kernels-support.patch"
_builddir="$srcdir/$_realname-$_realver"
prepare() {
cd "$_builddir"
- patch -p2 < "$srcdir"/Makefile.kernel.patch || return 1
+ patch -p1 < "$srcdir"/Makefile-Alpine-kernels-support.patch || return 1
}
build() {
@@ -52,4 +52,4 @@ package() {
}
md5sums="b4df94f08c241352bb964043b3e44779 open-iscsi-2.0-872.tar.gz
-f0c851e9190c859987d9f561d6eeb7f5 Makefile.kernel.patch"
+7b7ba39a7e8e869939168865a5f8b495 Makefile-Alpine-kernels-support.patch"
diff --git a/main/open-iscsi-grsec/Makefile-Alpine-kernels-support.patch b/main/open-iscsi-grsec/Makefile-Alpine-kernels-support.patch
new file mode 100644
index 0000000000..166cc72e44
--- /dev/null
+++ b/main/open-iscsi-grsec/Makefile-Alpine-kernels-support.patch
@@ -0,0 +1,33 @@
+--- a/kernel/Makefile
++++ b/kernel/Makefile
+@@ -63,11 +63,19 @@
+ # check to see if code is unpatched
+ unpatch_code=$(shell test -e $(cur_patched) && echo do_unpatch_code )
+
++KVERSION = $(shell cat $(KSRC)/Makefile | awk -F= '/^VERSION =/ {print $$2}' | \
++ sed 's/^[ \t]*//;s/[ \t]*$$//')
++
++KPATCHLEVEL = $(shell cat $(KSRC)/Makefile | awk -F= '/^PATCHLEVEL =/ {print $$2}' | \
++ sed 's/^[ \t]*//;s/[ \t]*$$//')
++
+ KSUBLEVEL = $(shell cat $(KSRC)/Makefile | awk -F= '/^SUBLEVEL =/ {print $$2}' | \
+ sed 's/^[ \t]*//;s/[ \t]*$$//')
+
++linux_2_6_38: $(unpatch_code)
+
+-KERNEL_TARGET=linux_2_6_$(KSUBLEVEL)
++
++KERNEL_TARGET=linux_$(KVERSION)_$(KPATCHLEVEL)_$(KSUBLEVEL)
+ kernel_check: $(KERNEL_TARGET)
+
+ linux_2_6_14: has_14to23_patch
+@@ -113,6 +121,8 @@
+ linux_2_6_34: has_33to34_patch
+
+ linux_2_6_35: $(unpatch_code)
++
++linux_3_0_4: $(unpatch_code)
+
+ do_unpatch_code:
+ echo "Un-patching source code for use with linux-2.6.14 and up ..."
+Only in b: kernel/Makefile.orig