84222395b8
These new vars are DESTDIR (by default XBPS_DESTDIR/pkgname-version), SRCPKGDESTDIR (XBPS_DESTDIR/sourcepkg-version) and FILESDIR (XBPS_TEMPLATESDIR/pkgname/files). This simplifies packages that used them. --HG-- extra : convert_revision : 287ea7128cb5df19870ca7aff0a3b8f99a11d63a
70 lines
2.0 KiB
Plaintext
70 lines
2.0 KiB
Plaintext
# Template file for 'kernel-headers'
|
|
pkgname=kernel-headers
|
|
version=2.6.28.7
|
|
wrksrc="linux-$version"
|
|
distfiles="http://www.kernel.org/pub/linux/kernel/v2.6/linux-$version.tar.bz2"
|
|
build_style=custom-install
|
|
short_desc="The Linux kernel headers"
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
checksum=9af6c40c75cbfe5af9ef800d84dd1d2010ce0bd7402623ca9afae535eb0393ad
|
|
long_desc="
|
|
This package provides the linux kernel headers."
|
|
|
|
Add_dependency build perl
|
|
Add_dependency build module-init-tools
|
|
Add_dependency run kernel-libc-headers ${version}
|
|
|
|
do_install()
|
|
{
|
|
local destdir=${DESTDIR}/usr/src/$pkgname-$version
|
|
local arch=
|
|
local incdirs="acpi asm-generic 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 necessary stuff to build packages that require this.
|
|
# This is based in the kernel26 pkgbuild from Arch Linux.
|
|
#
|
|
|
|
cd $wrksrc || exit 1
|
|
|
|
if [ "$xbps_machine" != "x86_64" ]; then
|
|
arch=i386
|
|
else
|
|
arch=x86_64
|
|
fi
|
|
|
|
cp -f $XBPS_TEMPLATESDIR/kernel/$arch-dotconfig $wrksrc/.config
|
|
make oldconfig
|
|
|
|
install -D -m 644 Makefile $destdir/Makefile
|
|
install -D -m 644 kernel/Makefile $destdir/kernel/Makefile
|
|
install -D -m 644 .config $destdir/.config
|
|
for i in ${incdirs}; do
|
|
cp -a include/$i $destdir/include
|
|
done
|
|
cp -a arch/x86/include/asm $destdir/include
|
|
cp -a scripts $destdir
|
|
|
|
mkdir -p $destdir/arch/x86/kernel
|
|
if [ "$xbps_machine" != "x86_64" ]; then
|
|
install -D -m 644 arch/x86/Makefile_32.cpu \
|
|
$destdir/arch/x86/Makefile_32.cpu
|
|
fi
|
|
for i in $(find . -name "Kconfig*"); do
|
|
mkdir -p $destdir/$(echo $i | sed 's|/Kconfig.*||')
|
|
cp $i $destdir/$i
|
|
done
|
|
for i in $(find . -name "Makefile*"); do
|
|
mkdir -p $destdir/$(echo $i | sed 's|/Makefile.*||')
|
|
cp $i $destdir/$i
|
|
done
|
|
cd $XBPS_DESTDIR/$pkgname-$version/usr/src && \
|
|
ln -s $pkgname-$version linux
|
|
for arch in ${archs}; do
|
|
rm -rf $destdir/arch/${arch}
|
|
done
|
|
}
|