Thats another story... I agree that the PKGBUILD is huge. There is probably a reason for that. It is true it is not the easiest one to read. Maybe another bug report?


2008/12/8 RedShift <redshift@pandora.be>
Nicolas Bigaouette wrote:
Hi all!

* lots of text here *


Whoah, that PKGBUILD is HUGE. Take a look at mine, which I use for my custom configs. It doesn't do one thing though, and that's install the kernel headers. You need those if you want to compile out-of-tree modules like nvidia. I'm not sure if it's 100% OK because I haven't used it in a long time, but the logic I like to follow is there.

Glenn

pkgname=linux
pkgver=2.6.28
pkgrel=1
pkgdesc='Linux is a clone of the operating system Unix'
arch=(
       'i686'
)
url='http://www.kernel.org/'
license=GPL
depends=(
       'coreutils'
       'mkinitcpio'
       'module-init-tools'
)
makedepends=('gcc')
backup=("etc/mkinitcpio.d/$pkgname.preset")
install=linux.install
source=(
       "http://www.kernel.org/pub/linux/kernel/v2.6/testing/$pkgname-$pkgver.tar.bz2"
       config-$pkgver.i686
       'linux.preset'
)

build() {
       # Apply configuration
       cat config-$pkgver.$CARCH > $startdir/src/$pkgname-$pkgver/.config

       # cd to the kernel build directory
       cd $startdir/src/$pkgname-$pkgver/

       # Process the configuration to get CONFIG_LOCALVERSION
       . ./.config

       # Make necessary directories
       mkdir -p $startdir/pkg/boot
       mkdir -p $startdir/pkg/etc/mkinitcpio.d
       mkdir -p $startdir/pkg/usr/src/${pkgname}-${pkgver}${CONFIG_LOCALVERSION}/

       # Make the boot image and kernel modules
       make vmlinux bzImage
       make modules

       # Install boot image and kernel modules
       make INSTALL_MOD_PATH=$startdir/pkg modules_install
       if [ "$CARCH" = "x86_64" ]; then
               cp $startdir/src/$pkgname-$pkgver/arch/x86_64/boot/bzImage $startdir/pkg/boot/linux
       else
               cp $startdir/src/$pkgname-$pkgver/arch/i386/boot/bzImage $startdir/pkg/boot/linux
       fi

       # Setup mkinitcpio
       echo "ALL_kver='${pkgver}${CONFIG_LOCALVERSION}'" > $startdir/pkg/etc/mkinitcpio.d/$pkgname.kver
       install -m664 -D $startdir/src/$pkgname.preset $startdir/pkg/etc/mkinitcpio.d/$pkgname.preset
}