kernel-headers: install into /usr/src/$pkgname-$version.

--HG--
extra : convert_revision : 86a67cbd88901213c4596a4147f37d764ba15a2d
This commit is contained in:
Juan RP 2008-12-17 10:21:28 +01:00
parent d9c6363159
commit 405fb8c93e
1 changed files with 16 additions and 16 deletions

View File

@ -20,7 +20,7 @@ build_depends="perl-5.10.0 module-init-tools-3.5"
do_install()
{
local destdir=$XBPS_DESTDIR/$pkgname-$version
local destdir=$XBPS_DESTDIR/$pkgname-$version/usr/src/$pkgname-$version
local arch=
local incdirs="acpi asm-generic asm-x86 config linux math-emu media \
net pcmcia scsi sound video"
@ -43,31 +43,31 @@ do_install()
cp -f $XBPS_TEMPLATESDIR/kernel-$arch-dotconfig $wrksrc/.config
make oldconfig
install -D -m 644 Makefile $destdir/usr/src/linux-$version/Makefile
install -D -m 644 kernel/Makefile \
$destdir/usr/src/linux-$version/kernel/Makefile
install -D -m 644 .config $destdir/usr/src/linux-$version/.config
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/usr/src/linux-$version/include
cp -a include/$i $destdir/include
done
cp -a scripts $destdir/usr/src/linux-$version
cp -a scripts $destdir
mkdir -p $destdir/usr/src/linux-$version/arch/x86/kernel
mkdir -p $destdir/arch/x86/kernel
if [ "$xbps_machine" != "x86_64" ]; then
install -D -m 644 arch/x86/Makefile_32.cpu \
$destdir/usr/src/linux-$version/arch/x86/Makefile_32.cpu
$destdir/arch/x86/Makefile_32.cpu
fi
for i in $(find . -name "Kconfig*"); do
mkdir -p $destdir/usr/src/linux-$version/$(echo $i | sed 's|/Kconfig.*||')
cp $i $destdir/usr/src/linux-$version/$i
mkdir -p $destdir/$(echo $i | sed 's|/Kconfig.*||')
cp $i $destdir/$i
done
for i in $(find . -name "Makefile*"); do
mkdir -p $destdir/usr/src/linux-$version/$(echo $i | sed 's|/Makefile.*||')
cp $i $destdir/usr/src/linux-$version/$i
mkdir -p $destdir/$(echo $i | sed 's|/Makefile.*||')
cp $i $destdir/$i
done
cd $destdir/usr/src/linux-$version/include && ln -s asm-x86 asm
cd $destdir/usr/src && ln -s linux-$version linux
cd $destdir/include && ln -s asm-x86 asm
cd $XBPS_DESTDIR/$pkgname-$version/usr/src && \
ln -s $pkgname-$version linux
for arch in ${archs}; do
rm -rf $destdir/usr/src/linux-$version/arch/${arch}
rm -rf $destdir/arch/${arch}
done
}