Rename kernel26 to kernel and don't install headers.
The /usr/src/linux-$version headers/Makefiles and whatever will be installed now by the new "kernel-headers" pkg. --HG-- extra : convert_revision : 2d60053d37e0dfc27d094145500b05cd4355c319
This commit is contained in:
68
templates/kernel.tmpl
Normal file
68
templates/kernel.tmpl
Normal file
@@ -0,0 +1,68 @@
|
||||
# Template file for 'kernel'
|
||||
pkgname=kernel
|
||||
version=2.6.27.9
|
||||
# Vanilla kernel + UnionFS + SquashFS patches.
|
||||
patch_files="
|
||||
unionfs-2.5_for_2.6.27-rc6.diff.bz2
|
||||
unionfs-2.5_fix_for_2.6.27.diff
|
||||
squashfs3.4-2.6.27-rc4.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=fd710a841be6119cdd2c42f92ca405265fb156e279006bb89bb874e4198b3e5e
|
||||
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"
|
||||
|
||||
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
|
||||
|
||||
local incdirs="acpi asm-generic asm-x86 config linux math-emu media \
|
||||
net pcmcia scsi sound video"
|
||||
local _archs="alpha arm arm26 avr32 blackfin cris frv h8300 ia64 m32r \
|
||||
m68k* mips mn10300 parisc powerpc ppc s390 sh* sparc* \
|
||||
um v850 xtensa"
|
||||
#
|
||||
# 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
|
||||
install -D -m 644 Module.symvers \
|
||||
$destdir/usr/src/linux-$version/Module.symvers
|
||||
install -D -m 644 arch/x86/kernel/asm-offsets.s \
|
||||
$destdir/usr/src/linux-$version/arch/x86/kernel
|
||||
}
|
||||
Reference in New Issue
Block a user