Newer
Older
# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org>
# Customized version of linux for seblu computers
license=('GPL2')
url='http://www.kernel.org'
options=('!strip')
source=("git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git#tag=v$pkgver"
"config.$CARCH.$pkgver")
done
# loading default config
# use make localmodconfig to check .config is correct
msg2 'Copying config'
# force suffixe in config (must be the right!)
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${pkgname#linux*}\"|g" .config
# remove git informations
# these info will be used by make kernelrelease and produce wrong information
# because ownership has fakely be changed by fakeroot during packaging.
rm -rf .git
# define current build version
yes '' | make config &>/dev/null
make prepare &>/dev/null
# get real compiled kernel version
kernrel=$(make kernelrelease)
pkgdesc="The Linux Kernel, version $kernrel"
pkgname="linux-$kernrel"
msg2 "Packing kernel release: $kernrel"
msg2 "Packing kernel version: $pkgver"
# and it's done by kernel-install in .install
make INSTALL_MOD_PATH="$pkgdir/usr" DEPMOD=/bin/true modules_install
# install headers
make INSTALL_HDR_PATH="$pkgdir/usr/src/linux-$kernrel" headers_install
ln -sf ../../../src/linux-$kernrel "$pkgdir/usr/lib/modules/$kernrel/build"
install -D -m644 arch/x86/boot/bzImage "$pkgdir/usr/lib/kernel/vmlinuz-$kernrel"
# remove build and source links
rm -f "$pkgdir/usr/lib/modules/$kernrel"/{source,build}
chown -R root.root "$pkgdir/usr/src/linux-$kernrel"
chmod -R u=rwX,go=rX "$pkgdir/usr/src/linux-$kernrel"
# gzip -9 all modules to safe 100MB of space
}
# vim:set ts=2 sw=2 ft=sh et: