aboutsummaryrefslogtreecommitdiffstats
path: root/testing/linux-scst/APKBUILD
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2010-12-21 15:50:44 +0100
committerCarlo Landmeter <clandmeter@gmail.com>2010-12-21 15:50:44 +0100
commitb0844388ab1a08db016d6716af3a9fa2af7ea475 (patch)
tree6376f45e194b7fc0822c11306516b94f10c843fb /testing/linux-scst/APKBUILD
parenta96c117627b6663198fafc2cffa16b6307fe3e50 (diff)
downloadaports-b0844388ab1a08db016d6716af3a9fa2af7ea475.tar.bz2
aports-b0844388ab1a08db016d6716af3a9fa2af7ea475.tar.xz
testing/linux-scst: move scst modules in-tree and upgrade to 2.6.35.9
Diffstat (limited to 'testing/linux-scst/APKBUILD')
-rw-r--r--testing/linux-scst/APKBUILD222
1 files changed, 126 insertions, 96 deletions
diff --git a/testing/linux-scst/APKBUILD b/testing/linux-scst/APKBUILD
index 0b16031504..8f364f65f8 100644
--- a/testing/linux-scst/APKBUILD
+++ b/testing/linux-scst/APKBUILD
@@ -1,123 +1,153 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+
_flavor=scst
pkgname=linux-${_flavor}
-pkgver=2.6.34
-_kernver=$pkgver
+pkgver=2.6.35.9
+_kernver=2.6.35
pkgrel=0
-pkgdesc="Linux kernel with scst"
-url="http://www.kernel.org"
+pkgdesc="Linux kernel optimised for scst"
+url="http://scst.sourceforge.net"
depends="mkinitfs linux-firmware"
-makedepends="perl installkernel"
+makedepends="perl installkernel bash"
options="!strip"
-_config=${config:-kernelconfig.${CARCH:-x86}}
+_config=${config:-kernelconfig.${CARCH}}
install=
-source="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$pkgver.tar.bz2
- arp.patch
- kernelconfig.x86
- put_page_callback-2.6.34.patch
- scst_exec_req_fifo-2.6.34.patch
- "
-# no need to patch now
-#ftp://ftp.kernel.org/pub/linux/kernel/v2.6/patch-$pkgver.bz2
-subpackages="$pkgname-dev"
-arch="x86"
+_scst_svn="3161"
+source="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_kernver.tar.bz2
+ ftp://ftp.kernel.org/pub/linux/kernel/v2.6/patch-$pkgver.bz2
+ 0004-arp-flush-arp-cache-on-device-change.patch
+ r8169-fix-rx-checksum-offload.patch
+ r8169-add-gro-support.patch
+ setlocalversion.patch
+ kernelconfig.x86_64
+ unionfs-2.5.7_for_2.6.35.8.patch
+ scst-2.6.35-svn-3161.patch
+ "
+subpackages="$pkgname-dev linux-firmware:firmware"
+arch="x86_64"
license="GPL-2"
_abi_release=${pkgver}-${_flavor}
prepare() {
- cd "$srcdir"/linux-$_kernver
- if [ "$_kernver" != "$pkgver" ]; then
- bunzip2 -c < ../patch-$pkgver.bz2 | patch -p1 -N || return 1
- fi
-
- for i in ../*.diff ../*.patch; do
- [ -f $i ] || continue
- msg "Applying $i..."
- patch -s -p1 -N < $i || return 1
- done
-
- mkdir -p "$srcdir"/build
- cp "$srcdir"/$_config "$srcdir"/build/.config
- echo "-${_flavor}" > "$srcdir"/linux-$_kernver/localversion-${_flavor}
- make -C "$srcdir"/linux-$_kernver O="$srcdir"/build HOSTCC="$CC" \
- silentoldconfig
+ local _patch_failed=
+ cd "$srcdir"/linux-$_kernver
+ if [ "$_kernver" != "$pkgver" ]; then
+ bunzip2 -c < ../patch-$pkgver.bz2 | patch -p1 -N || return 1
+ fi
+
+ # first apply patches in specified order
+ for i in $source; do
+ case $i in
+ *.patch)
+ msg "Applying $i..."
+ if ! patch -s -p1 -N -i "$srcdir"/$i; then
+ echo $i >>failed
+ _patch_failed=1
+ fi
+ ;;
+ esac
+ done
+
+ if ! [ -z "$_patch_failed" ]; then
+ error "The following patches failed:"
+ cat failed
+ return 1
+ fi
+
+ mkdir -p "$srcdir"/build
+ cp "$srcdir"/$_config "$srcdir"/build/.config || return 1
+ make -C "$srcdir"/linux-$_kernver O="$srcdir"/build HOSTCC="${CC:-gcc}" \
+ silentoldconfig
}
# this is so we can do: 'abuild menuconfig' to reconfigure kernel
menuconfig() {
cd "$srcdir"/build || return 1
- make menuconfig
- cp .config "$startdir"/$_config
+ make menuconfig
+ cp .config "$startdir"/$_config
}
build() {
- cd "$srcdir"/build
- make CC="$CC" || return 1
+ cd "$srcdir"/build
+ make CC="${CC:-gcc}" \
+ KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine" \
+ || return 1
}
package() {
- cd "$srcdir"/build
- mkdir -p "$pkgdir"/boot "$pkgdir"/lib/modules
- make modules_install install \
- INSTALL_MOD_PATH="$pkgdir" \
- INSTALL_PATH="$pkgdir"/boot
-
- rm -f "$pkgdir"/lib/modules/${_abi_release}/build \
- "$pkgdir"/lib/modules/${_abi_release}/source
- rm -rf "$pkgdir"/lib/firmware
-
- install -D include/config/kernel.release \
- "$pkgdir"/usr/share/kernel/$_flavor/kernel.release
+ cd "$srcdir"/build
+ mkdir -p "$pkgdir"/boot "$pkgdir"/lib/modules
+ make -j1 modules_install firmware_install install \
+ INSTALL_MOD_PATH="$pkgdir" \
+ INSTALL_PATH="$pkgdir"/boot \
+ || return 1
+
+ rm -f "$pkgdir"/lib/modules/${_abi_release}/build \
+ "$pkgdir"/lib/modules/${_abi_release}/source
+ install -D include/config/kernel.release \
+ "$pkgdir"/usr/share/kernel/$_flavor/kernel.release
}
dev() {
- # copy the only the parts that we really need for build 3rd party
- # kernel modules and install those as /usr/src/linux-headers,
- # simlar to what ubuntu does
- #
- # this way you dont need to install the 300-400 kernel sources to
- # build a tiny kernel module
- #
- pkgdesc="Headers and script for third party modules for $pkgname kernel"
- local dir="$subpkgdir"/usr/src/linux-headers-${_abi_release}
-
- # first we import config, run prepare to set up for building
- # external modules, and create the scripts
- mkdir -p "$dir"
- cp "$srcdir"/$_config "$dir"/.config
- make -j1 -C "$srcdir"/linux-$_kernver O="$dir" HOSTCC="$CC" \
- silentoldconfig prepare scripts
-
- # remove the stuff that poits to real sources. we want 3rd party
- # modules to believe this is the soruces
- rm "$dir"/Makefile "$dir"/source
-
- # copy the needed stuff from real sources
- #
- # this is taken from ubuntu kernel build script
- # http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-jaunty.git;a=blob;f=debian/rules.d/3-binary-indep.mk;hb=HEAD
- cd "$srcdir"/linux-$_kernver
- find . -path './include/*' -prune -o -path './scripts/*' -prune \
- -o -type f \( -name 'Makefile*' -o -name 'Kconfig*' \
- -o -name 'Kbuild*' -o -name '*.sh' -o -name '*.pl' \
- -o -name '*.lds' \) | cpio -pdm "$dir"
- cp -a drivers/media/dvb/dvb-core/*.h "$dir"/drivers/media/dvb/dvb-core
- cp -a drivers/media/video/*.h "$dir"/drivers/media/video
- cp -a drivers/media/dvb/frontends/*.h "$dir"/drivers/media/dvb/frontends
- cp -a scripts include "$dir"
- find $(find arch -name include -type d -print) -type f \
- | cpio -pdm "$dir"
-
- install -Dm644 "$srcdir"/build/Module.symvers \
- "$dir"/Module.symvers
-
- mkdir -p "$subpkgdir"/lib/modules/${_abi_release}
- ln -sf /usr/src/linux-headers-${_abi_release} \
- "$subpkgdir"/lib/modules/${_abi_release}/build
+ # copy the only the parts that we really need for build 3rd party
+ # kernel modules and install those as /usr/src/linux-headers,
+ # simlar to what ubuntu does
+ #
+ # this way you dont need to install the 300-400 kernel sources to
+ # build a tiny kernel module
+ #
+ pkgdesc="Headers and script for third party modules for grsec kernel"
+ local dir="$subpkgdir"/usr/src/linux-headers-${_abi_release}
+
+ # first we import config, run prepare to set up for building
+ # external modules, and create the scripts
+ mkdir -p "$dir"
+ cp "$srcdir"/$_config "$dir"/.config
+ make -j1 -C "$srcdir"/linux-$_kernver O="$dir" HOSTCC="${CC:-gcc}" \
+ silentoldconfig prepare scripts
+
+ # remove the stuff that poits to real sources. we want 3rd party
+ # modules to believe this is the soruces
+ rm "$dir"/Makefile "$dir"/source
+
+ # copy the needed stuff from real sources
+ #
+ # this is taken from ubuntu kernel build script
+ # http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-jaunty.git;a=blob;f=debian/rules.d/3-binary-indep.mk;hb=HEAD
+ cd "$srcdir"/linux-$_kernver
+ find . -path './include/*' -prune -o -path './scripts/*' -prune \
+ -o -type f \( -name 'Makefile*' -o -name 'Kconfig*' \
+ -o -name 'Kbuild*' -o -name '*.sh' -o -name '*.pl' \
+ -o -name '*.lds' \) | cpio -pdm "$dir"
+ cp -a drivers/media/dvb/dvb-core/*.h "$dir"/drivers/media/dvb/dvb-core
+ cp -a drivers/media/video/*.h "$dir"/drivers/media/video
+ cp -a drivers/media/dvb/frontends/*.h "$dir"/drivers/media/dvb/frontends
+ cp -a scripts include "$dir"
+ find $(find arch -name include -type d -print) -type f \
+ | cpio -pdm "$dir"
+
+ install -Dm644 "$srcdir"/build/Module.symvers \
+ "$dir"/Module.symvers
+
+ mkdir -p "$subpkgdir"/lib/modules/${_abi_release}
+ ln -sf /usr/src/linux-headers-${_abi_release} \
+ "$subpkgdir"/lib/modules/${_abi_release}/build
+}
+
+firmware() {
+ pkgdesc="Firmware for linux kernel"
+ replaces="linux-grsec linux-vserver"
+ mkdir -p "$subpkgdir"/lib
+ mv "$pkgdir"/lib/firmware "$subpkgdir"/lib/
}
-md5sums="10eebcb0178fb4540e2165bfd7efc7ad linux-2.6.34.tar.bz2
-4c39a161d918e7f274292ecfd168b891 arp.patch
-2a08789db4977397f529a2933bc7b787 kernelconfig.x86
-06e9b200ec4fe252dc1478b5f8137e9e put_page_callback-2.6.34.patch
-f9ea26d08807c41407a7758ce53fc633 scst_exec_req_fifo-2.6.34.patch"
+md5sums="091abeb4684ce03d1d936851618687b6 linux-2.6.35.tar.bz2
+eca407cf4872ad77ae23adc8242389c4 patch-2.6.35.9.bz2
+776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch
+0ccecafd4123dcad0b0cd7787553d734 r8169-fix-rx-checksum-offload.patch
+139b39da44ecb577275be53d7d365949 r8169-add-gro-support.patch
+8c224ba0cdf0aa572c7eb50379435be4 setlocalversion.patch
+8b50f527b834f693e9cfbcabf29b04f3 kernelconfig.x86_64
+e4185c1bb1d88594c67eb154d0c06692 unionfs-2.5.7_for_2.6.35.8.patch
+f8aa57373ab14ece95ecdaa15840fa25 scst-2.6.35-svn-3161.patch"