void-packages/templates/kernel/template
Juan RP 728f0883f1 kernel*: update to 2.6.28.7, disable debug, fix INSTALL.
An automated image is working now...

--HG--
extra : convert_revision : 1b0b4f911fc69c1d8d54431ea0d8d5835e8bf57b
2009-03-05 07:01:55 +01:00

57 lines
1.6 KiB
Text

# Template file for 'kernel'
pkgname=kernel
version=2.6.28.7
# Vanilla kernel + UnionFS/SquashFS patches.
patch_files="squashfs-3.4.diff.bz2 unionfs-2.5.1_for_2.6.28.1.diff.bz2"
patch_args="-p1"
wrksrc="linux-$version"
distfiles="http://www.kernel.org/pub/linux/kernel/v2.6/linux-$version.tar.bz2"
build_style=gnu_makefile
make_build_target="bzImage modules"
make_install_target="modules_install
INSTALL_MOD_PATH=$XBPS_DESTDIR/$pkgname-$version"
short_desc="The Linux kernel and associated stuff (2.6 branch)"
maintainer="Juan RP <xtraeme@gmail.com>"
checksum=9af6c40c75cbfe5af9ef800d84dd1d2010ce0bd7402623ca9afae535eb0393ad
long_desc="
This package provides the linux kernel image, kernel modules
and firmware files."
Add_dependency full glibc
Add_dependency full dash
Add_dependency full coreutils
Add_dependency full initramfs-tools
Add_dependency build perl
pre_build()
{
# If there's a file called kernel-<arch>-dotconfig, use it to
# configure the kernel; otherwise run the menuconfig target.
local arch=
if [ "$xbps_machine" != "x86_64" ]; then
arch=i386
else
arch=x86_64
fi
if [ -f $XBPS_TEMPLATESDIR/$pkgname/$arch-dotconfig ]; then
msg_normal "Detected a .config file for your arch, using it."
cp -f $XBPS_TEMPLATESDIR/$pkgname/$arch-dotconfig \
$wrksrc/.config
make oldconfig
else
make menuconfig
fi
}
post_install()
{
local destdir=$XBPS_DESTDIR/$pkgname-$version
install -d $destdir/lib $destdir/boot
cd $wrksrc || exit 1
install -m 644 arch/x86/boot/bzImage $destdir/boot/vmlinuz-$version
install -m 644 System.map $destdir/boot/System.map-$version
}