374c65648b
--HG-- extra : convert_revision : 46a38da454341ff361d349e6a1ef26e8fd1749c6
55 lines
1.6 KiB
Cheetah
55 lines
1.6 KiB
Cheetah
# Template file for 'kernel'
|
|
pkgname=kernel
|
|
version=2.6.28.1
|
|
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=5374cbe80c288a366b307b5c9617c8e87248c800edcdb2eca0ea5c52ab9f13e5
|
|
long_desc="
|
|
This package provides the linux kernel image, kernel modules
|
|
and firmware files."
|
|
|
|
build_depends="perl-5.10.0 module-init-tools-3.5"
|
|
run_depends="dash-0.5.4 coreutils-6.12 module-init-tools-3.5
|
|
initramfs-tools-0.92"
|
|
|
|
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/kernel-$arch-dotconfig ]; then
|
|
msg_normal "Detected a .config file for your arch, using it."
|
|
cp -f $XBPS_TEMPLATESDIR/kernel-$arch-dotconfig $wrksrc/.config
|
|
make oldconfig
|
|
else
|
|
make menuconfig
|
|
fi
|
|
}
|
|
|
|
post_install()
|
|
{
|
|
local destdir=$XBPS_DESTDIR/$pkgname-$version
|
|
|
|
#
|
|
# Install the kernel, modules and firmware files.
|
|
# This is based in the kernel26 pkgbuild from Arch Linux.
|
|
#
|
|
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
|
|
}
|