diff options
author | Daniel Robbins <drobbins@gentoo.org> | 2001-09-06 07:19:44 +0000 |
---|---|---|
committer | Daniel Robbins <drobbins@gentoo.org> | 2001-09-06 07:19:44 +0000 |
commit | 710ecb4c0b1491cb7a0c1c857da210f121f85c5a (patch) | |
tree | 1c41789ccbd09cbd8888856d7358791856369837 | |
parent | Added instructions for ext3 (diff) | |
download | gentoo-2-710ecb4c0b1491cb7a0c1c857da210f121f85c5a.tar.gz gentoo-2-710ecb4c0b1491cb7a0c1c857da210f121f85c5a.tar.bz2 gentoo-2-710ecb4c0b1491cb7a0c1c857da210f121f85c5a.zip |
new rc6 baselayout bootstrap stuff, and an in-progress linux-sources-2.4.9.9
-rw-r--r-- | files/bootstrap-1.0_rc6.packages | 1 | ||||
-rw-r--r-- | files/bootstrap-20010806.packages | 4 | ||||
-rw-r--r-- | files/build-20010501.packages | 26 | ||||
-rw-r--r-- | files/build-20010513.packages | 26 | ||||
-rw-r--r-- | files/build-20010804.packages | 27 | ||||
-rwxr-xr-x | scripts/bootstrap.sh | 17 | ||||
-rw-r--r-- | sys-kernel/linux-sources/files/digest-linux-sources-2.4.9.9 | 6 | ||||
-rw-r--r-- | sys-kernel/linux-sources/linux-sources-2.4.9.9.ebuild | 454 |
8 files changed, 471 insertions, 90 deletions
diff --git a/files/bootstrap-1.0_rc6.packages b/files/bootstrap-1.0_rc6.packages index 0e2ec171a7a9..b30fe9cc2d77 100644 --- a/files/bootstrap-1.0_rc6.packages +++ b/files/bootstrap-1.0_rc6.packages @@ -1,3 +1,4 @@ +>=sys-apps/baselayout-1.6.2 >=sys-apps/portage-1.6.6 =sys-libs/glibc-2.2.4-r1 =sys-devel/binutils-2.11.90.0.7 diff --git a/files/bootstrap-20010806.packages b/files/bootstrap-20010806.packages deleted file mode 100644 index 7d88d2ab10c8..000000000000 --- a/files/bootstrap-20010806.packages +++ /dev/null @@ -1,4 +0,0 @@ -./sys-libs/glibc/glibc-2.2.3-r5.ebuild -./sys-devel/binutils/binutils-2.11.90.0.7.ebuild -./sys-devel/gcc/gcc-2.95.3-r1.ebuild -./sys-devel/gettext/gettext-0.10.38.ebuild diff --git a/files/build-20010501.packages b/files/build-20010501.packages deleted file mode 100644 index de2b483ab5db..000000000000 --- a/files/build-20010501.packages +++ /dev/null @@ -1,26 +0,0 @@ -./sys-apps/baselayout/baselayout-1.5-r3.ebuild -./sys-libs/glibc/glibc-2.2.2-r3.ebuild -./sys-apps/bash/bash-2.04-r3.ebuild -./sys-apps/bzip2/bzip2-1.0.1-r3.ebuild -./sys-apps/debianutils/debianutils-1.13.3-r3.ebuild -./sys-apps/diffutils/diffutils-2.7-r3.ebuild -./sys-apps/file/file-3.33-r2.ebuild -./sys-apps/fileutils/fileutils-4.1-r1.ebuild -./sys-apps/findutils/findutils-4.1-r5.ebuild -./sys-apps/gawk/gawk-3.0.6-r3.ebuild -./sys-apps/grep/grep-2.4.2-r3.ebuild -./sys-apps/gzip/gzip-1.2.4a-r3.ebuild -./sys-apps/portage/portage-1.5-r6.ebuild -./sys-apps/sed/sed-3.02.80-r2.ebuild -./sys-apps/sh-utils/sh-utils-2.0j-r3.ebuild -./sys-apps/tar/tar-1.13.18-r4.ebuild -./sys-apps/textutils/textutils-2.0.10-r2.ebuild -./sys-devel/binutils/binutils-2.10.91.0.2-r1.ebuild -./sys-devel/bison/bison-1.28-r3.ebuild -./sys-devel/flex/flex-2.5.4a-r4.ebuild -./sys-devel/gcc/gcc-2.95.3.ebuild -./sys-devel/make/make-3.79.1-r3.ebuild -./sys-devel/patch/patch-2.5.4-r3.ebuild -./sys-devel/spython/spython-2.0-r4.ebuild -./net-misc/wget/wget-1.5.3-r2.ebuild -./net-misc/rsync/rsync-2.4.6-r2.ebuild
\ No newline at end of file diff --git a/files/build-20010513.packages b/files/build-20010513.packages deleted file mode 100644 index bd1b41976089..000000000000 --- a/files/build-20010513.packages +++ /dev/null @@ -1,26 +0,0 @@ -./sys-apps/baselayout/baselayout-1.5-r3.ebuild -./sys-libs/glibc/glibc-2.2.2-r3.ebuild -./sys-apps/bash/bash-2.04-r3.ebuild -./sys-apps/bzip2/bzip2-1.0.1-r3.ebuild -./sys-apps/debianutils/debianutils-1.13.3-r3.ebuild -./sys-apps/diffutils/diffutils-2.7-r3.ebuild -./sys-apps/file/file-3.33-r2.ebuild -./sys-apps/fileutils/fileutils-4.1-r1.ebuild -./sys-apps/findutils/findutils-4.1-r5.ebuild -./sys-apps/gawk/gawk-3.0.6-r3.ebuild -./sys-apps/grep/grep-2.4.2-r3.ebuild -./sys-apps/gzip/gzip-1.2.4a-r3.ebuild -./sys-apps/portage/portage-1.5-r6.ebuild -./sys-apps/sed/sed-3.02.80-r2.ebuild -./sys-apps/sh-utils/sh-utils-2.0j-r3.ebuild -./sys-apps/tar/tar-1.13.18-r4.ebuild -./sys-apps/textutils/textutils-2.0.10-r2.ebuild -./sys-devel/binutils/binutils-2.11.90.0.7.ebuild -./sys-devel/bison/bison-1.28-r3.ebuild -./sys-devel/flex/flex-2.5.4a-r4.ebuild -./sys-devel/gcc/gcc-2.95.3.ebuild -./sys-devel/make/make-3.79.1-r3.ebuild -./sys-devel/patch/patch-2.5.4-r3.ebuild -./sys-devel/spython/spython-2.0-r4.ebuild -./net-misc/wget/wget-1.5.3-r2.ebuild -./net-misc/rsync/rsync-2.4.6-r2.ebuild diff --git a/files/build-20010804.packages b/files/build-20010804.packages deleted file mode 100644 index ecf438c37c7f..000000000000 --- a/files/build-20010804.packages +++ /dev/null @@ -1,27 +0,0 @@ -./sys-apps/baselayout/baselayout-1.5-r4.ebuild -./sys-libs/glibc/glibc-2.2.3-r4.ebuild -./sys-apps/bash/bash-2.04-r4.ebuild -./sys-apps/bzip2/bzip2-1.0.1-r4.ebuild -./sys-apps/debianutils/debianutils-1.13.3-r4.ebuild -./sys-apps/diffutils/diffutils-2.7-r4.ebuild -./sys-apps/file/file-3.33-r3.ebuild -./sys-apps/fileutils/fileutils-4.1-r2.ebuild -./sys-apps/findutils/findutils-4.1-r6.ebuild -./sys-apps/gawk/gawk-3.0.6-r4.ebuild -./sys-apps/grep/grep-2.4.2-r4.ebuild -./sys-apps/gzip/gzip-1.2.4a-r5.ebuild -./sys-apps/portage/portage-1.5.3.ebuild -./sys-apps/sed/sed-3.02.80-r3.ebuild -./sys-apps/sh-utils/sh-utils-2.0j-r4.ebuild -./sys-apps/tar/tar-1.13.19-r1.ebuild -./sys-apps/textutils/textutils-2.0.10-r3.ebuild -./sys-devel/binutils/binutils-2.11.90.0.7.ebuild -./sys-devel/bison/bison-1.28-r3.ebuild -./sys-devel/flex/flex-2.5.4a-r4.ebuild -./sys-devel/gcc/gcc-2.95.3-r1.ebuild -./sys-devel/make/make-3.79.1-r3.ebuild -./sys-devel/patch/patch-2.5.4-r3.ebuild -./sys-devel/spython/spython-2.0-r7.ebuild -./net-misc/wget/wget-1.7-r1.ebuild -./net-misc/rsync/rsync-2.4.6-r4.ebuild -./sys-kernel/linux-sources/linux-sources-2.4.6-r2.ebuild
\ No newline at end of file diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index b9b495b45347..2bc476d6c314 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -2,6 +2,8 @@ LIST=$1 +#We really need to upgrade baselayout now that it's possible: +myBASELAYOUT=`grep "sys-apps/baselayout" $1` myPORTAGE=`grep "sys-apps/portage" $1` myGETTEXT=`grep "sys-devel/gettext" $1` myBINUTILS=`grep "sys-devel/binutils" $1` @@ -9,11 +11,12 @@ myGCC=`grep "sys-devel/gcc" $1` myGLIBC=`grep "sys-libs/glibc" $1` myTEXINFO=`grep "sys-apps/texinfo" $1` -echo "Using PORTAGE $myPORTAGE" -echo "Using BINUTILS $myBINUTILS" -echo "Using GCC $myGCC" -echo "Using GETTEXT $myGETTEXT" -echo "Using GLIBC $myGLIBC" +echo "Using $myBASELAYOUT" +echo "Using $myPORTAGE" +echo "Using $myBINUTILS" +echo "Using $myGCC" +echo "Using $myGETTEXT" +echo "Using $myGLIBC" cleanup() { cp /etc/make.conf.build /etc/make.conf @@ -42,7 +45,7 @@ export CONFIG_PROTECT="" #above allows portage to overwrite stuff cd /usr/portage emerge $myPORTAGE #separate, so that the next command uses the *new* emerge -emerge $myBINUTILS $myGCC $myGETTEXT || cleanup 1 +emerge $myBASELAYOUT $myBINUTILS $myGCC $myGETTEXT || cleanup 1 if [ "$use_unset" = "yes" ] then unset USE @@ -53,4 +56,4 @@ fi #export USE="`spython -c 'import portage; print portage.settings["USE"];'` bootstrap" emerge $myGLIBC $myGETTEXT $myBINUTILS $myGCC $myTEXINFO || cleanup 1 #restore settings -cleanup 0
\ No newline at end of file +cleanup 0 diff --git a/sys-kernel/linux-sources/files/digest-linux-sources-2.4.9.9 b/sys-kernel/linux-sources/files/digest-linux-sources-2.4.9.9 new file mode 100644 index 000000000000..dd6038973321 --- /dev/null +++ b/sys-kernel/linux-sources/files/digest-linux-sources-2.4.9.9 @@ -0,0 +1,6 @@ +MD5 568a3673324804e0ac846969a3e311cb cloop_0.61-1.tar.gz +MD5 991c485866bd4c52504ec4721337b46c linux-2.4.9.tar.bz2 +MD5 b02cb1bb5be17dc7b023b632c3356338 lvm-1.0.1-rc1-2.4.8-ac8.patch.bz2 +MD5 4227d98ab42e1f08b4c0804b749b393e lvm_1.0.1-rc1.tar.gz +MD5 14b33da66be00c77d04f79bc5d2b005c lvm_perl_to_bash.patch.bz2 +MD5 87dcb850c07c00f882095cdb42235e9d patch-2.4.9-ac9.bz2 diff --git a/sys-kernel/linux-sources/linux-sources-2.4.9.9.ebuild b/sys-kernel/linux-sources/linux-sources-2.4.9.9.ebuild new file mode 100644 index 000000000000..d6af9bc5450d --- /dev/null +++ b/sys-kernel/linux-sources/linux-sources-2.4.9.9.ebuild @@ -0,0 +1,454 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Daniel Robbins <drobbins@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/linux-sources/linux-sources-2.4.9.9.ebuild,v 1.1 2001/09/06 07:19:44 drobbins Exp $ + +#OKV=original kernel version, KV=patched kernel version + +OKV=2.4.9 +KV=2.4.9-ac9 +S=${WORKDIR}/linux-${KV} +S2=${WORKDIR}/linux-${KV}-extras +if [ $PN = "linux-extras" ] +then + KS=${ROOT}usr/src/linux-${KV} + KS2=${ROOT}usr/src/linux-${KV}-extras +else + KS=${S} + KS2=${S2} +fi + +# Kernel Features Enabled USE Variable Status +# +# Reiserfs Y - Production-ready +# JFS N jfs Testing-only (commented out for now) +# LVM Y lvm almost production-ready (still has race conditions during pvmove) +# ext3 Y ext3 Production-ready +# MOSIX Y mosix Testing only +# XFS N xfs Will add soon +# PCMCIA-CS N pcmcia Need to move this to its own ebuild +# lm-sensors N lm_sensors Need to move this to its own ebuild + +LVMV=1.0.1-rc1 +#EXT3V=2.4-0.9.2-246 +#MOSV=1.1.2 +CLOOPV=0.61 +CLOOPAV=0.61-1 +# AV=0.5.11 +#JFSV=1.0.0 +#KNV="6.g" +#PIV="1.d" +#PCV="3.1.27" + +[ "${PN}" = "linux" ] && DESCRIPTION="Linux kernel version ${KV}, including modules, binary tools, libraries and includes" +[ "${PN}" = "linux-sources" ] && DESCRIPTION="Linux kernel version ${KV} - full sources" +[ "${PN}" = "linux-extras" ] && DESCRIPTION="Linux kernel support tools and libraries" + +# We use build in /usr/src/linux in case of linux-extras +# so we need no sources +if [ ! "${PN}" = "linux-extras" ] ; then +SRC_URI="http://www.kernel.org/pub/linux/kernel/v2.4/linux-${OKV}.tar.bz2 + http://www.kernel.org/pub/linux/kernel/people/alan/linux-2.4/${OKV}/patch-${KV}.bz2 + ftp://ftp.sistina.com/pub/LVM/1.0/lvm_${LVMV}.tar.gz + http://www.knopper.net/download/knoppix/cloop_${CLOOPAV}.tar.gz + http://www.ibiblio.org/gentoo/distfiles/lvm-1.0.1-rc1-2.4.8-ac8.patch.bz2 + http://www.ibiblio.org/gentoo/distfiles/lvm_perl_to_bash.patch.bz2" +fi +# http://www.zip.com.au/~akpm/ext3-${EXT3V}.gz +# http://oss.software.ibm.com/developerworks/opensource/jfs/project/pub/jfs-1.0.0-patch.tar.gz +# ftp://ftp.cs.huji.ac.il/users/mosix/MOSIX-${MOSV}.tar.gz +# http://www.netroedge.com/~lm78/archive/lm_sensors-${SENV}.tar.gz +# http://www.netroedge.com/~lm78/archive/i2c-${SENV}.tar.gz +# http://prdownloads.sourceforge.net/pcmcia-cs/pcmcia-cs-${PCV}.tar.gz + +if [ "$PN" != "linux-extras" ] +then + PROVIDE="virtual/kernel" +fi + +HOMEPAGE="http://www.kernel.org/ + http://www.namesys.com + http://www.sistina.com/lvm/" + +DEPEND=">=sys-apps/modutils-2.4.2 sys-devel/perl" +#these deps are messed up; fix 'em and add ncurses (required my mosix compile, menuconfig) +if [ $PN = "linux" ] +then +# RDEPEND="mosix? ( ~sys-apps/mosix-user-${MOSV} ) >=sys-apps/e2fsprogs-1.22 >=sys-apps/util-linux-2.11f >=sys-apps/reiserfs-utils-3.6.25-r1" + RDEPEND=">=sys-apps/e2fsprogs-1.22 >=sys-apps/util-linux-2.11f >=sys-apps/reiserfs-utils-3.6.25-r1" +elif [ $PN = "linux-sources" ] +then + if [ "`use build`" ] + then + DEPEND="" + RDEPEND="" + else + #ncurses is required for "make menuconfig" + RDEPEND=">=sys-libs/ncurses-5.2" + fi +elif [ $PN = "linux-extras" ] +then + #linux-extras/headers requires a rev of the current kernel sources to be installed + RDEPEND="~sys-kernel/linux-sources-${PV}" +elif [ $PN = "linux-headers" ] +then + DEPEND="" + RDEPEND="" +fi + +# this is not pretty... +LINUX_HOSTCFLAGS="-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I${KS}/include" + +src_unpack() { + if [ "$PN" = "linux-extras" ] + then + return + fi + + mkdir ${S2} + + #unpack kernel and apply reiserfs-related patches + cd ${WORKDIR} + unpack linux-${OKV}.tar.bz2 + try mv linux linux-${KV} + cd ${S} + if [ "$KV" != "$OKV" ] + then + echo "Applying ${KV} patch..." + bzip2 -dc ${DISTDIR}/patch-${KV}.bz2 | patch -p1 || die + fi + dodir /usr/src/linux-${KV}-extras + +#### Mosix +# if [ "`use mosix`" ] +# then +# echo "Applying MOSIX patch..." +# cd ${S2} +# mkdir MOSIX-${MOSV} +# cd MOSIX-${MOSV} +# tar xzf MOSIX-${MOSV}.tar.gz patches.${OKV} kernel.new.${OKV}.tar +# cd ${S} +# try cat ${S2}/MOSIX-${MOSV}/patches.${KV} | patch -p0 +# tar -x --no-same-owner -vf ${S2}/MOSIX-${MOSV}/kernel.new.${KV}.tar +# fi +#### Mosix + if [ "`use lvm`" ] + then + #create and apply LVM patch. The tools get built later. + cd ${S2} + echo "Unpacking and applying LVM patch..." + unpack lvm_${LVMV}.tar.gz + #cd LVM/${LVMV} + #We need to convert those 1.0.1-rc1 perl scripts to bash; This'll be fixed in 1.0.1 final. Thanks AJ :) + #cat ${DISTDIR}/lvm_perl_to_bash.patch.bz2 | bzip2 -d | patch -p1 || die + + # I had to hack this in so that LVM will look in the current linux + # source directory instead of /usr/src/linux for stuff - pete + #CFLAGS="${CFLAGS} -I${KS}/include" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${KS}" || die + #cd PATCHES + #make KERNEL_VERSION=${KV} KERNEL_DIR=${S} || die + #cd ${S} + # the -l option allows this patch to apply cleanly (ignore whitespace changes) + # the -N option is an "auto no" to previously applied stuff. Needed for 2.4.8-ac8 + + #patch -N -l -p1 < ${S2}/LVM/${LVMV}/PATCHES/lvm-${LVMV}-${KV}.patch + cd ${S} + cat ${DISTDIR}/lvm-1.0.1-rc1-2.4.8-ac8.patch.bz2 | bzip2 -d | patch -N -l -p1 + #|| die + #we removed || die because any stuff that hits -N causes an error code of 1 + fi + +# if [ "`use lm_sensors`" ] +# then +# #unpack and apply the lm_sensors patch +# echo "Unpacking and applying lm_sensors patch..." +# cd ${S}/extras +# unpack lm_sensors-${SENV}.tar.gz +# unpack i2c-${SENV}.tar.gz +# cd i2c-${SENV} +# try rmdir src +# try ln -s ../.. src +# try mkpatch/mkpatch.pl . /usr/src/linux | patch -p1 -E -d /usr/src/linux +# cp Makefile Makefile.orig +# try sed -e \"s:^LINUX=.*:LINUX=src:\" \ +# -e \"s/^COMPILE_KERNEL.*/COMPILE_KERNEL := 2/\" \ +# -e \"s:^I2C_HEADERS.*:I2C_HEADERS=.i2c-src/kernel:\" \ +# -e \"s#^DESTDIR.*#DESTDIR := ${D}#\" \ +# -e \"s#^PREFIX.*#PREFIX := /usr#\" \ +# -e \"s#^MANDIR.*#MANDIR := /usr/share/man#\" \ +# Makefile.orig > Makefile +# cd ${S}/extras/lm_sensors-${SENV} +# try rmdir src +# try ln -s ../.. src +# try ln -s ../i2c-${SENV} i2c-src +# try mkpatch/mkpatch.pl . /usr/src/linux | patch -p1 -E -d /usr/src/linux +# try sed -e \"s:^LINUX=.*:LINUX=src:\" \ +# -e \"s/^COMPILE_KERNEL.*/COMPILE_KERNEL := 2/\" \ +# -e \"s:^I2C_HEADERS.*:I2C_HEADERS=.i2c-src/kernel:\" \ +# -e \"s#^DESTDIR.*#DESTDIR := ${D}#\" \ +# -e \"s#^PREFIX.*#PREFIX := /usr#\" \ +# -e \"s#^MANDIR.*#MANDIR := /usr/share/man#\" \ +# Makefile.orig > Makefile +# fi +# if [ "`use pcmcia-cs`" ] +# then +# echo "Unpacking pcmcia-cs tools..." +# cd ${S2} +# unpack pcmcia-cs-${PCV}.tar.gz + # patch -p0 < ${FILESDIR}/${PVR}/pcmcia-cs-${PCV}-gentoo.diff +# fi + + #JFS patch works; commented out because it's not ready for production use + #if [ "`use jfs`" ] + #then + # echo "Applying JFS patch..." + # cd ${WORKDIR} + # unpack jfs-${JFSV}-patch.tar.gz + # cd ${S} + # patch -p1 < ${WORKDIR}/jfs-common-v1.0.0-patch + # patch -p1 < ${WORKDIR}/jfs-2.4.5-v1.0.0-patch + #fi + +# if [ "`use ext3`" ] +# then +# echo "Applying ext3 patch..." +### Mosix +# if [ "`use mosix`" ] +# then +# echo +# echo "There will be one reject; we will fix it. (no worries)" +# echo +# fi +### Mosix +# cd ${S} +# gzip -dc ${DISTDIR}/ext3-${EXT3V}.gz | patch -l -p1 +### Mosix +# if [ "`use mosix`" ] +# then +# echo +# echo "Fixing reject in include/linux/sched.h..." +# echo +# cp ${FILESDIR}/${PVR}/sched.h include/linux +# fi +### Mosix +# fi + + cd ${S2} + unpack cloop_${CLOOPAV}.tar.gz + + #get sources ready for compilation or for sitting at /usr/src/linux + echo "Preparing for compilation..." + cd ${S} + #sometimes we have icky kernel symbols; this seems to get rid of them + try make mrproper + + #linux-sources needs to be fully configured, too. Not just linux + #this is the configuration for the default kernel + try cp ${FILESDIR}/${PVR}/config.bootcd .config + yes "" | make oldconfig + echo "Ignore any errors from the yes command above." + + #fix silly permissions in tarball + cd ${WORKDIR} + chown -R 0.0 * + chmod -R a+r-w+X,u+w * +} + +src_compile() { + if [ "${PN}" = "linux-sources" ] || [ "${PN}" = "linux-headers" ] + then + cd ${KS} + make HOSTCFLAGS="${LINUX_HOSTCFLAGS}" dep || die + else + if [ $PN = "linux" ] + then + cd ${KS} + make symlinks || die + fi + if [ "`use lvm`" ] + then + #LVM tools are included in the linux and linux-extras pakcages + cd ${KS2}/LVM/${LVMV} + + # This is needed for linux-extras + if [ -f "Makefile" ] + then + make clean || die + fi + # I had to hack this in so that LVM will look in the current linux + # source directory instead of /usr/src/linux for stuff - pete + CFLAGS="${CFLAGS} -I${KS}/include" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${KS}" || die + make || die + fi + +# if [ "`use lm_sensors`" ] +# then +# cd ${KS}/extras/lm_sensors-${SENV} +# try make +# fi + +# Works, just commented out because JFS isn't ready to be used by non-developers +# if [ "`use jfs`" ] +# then +# cd ${S}/fs/jfs/utils +# try make +# cd output +# into / +# dosbin * +# doman `find -iname *.8` +# fi + + if [ "$PN" == "linux" ] + then + cd ${KS} + make HOSTCFLAGS="${LINUX_HOSTCFLAGS}" dep || die + make HOSTCFLAGS="${LINUX_HOSTCFLAGS}" LEX="flex -l" bzImage || die + make HOSTCFLAGS="${LINUX_HOSTCFLAGS}" LEX="flex -l" modules || die + fi + +# if [ "`use pcmcia-cs`" ] +# then +# cd ${KS2}/pcmcia-cs-${PCV} +# # This is needed for linux-extras +# if [ -f "Makefile" ] +# then +# try make clean +# fi +# try ./Configure -n --kernel=${KS} --moddir=/lib/modules/${KV} \ +# --notrust --cardbus --nopnp --noapm --srctree --sysv --rcdir=/etc/rc.d/ +# try make all +# fi + + cd ${KS2}/cloop-${CLOOPV} + make KERNEL_DIR=${KS} + fi +} + +src_install() { + if [ "${PN}" = "linux" ] || [ "${PN}" = "linux-extras" ] + then + dodir /usr/lib + + if [ "`use lvm`" ] + then + cd ${KS2}/LVM/${LVMV}/tools + + CFLAGS="${CFLAGS} -I${KS}/include" try make install -e prefix=${D} mandir=${D}/usr/share/man \ + sbindir=${D}/sbin libdir=${D}/lib + #no need for a static library in /lib + mv ${D}/lib/*.a ${D}/usr/lib + fi + +# if [ "`use lm_sensors`" ] +# then +# echo "Install sensor tools..." +# #install sensors tools +# cd ${KS}/extras/lm_sensors-${SENV} +# make install +# fi + + if [ "${PN}" = "linux" ] + then + dodir /usr/src/linux-${KV} + cd ${D}/usr/src + #grab includes and documentation only + echo ">>> Copying includes and documentation..." + cp -ax ${S}/include ${D}/usr/src/linux-${KV} + cp -ax ${S}/Documentation ${D}/usr/src/linux-${KV} + + #grab compiled kernel + dodir /boot/boot + insinto /boot/boot + cd ${S} + doins arch/i386/boot/bzImage + + #grab modules + # Do we have a bug in modutils ? + # Meanwhile we use this quick fix (achim) + + install -d ${D}/lib/modules/`uname -r` + try make INSTALL_MOD_PATH=${D} modules_install + + cd ${S} + depmod -b ${D} -F ${S}/System.map ${KV} + #rm -rf ${D}/lib/modules/`uname -r` + #fix symlink + cd ${D}/lib/modules/${KV} + rm build + ln -sf /usr/src/linux-${KV} build + fi + +# if [ "`use pcmcia-cs`" ] +# then +# #install PCMCIA modules and utilities +# cd ${KS2}/pcmcia-cs-${PCV} +# try make PREFIX=${D} MANDIR=${D}/usr/share/man install +# rm -rf ${D}/etc/rc.d +# exeinto /etc/rc.d/init.d +# doexe ${FILESDIR}/${KV}/pcmcia +# fi + + cd ${KS2}/cloop-${CLOOPV} + insinto /lib/modules/${KV}/kernel/drivers/block + doins cloop.o + into /usr + dobin create_compressed_fs extract_compressed_fs + + if [ "`use bootcd`" ] + then + rm -rf ${D}/usr/include ${D}/usr/lib/lib*.a ${D}/usr/src + fi + + elif [ "$PN" = "linux-sources" ] + then + dodir /usr/src + cd ${S} + echo ">>> Copying sources..." + cp -ax ${WORKDIR}/* ${D}/usr/src + elif [ "$PN" = "linux-headers" ] + then + dodir /usr/include/linux + cp -ax ${KS}/include/linux/* ${D}/usr/include/linux + dodir /usr/include/asm + cp -ax ${KS}/include/asm-i386/* ${D}/usr/include/asm + fi + if [ -d ${D}/usr/src/linux-${KV} ] + then + #don't overwrite existing .config if present + cd ${D}/usr/src/linux-${KV} + if [ -e .config ] + then + cp -a .config .config.eg + fi + fi +} + +pkg_preinst() { + if [ "$PN" = "linux-headers" ] + then + if [ -L ${ROOT}usr/include/linux ] + then + rm ${ROOT}usr/include/linux + fi + if [ -L ${ROOT}usr/include/asm ] + then + rm ${ROOT}usr/include/asm + fi + fi +} + +pkg_postinst() { + if [ "$PN" = "linux-extras" ] || [ "$PN" = "linux-headers" ] + then + return + fi + rm -f ${ROOT}/usr/src/linux + ln -sf linux-${KV} ${ROOT}/usr/src/linux + + #copy over our .config if one isn't already present + cd ${ROOT}/usr/src/linux-${KV} + if [ "${PN}" = "linux-sources" ] && [ -e .config.eg ] && [ ! -e .config ] + then + cp -a .config.eg .config + fi +} |