updated on Wed Jan 25 12:16:47 UTC 2012
[aur-mirror.git] / kernel26-source / PKGBUILD
blob2422ebebbc41bc1cb529df7279d05c494d7545a0
1 # Maintainer: Thomas Dziedzic < gostrc at gmail >
2 # Contributor: Schnouki <thomas.jost@gmail.com>
3 # Contributor: Emmanuel GRAS <gras.emmanuel@gmail.com>
4  
5 pkgname=kernel26-source
6 # pkgname=kernel26-custom       # Build kernel with a different name
7 _basekernel=2.6.39
8 pkgver=${_basekernel}.3
9 pkgrel=1
10 pkgdesc="The Linux Kernel and modules source code."
11 _patchname="patch-${pkgver}-${pkgrel}-ARCH"
12 #_patchname="patch-${pkgver}-1-ARCH"
13 arch=(i686 x86_64)
14 license=('GPL2')
15 url="http://www.kernel.org"
16 depends=("coreutils")
17 options=(!strip)
18 source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
19         ftp://ftp.archlinux.org/other/kernel26/${_patchname}.bz2
20         # the main kernel config files
21         config config.x86_64
22         # standard config files for mkinitcpio ramdisk
23         kernel26.preset)
24 md5sums=('1aab7a741abe08d42e8eccf20de61e05'
25          'b23d7def30e57242cfe088f4d8ca8baa'
26          'de7cf2c54104b88e3385683f47fedaef'
27          '8be1f60e54eb505b7e67d39fd2233103'
28          '25584700a0a679542929c4bed31433b6')
30 build() {
31   cd ${srcdir}/linux-$_basekernel
32   # Add -ARCH patches
33   # See http://projects.archlinux.org/linux-2.6-ARCH.git/
34   patch -Np1 -i ${srcdir}/${_patchname}
36   if [ "$CARCH" = "x86_64" ]; then
37     cat ../config.x86_64 >./.config
38   else
39     cat ../config >./.config
40   fi
41   if [ "${_kernelname}" != "" ]; then
42     sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
43   fi
44   # get kernel version  
45   make prepare
46   # load configuration
47   # Configure the kernel. Replace the line below with one of your choice.
48   #make menuconfig # CLI menu for configuration
49   #make nconfig # new CLI menu for configuration
50   #make xconfig # X-based configuration
51   #make oldconfig # using old config from previous kernel version
52   # ... or manually edit .config
53   ####################
54   # stop here
55   # this is useful to configure the kernel
56   #msg "Stopping build"
57   #return 1
58   ####################
59   yes "" | make config
61   # Keep the source code
62   mkdir -p $pkgdir/usr/src
63   mv $srcdir/linux-$_basekernel $pkgdir/usr/src/linux-$_basekernel
65   # Add link from the modules directory
66   mkdir -p $pkgdir/lib/modules/$_kernver
67   cd $pkgdir/lib/modules/$_kernver
68   ln -s ../../../usr/src/linux-$_basekernel source