2008-12-17 09:03:42 +00:00
|
|
|
# Template file for 'kernel'
|
|
|
|
pkgname=kernel
|
2009-03-05 06:01:55 +00:00
|
|
|
version=2.6.28.7
|
2009-01-27 17:54:53 +00:00
|
|
|
# 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"
|
2008-10-27 13:13:10 +00:00
|
|
|
wrksrc="linux-$version"
|
2008-10-28 22:57:52 +00:00
|
|
|
distfiles="http://www.kernel.org/pub/linux/kernel/v2.6/linux-$version.tar.bz2"
|
2008-10-27 13:13:10 +00:00
|
|
|
build_style=gnu_makefile
|
|
|
|
make_build_target="bzImage modules"
|
|
|
|
make_install_target="modules_install
|
|
|
|
INSTALL_MOD_PATH=$XBPS_DESTDIR/$pkgname-$version"
|
2008-12-17 09:03:42 +00:00
|
|
|
short_desc="The Linux kernel and associated stuff (2.6 branch)"
|
2008-10-27 13:13:10 +00:00
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
2009-03-05 06:01:55 +00:00
|
|
|
checksum=9af6c40c75cbfe5af9ef800d84dd1d2010ce0bd7402623ca9afae535eb0393ad
|
2008-10-27 13:13:10 +00:00
|
|
|
long_desc="
|
2008-12-17 09:03:42 +00:00
|
|
|
This package provides the linux kernel image, kernel modules
|
|
|
|
and firmware files."
|
2008-10-27 13:13:10 +00:00
|
|
|
|
2009-02-25 05:15:20 +00:00
|
|
|
Add_dependency full glibc
|
|
|
|
Add_dependency full dash
|
|
|
|
Add_dependency full coreutils
|
2009-03-11 05:31:56 +00:00
|
|
|
Add_dependency full module-init-tools
|
2009-02-25 05:15:20 +00:00
|
|
|
Add_dependency full initramfs-tools
|
|
|
|
Add_dependency build perl
|
2008-10-27 13:13:10 +00:00
|
|
|
|
|
|
|
pre_build()
|
|
|
|
{
|
2008-12-17 09:03:42 +00:00
|
|
|
# If there's a file called kernel-<arch>-dotconfig, use it to
|
2008-10-27 13:13:10 +00:00
|
|
|
# configure the kernel; otherwise run the menuconfig target.
|
2008-11-22 16:38:27 +00:00
|
|
|
local arch=
|
2008-10-27 13:13:10 +00:00
|
|
|
|
2008-11-22 16:38:27 +00:00
|
|
|
if [ "$xbps_machine" != "x86_64" ]; then
|
|
|
|
arch=i386
|
|
|
|
else
|
|
|
|
arch=x86_64
|
|
|
|
fi
|
|
|
|
|
2009-02-03 20:35:57 +00:00
|
|
|
if [ -f $XBPS_TEMPLATESDIR/$pkgname/$arch-dotconfig ]; then
|
2008-12-16 19:55:14 +00:00
|
|
|
msg_normal "Detected a .config file for your arch, using it."
|
2009-02-03 20:35:57 +00:00
|
|
|
cp -f $XBPS_TEMPLATESDIR/$pkgname/$arch-dotconfig \
|
|
|
|
$wrksrc/.config
|
2008-10-27 13:13:10 +00:00
|
|
|
make oldconfig
|
|
|
|
else
|
|
|
|
make menuconfig
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
post_install()
|
|
|
|
{
|
2009-03-11 05:31:56 +00:00
|
|
|
install -d ${DESTDIR}/lib ${DESTDIR}/boot
|
2008-10-27 13:13:10 +00:00
|
|
|
cd $wrksrc || exit 1
|
2009-02-25 05:15:20 +00:00
|
|
|
|
2009-03-11 05:31:56 +00:00
|
|
|
install -m 644 arch/x86/boot/bzImage ${DESTDIR}/boot/vmlinuz-$version
|
|
|
|
install -m 644 System.map ${DESTDIR}/boot/System.map-$version
|
|
|
|
install -m 644 .config ${DESTDIR}/boot/config-$version
|
|
|
|
|
|
|
|
cd ${DESTDIR}/lib/modules/${version} && \
|
|
|
|
rm -f source build && \
|
|
|
|
ln -sf ../../../usr/src/kernel-headers-${version} build && \
|
|
|
|
ln -sf build source
|
2008-10-27 13:13:10 +00:00
|
|
|
}
|