summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchim Gottinger <achim@gentoo.org>2001-07-01 15:49:30 +0000
committerAchim Gottinger <achim@gentoo.org>2001-07-01 15:49:30 +0000
commit9692782711f52c958444313fa9b449aeb1346c3c (patch)
treeef507e570f0ba2f7b32349c2293c8bf009fbcfcf
parent*** empty log message *** (diff)
downloadgentoo-2-9692782711f52c958444313fa9b449aeb1346c3c.tar.gz
gentoo-2-9692782711f52c958444313fa9b449aeb1346c3c.tar.bz2
gentoo-2-9692782711f52c958444313fa9b449aeb1346c3c.zip
*** empty log message ***
-rw-r--r--sys-kernel/linux-extras/linux-extras-2.4.4.9.ebuild571
-rw-r--r--sys-kernel/linux-sources/linux-sources-2.4.4.9.ebuild6
-rw-r--r--sys-kernel/linux/linux-2.4.4.9.ebuild571
3 files changed, 564 insertions, 584 deletions
diff --git a/sys-kernel/linux-extras/linux-extras-2.4.4.9.ebuild b/sys-kernel/linux-extras/linux-extras-2.4.4.9.ebuild
index 895e44938595..19513ad5fe6d 100644
--- a/sys-kernel/linux-extras/linux-extras-2.4.4.9.ebuild
+++ b/sys-kernel/linux-extras/linux-extras-2.4.4.9.ebuild
@@ -38,39 +38,28 @@ PCV="3.1.26"
# We use build in /usr/src/linux in case of linux-extras
# so we need no sources
-if [ ! "$PN" = "linux-extras" ] ; then
+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/2.4/patch-${KV}.bz2
- http://dice.mfa.kfki.hu/download/reiserfs-3.6.25-2.4.4/linux-2.4.4-knfsd-6.g.patch.gz
- http://dice.mfa.kfki.hu/download/reiserfs-3.6.25-2.4.4/linux-2.4.4-procinfo-1.d.patch.gz
- http://dice.mfa.kfki.hu/download/reiserfs-3.6.25-2.4.4/reiserfs-quota-2.4.4.dif.bz2"
-
-# http://oss.software.ibm.com/developerworks/opensource/jfs/project/pub/jfs-${JFSV}-patch.tar.gz
-# http://download.sourceforge.net/xmlprocfs/linux-2.4-xmlprocfs-${XMLV}.patch.gz
-# ftp://ftp.reiserfs.com/pub/reiserfs-for-2.4/linux-${OKV}-reiserfs-${RV}.patch.gz
-
-if [ "`use lm_sensors`" ] ; then
- SRC_URI="${SRC_URI} http://www.netroedge.com/~lm78/archive/lm_sensors-${SENV}.tar.gz"
-fi
-if [ "`use lvm`" ] ; then
- SRC_URI="${SRC_URI} ftp://ftp.sistina.com/pub/LVM/0.9.1_beta/lvm_${LVMVARC}.tar.gz"
+ http://www.kernel.org/pub/linux/kernel/people/alan/i2.4/patch-${KV}.bz2
+ http://dice.mfa.kfki.hu/download/reiserfs-3.6.25-2.4.4/linux-2.4.4-knfsd-6.g.patch.gz
+ http://dice.mfa.kfki.hu/download/reiserfs-3.6.25-2.4.4/linux-2.4.4-procinfo-1.d.patch.gz
+ http://dice.mfa.kfki.hu/download/reiserfs-3.6.25-2.4.4/reiserfs-quota-2.4.4.dif.bz2
+ http://www.netroedge.com/~lm78/archive/lm_sensors-${SENV}.tar.gz
+ ftp://ftp.sistina.com/pub/LVM/0.9.1_beta/lvm_${LVMVARC}.tar.gz
+ ftp://ftp.alsa-project.org/pub/driver/alsa-driver-${AV}.tar.bz2
+ http://prdownloads.sourceforge.net/pcmcia-cs/pcmcia-cs-${PCV}.tar.gz"
fi
-if [ "`use alsa`" ] ; then
- SRC_URI="${SRC_URI} ftp://ftp.alsa-project.org/pub/driver/alsa-driver-${AV}.tar.bz2"
- if [ "$PN" = "linux" ] ; then
- PROVIDE="virtual/kernel virtual/alsa"
- else
+
+if [ "$PN" != "linux-extras" ]
+then
PROVIDE="virtual/kernel"
- fi
-fi
-if [ "`use pcmcia-cs`" ] ; then
- SRC_URI="${SRC_URI} http://prdownloads.sourceforge.net/pcmcia-cs/pcmcia-cs-${PCV}.tar.gz"
fi
-
-else
- if [ "`use alsa`" ] ; then
- PROVIDE="virtual/alsa"
- fi
+if [ "$PN" != "linux-sources" ]
+then
+ if [ "`use alsa`" ]
+ then
+ PROVIDE="$PROVIDE virtual/alsa"
+ fi
fi
HOMEPAGE="http://www.kernel.org/
@@ -86,7 +75,7 @@ if [ ! $PN = "linux-extras" ] ; then
RDEPEND=">=sys-apps/reiserfs-utils-3.6.25-r1"
DEPEND=">=sys-apps/modutils-2.4.2 sys-devel/perl"
else
- DEPEND=">=sys-kernel/linux-sources-${PV}_${PR}"
+ DEPEND=">=sys-kernel/${PF/extras/sources}"
fi
if [ "`use build`" ] && [ $PN = "linux-sources" ] ; then
DEPEND=""
@@ -100,186 +89,195 @@ src_unpack() {
# We only need to unpack for linux and linux-sources
- if [ ! "$PN" = "linux-extras" ] ; then
-
- #unpack kernel and apply reiserfs-related patches
- cd ${WORKDIR}
- unpack linux-${OKV}.tar.bz2
- try mv linux linux-${KV}
- cd ${S}
- echo "Applying ${KV} patch..."
- try bzip2 -dc ${DISTDIR}/patch-${KV}.bz2 | patch -p1
-# echo "Applying reiserfs-update patch..."
-# try gzip -dc ${DISTDIR}/linux-2.4.2-reiserfs-${RV}.patch.gz | patch -N -p1
-# echo "You can ignore the rejects the changes already are in rc11"
-
-# echo
-# echo "Applying xmlprocfs patch..."
-# try gzip -dc ${DISTDIR}/linux-2.4-xmlprocfs-${XMLV}.patch.gz | patch -p1
- echo "Applying ac-nfsfh patch..."
- try patch -p0 < ${FILESDIR}/${KV}/nfsfh-ac-fix.diff
- echo "Applying reiserfs-knfsd patch..."
- try gzip -dc ${DISTDIR}/linux-${OKV}-knfsd-${KNV}.patch.gz | patch -p1
- echo "Applying ac-nfsfh-knfsd patch..."
- try patch -p0 < ${FILESDIR}/${KV}/nfsfh-ac-knfsd.diff
- echo "Applying reiserfs-procinfo patch..."
- try gzip -dc ${DISTDIR}/linux-${OKV}-procinfo-${PIV}.patch.gz | patch -p1
-# echo "Applying reiserfs-quota patch..."
-# try bzip2 -dc ${DISTDIR}/reiserfs-quota-${OKV}.dif.bz2 | patch -p1
+ if [ ! "$PN" = "linux-extras" ]
+ then
+
+ #unpack kernel and apply reiserfs-related patches
+ cd ${WORKDIR}
+ unpack linux-${OKV}.tar.bz2
+ try mv linux linux-${KV}
+ cd ${S}
+ echo "Applying ${KV} patch..."
+ try bzip2 -dc ${DISTDIR}/patch-${KV}.bz2 | patch -p1
+ # echo "Applying reiserfs-update patch..."
+ # try gzip -dc ${DISTDIR}/linux-2.4.2-reiserfs-${RV}.patch.gz | patch -N -p1
+ # echo "You can ignore the rejects the changes already are in rc11"
+
+ # echo
+ # echo "Applying xmlprocfs patch..."
+ # try gzip -dc ${DISTDIR}/linux-2.4-xmlprocfs-${XMLV}.patch.gz | patch -p1
+ echo "Applying ac-nfsfh patch..."
+ try patch -p0 < ${FILESDIR}/${KV}/nfsfh-ac-fix.diff
+ echo "Applying reiserfs-knfsd patch..."
+ try gzip -dc ${DISTDIR}/linux-${OKV}-knfsd-${KNV}.patch.gz | patch -p1
+ echo "Applying ac-nfsfh-knfsd patch..."
+ try patch -p0 < ${FILESDIR}/${KV}/nfsfh-ac-knfsd.diff
+ echo "Applying reiserfs-procinfo patch..."
+ try gzip -dc ${DISTDIR}/linux-${OKV}-procinfo-${PIV}.patch.gz | patch -p1
+ # echo "Applying reiserfs-quota patch..."
+ # try bzip2 -dc ${DISTDIR}/reiserfs-quota-${OKV}.dif.bz2 | patch -p1
- if [ "`use lvm`" ] || [ "`use alsa`" ] || [ "`use lm_sensors`" ] || [ "`use pcmcia-cs`" ]
- then
- mkdir ${S}/extras
- fi
+ if [ "`use lvm`" ] || [ "`use alsa`" ] || [ "`use lm_sensors`" ] || [ "`use pcmcia-cs`" ]
+ then
+ mkdir ${S}/extras
+ fi
- if [ "`use lvm`" ]
- then
- #create and apply LVM patch. The tools get built later.
- cd ${S}/extras
- echo "Unpacking and applying LVM patch..."
- unpack lvm_${LVMVARC}.tar.gz
- try cd LVM/${LVMV}
+ if [ "`use lvm`" ]
+ then
+ #create and apply LVM patch. The tools get built later.
+ cd ${S}/extras
+ echo "Unpacking and applying LVM patch..."
+ unpack lvm_${LVMVARC}.tar.gz
+ try cd LVM/${LVMV}
- # 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
- try CFLAGS=\""${CFLAGS} -I${S}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${S}"
-
- cd PATCHES
- try make KERNEL_VERSION=${KV} KERNEL_DIR=${S}
- cd ${S}
- # the -l option allows this patch to apply cleanly (ignore whitespace changes)
- try patch -l -p1 < ${S}/extras/LVM/${LVMV}/PATCHES/lvm-${LVMV}-${KV}.patch
- cd ${S}/drivers/md
- try patch -p0 < ${FILESDIR}/${KV}/lvm.c.diff
- 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
+ try CFLAGS=\""${CFLAGS} -I${S}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${S}"
+ cd PATCHES
+ try make KERNEL_VERSION=${KV} KERNEL_DIR=${S}
+ cd ${S}
+ # the -l option allows this patch to apply cleanly (ignore whitespace changes)
+ try patch -l -p1 < ${S}/extras/LVM/${LVMV}/PATCHES/lvm-${LVMV}-${KV}.patch
+ cd ${S}/drivers/md
+ try patch -p0 < ${FILESDIR}/${KV}/lvm.c.diff
+ fi
- if [ "`use alsa`" ]
- then
- #unpack alsa drivers
- echo "Unpacking ALSA drivers..."
- cd ${S}/extras
- unpack alsa-driver-${AV}.tar.bz2
- fi
+ if [ "`use alsa`" ]
+ then
+ #unpack alsa drivers
+ echo "Unpacking ALSA drivers..."
+ cd ${S}/extras
+ unpack alsa-driver-${AV}.tar.bz2
+ 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
- try cd lm_sensors-${SENV}
- try mkpatch/mkpatch.pl . ${S} > ${S}/lm_sensors-patch
- try rmdir src
- try ln -s ../.. src
- try cp -a Makefile Makefile.orig
-
- cd ${S}
- try patch -p1 < lm_sensors-patch
- fi
- if [ "`use pcmcia-cs`" ]
- then
- echo "Unpacking pcmcia-cs tools..."
- cd ${S}/extras
- unpack pcmcia-cs-${PCV}.tar.gz
- patch -p0 < ${FILESDIR}/${KV}/pcmcia-cs-${PCV}-gentoo.diff
- fi
- #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
- if [ "${PN}" = "linux" ]
- then
- #this is the configuration for the default kernel
- try cp ${FILESDIR}/${KV}/config.bootcomp .config
- try yes \"\" \| make oldconfig
- echo "Ignore any errors from the yes command above."
- try make include/linux/version.h
- fi
- #fix silly permissions in tarball
- cd ${WORKDIR}
- chown -R 0.0 ${S}
- chmod -R a+r-w+X,u+w ${S}
-
- 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
+ try cd lm_sensors-${SENV}
+ try mkpatch/mkpatch.pl . ${S} > ${S}/lm_sensors-patch
+ try rmdir src
+ try ln -s ../.. src
+ try cp -a Makefile Makefile.orig
+
+ cd ${S}
+ try patch -p1 < lm_sensors-patch
+ fi
+ if [ "`use pcmcia-cs`" ]
+ then
+ echo "Unpacking pcmcia-cs tools..."
+ cd ${S}/extras
+ unpack pcmcia-cs-${PCV}.tar.gz
+ patch -p0 < ${FILESDIR}/${KV}/pcmcia-cs-${PCV}-gentoo.diff
+ fi
+ #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
+ if [ "${PN}" != "linux-extras" ]
+ then
+ #this is the configuration for the default kernel
+ try cp ${FILESDIR}/${KV}/config.bootcomp .config
+ try yes \"\" \| make oldconfig
+ echo "Ignore any errors from the yes command above."
+ fi
+
+ #fix silly permissions in tarball
+ cd ${WORKDIR}
+ chown -R 0.0 ${S}
+ chmod -R a+r-w+X,u+w ${S}
+
+ fi
}
src_compile() {
- if [ ! "${PN}" = "linux-sources" ] ; then
- if [ $PN = "linux-extras" ] ; then
- KS=/usr/src/linux
- else
- KS=${S}
- fi
- if [ "$PN" = "linux" ] ; then
- try make symlinks
- fi
-
- if [ "`use lvm`" ]
+ if [ "${PN}" != "linux-sources" ]
then
- #LVM tools are included in the linux and linux-extras pakcages
- cd ${KS}/extras/LVM/${LVMV}
-
- # This is needed for linux-extras
- if [ -f "Makefile" ] ; then
- try make clean
- 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
- try CFLAGS=\""${CFLAGS} -I${KS}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${KS}"
-
- try make
- fi
+ if [ $PN = "linux-extras" ]
+ then
+ KS=/usr/src/linux
+ else
+ KS=${S}
+ fi
+ if [ $PN = "linux" ]
+ then
+ try make symlinks
+ fi
+ if [ "`use lvm`" ]
+ then
+ #LVM tools are included in the linux and linux-extras pakcages
+ cd ${KS}/extras/LVM/${LVMV}
+
+ # This is needed for linux-extras
+ if [ -f "Makefile" ]
+ then
+ try make clean
+ 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
+ try CFLAGS=\""${CFLAGS} -I${KS}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${KS}"
+ try make
+ fi
- if [ "`use lm_sensors`" ]
- then
- cd ${KS}/extras/lm_sensors-${SENV}
- try sed -e \"s:^LINUX=.*:LINUX=src:\" \
- -e \"s/^COMPILE_KERNEL.*/COMPILE_KERNEL := 0/\" \
- -e \"s:^I2C_HEADERS.*:I2C_HEADERS=src/include:\" \
- -e \"s#^DESTDIR.*#DESTDIR := ${D}#\" \
- -e \"s#^PREFIX.*#PREFIX := /usr#\" \
- -e \"s#^MANDIR.*#MANDIR := /usr/share/man#\" \
- Makefile.orig > Makefile
-
- try make
- fi
+ if [ "`use lm_sensors`" ]
+ then
+ cd ${KS}/extras/lm_sensors-${SENV}
+ try sed -e \"s:^LINUX=.*:LINUX=src:\" \
+ -e \"s/^COMPILE_KERNEL.*/COMPILE_KERNEL := 0/\" \
+ -e \"s:^I2C_HEADERS.*:I2C_HEADERS=src/include:\" \
+ -e \"s#^DESTDIR.*#DESTDIR := ${D}#\" \
+ -e \"s#^PREFIX.*#PREFIX := /usr#\" \
+ -e \"s#^MANDIR.*#MANDIR := /usr/share/man#\" \
+ Makefile.orig > Makefile
+
+ try make
+ fi
- cd ${S}
+ cd ${S}
- if [ "$PN" == "linux" ]
- then
- try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" dep
- try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" bzImage
- #LEX=\""flex -l"\" bzImage
- try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" modules
- #LEX=\""flex -l"\" modules
- fi
+ if [ "$PN" == "linux" ]
+ then
+ try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" dep
+ try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" bzImage
+ #LEX=\""flex -l"\" bzImage
+ try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" modules
+ #LEX=\""flex -l"\" modules
+ fi
- # This must come after the kernel compilation in linux
+ # This must come after the kernel compilation in linux
if [ "`use alsa`" ]
then
- cd ${KS}/extras/alsa-driver-${AV}
- # This is needed for linux-extras
- if [ -f "Makefile.conf" ] ; then
- try make clean
- fi
- try ./configure --with-kernel=\"${KS}\" --with-isapnp=yes --with-sequencer=yes --with-oss=yes --with-cards=all
- try make
- fi
- if [ "`use pcmcia-cs`" ]
- then
- cd ${KS}/extras/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
+ cd ${KS}/extras/alsa-driver-${AV}
+ # This is needed for linux-extras
+ if [ -f "Makefile.conf" ]
+ then
+ try make clean
+ fi
+ try ./configure --with-kernel=\"${KS}\" --with-isapnp=yes --with-sequencer=yes --with-oss=yes --with-cards=all
+ try make
+ fi
+ if [ "`use pcmcia-cs`" ]
+ then
+ cd ${KS}/extras/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
+ else
+ #linux-sources
+ try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" dep
fi
- fi
}
src_install() {
@@ -292,115 +290,112 @@ src_install() {
# We install the alsa headers in all three packages
if [ "`use alsa`" ]
then
- # get alsa includes
- cd ${KS}/extras/alsa-driver-${AV}
- insinto /usr/src/linux-${KV}/include/linux
- cd include
- doins asound.h asoundid.h asequencer.h ainstr_*.h
+ #i get alsa includes
+ cd ${KS}/extras/alsa-driver-${AV}
+ insinto /usr/src/linux-${KV}/include/linux
+ cd include
+ doins asound.h asoundid.h asequencer.h ainstr_*.h
fi
if [ ! "${PN}" = "linux-sources" ]
then
- if [ $PN = "linux" ] ; then
- KS=${S}
- else
- KS=/usr/src/linux
- fi
- dodir /usr/lib
+ if [ $PN = "linux" ]
+ then
+ KS=${S}
+ else
+ KS=/usr/src/linux
+ fi
+ dodir /usr/lib
- if [ "`use lvm`" ]
- then
- cd ${KS}/extras/LVM/${LVMV}/tools
+ if [ "`use lvm`" ]
+ then
+ cd ${KS}/extras/LVM/${LVMV}/tools
- try CFLAGS=\""${CFLAGS} -I${KS}/include"\" 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
+ try CFLAGS=\""${CFLAGS} -I${KS}/include"\" 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
-
-
- 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}
+ 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
+ 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 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)
+ #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
+ install -d ${D}/lib/modules/`uname -r`
+ try make INSTALL_MOD_PATH=${D} modules_install
- 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
+ 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 alsa`" ]
then
- #install ALSA modules
+ #install ALSA modules
cd ${KS}/extras/alsa-driver-${AV}
- dodoc INSTALL FAQ
- dodir /lib/modules/${KV}/misc
- cp modules/*.o ${D}/lib/modules/${KV}/misc
+ dodoc INSTALL FAQ
+ dodir /lib/modules/${KV}/misc
+ cp modules/*.o ${D}/lib/modules/${KV}/misc
fi
- if [ "`use pcmcia-cs`" ]
- then
- #install PCMCIA modules and utilities
- cd ${KS}/extras/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
-
- else
- dodir /usr/src
-
- cd ${S}
- make mrproper
-
- if [ "`use build`" ] ; then
- dodir /usr/src/linux-${KV}
- #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}
-
+ if [ "`use pcmcia-cs`" ]
+ then
+ #install PCMCIA modules and utilities
+ cd ${KS}/extras/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
else
- echo ">>> Copying sources..."
- cp -ax ${S} ${D}/usr/src
- fi
-
- #don't overwrite existing .config if present
- cd ${D}/usr/src/linux-${KV}
- if [ -e .config ]
- then
- cp -a .config .config.eg
+ dodir /usr/src
+ cd ${S}
+ #make mrproper
+
+ if [ "`use build`" ] ; then
+ dodir /usr/src/linux-${KV}
+ #grab includes and documentation only
+ echo ">>> Copying includes..."
+ cp -ax ${S}/include ${D}/usr/src/linux-${KV}
+ else
+ echo ">>> Copying sources..."
+ cp -ax ${S} ${D}/usr/src
+ fi
+ fi
+ if [ "$PN" != "linux-extras" ]
+ 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
- fi
}
pkg_postinst() {
@@ -411,12 +406,6 @@ pkg_postinst() {
cd ${ROOT}/usr/src/linux-${KV}
if [ "${PN}" = "linux-sources" ] && [ -e .config.eg ] && [ ! -e .config ]
then
- cp -a .config.eg .config
+ cp -a .config.eg .config
fi
}
-
-#pkg_postrm() {
-#
-# rm -f ${ROOT}/usr/src/linux
-# rm -rf ${ROOT}/usr/src/linux-${KV}
-#}
diff --git a/sys-kernel/linux-sources/linux-sources-2.4.4.9.ebuild b/sys-kernel/linux-sources/linux-sources-2.4.4.9.ebuild
index 1a48cf819840..19513ad5fe6d 100644
--- a/sys-kernel/linux-sources/linux-sources-2.4.4.9.ebuild
+++ b/sys-kernel/linux-sources/linux-sources-2.4.4.9.ebuild
@@ -38,6 +38,7 @@ PCV="3.1.26"
# 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/i2.4/patch-${KV}.bz2
http://dice.mfa.kfki.hu/download/reiserfs-3.6.25-2.4.4/linux-2.4.4-knfsd-6.g.patch.gz
@@ -47,6 +48,7 @@ SRC_URI="http://www.kernel.org/pub/linux/kernel/v2.4/linux-${OKV}.tar.bz2
ftp://ftp.sistina.com/pub/LVM/0.9.1_beta/lvm_${LVMVARC}.tar.gz
ftp://ftp.alsa-project.org/pub/driver/alsa-driver-${AV}.tar.bz2
http://prdownloads.sourceforge.net/pcmcia-cs/pcmcia-cs-${PCV}.tar.gz"
+fi
if [ "$PN" != "linux-extras" ]
then
@@ -73,7 +75,7 @@ if [ ! $PN = "linux-extras" ] ; then
RDEPEND=">=sys-apps/reiserfs-utils-3.6.25-r1"
DEPEND=">=sys-apps/modutils-2.4.2 sys-devel/perl"
else
- DEPEND=">=sys-kernel/linux-sources-${PV}_${PR}"
+ DEPEND=">=sys-kernel/${PF/extras/sources}"
fi
if [ "`use build`" ] && [ $PN = "linux-sources" ] ; then
DEPEND=""
@@ -373,7 +375,7 @@ src_install() {
else
dodir /usr/src
cd ${S}
- make mrproper
+ #make mrproper
if [ "`use build`" ] ; then
dodir /usr/src/linux-${KV}
diff --git a/sys-kernel/linux/linux-2.4.4.9.ebuild b/sys-kernel/linux/linux-2.4.4.9.ebuild
index 895e44938595..19513ad5fe6d 100644
--- a/sys-kernel/linux/linux-2.4.4.9.ebuild
+++ b/sys-kernel/linux/linux-2.4.4.9.ebuild
@@ -38,39 +38,28 @@ PCV="3.1.26"
# We use build in /usr/src/linux in case of linux-extras
# so we need no sources
-if [ ! "$PN" = "linux-extras" ] ; then
+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/2.4/patch-${KV}.bz2
- http://dice.mfa.kfki.hu/download/reiserfs-3.6.25-2.4.4/linux-2.4.4-knfsd-6.g.patch.gz
- http://dice.mfa.kfki.hu/download/reiserfs-3.6.25-2.4.4/linux-2.4.4-procinfo-1.d.patch.gz
- http://dice.mfa.kfki.hu/download/reiserfs-3.6.25-2.4.4/reiserfs-quota-2.4.4.dif.bz2"
-
-# http://oss.software.ibm.com/developerworks/opensource/jfs/project/pub/jfs-${JFSV}-patch.tar.gz
-# http://download.sourceforge.net/xmlprocfs/linux-2.4-xmlprocfs-${XMLV}.patch.gz
-# ftp://ftp.reiserfs.com/pub/reiserfs-for-2.4/linux-${OKV}-reiserfs-${RV}.patch.gz
-
-if [ "`use lm_sensors`" ] ; then
- SRC_URI="${SRC_URI} http://www.netroedge.com/~lm78/archive/lm_sensors-${SENV}.tar.gz"
-fi
-if [ "`use lvm`" ] ; then
- SRC_URI="${SRC_URI} ftp://ftp.sistina.com/pub/LVM/0.9.1_beta/lvm_${LVMVARC}.tar.gz"
+ http://www.kernel.org/pub/linux/kernel/people/alan/i2.4/patch-${KV}.bz2
+ http://dice.mfa.kfki.hu/download/reiserfs-3.6.25-2.4.4/linux-2.4.4-knfsd-6.g.patch.gz
+ http://dice.mfa.kfki.hu/download/reiserfs-3.6.25-2.4.4/linux-2.4.4-procinfo-1.d.patch.gz
+ http://dice.mfa.kfki.hu/download/reiserfs-3.6.25-2.4.4/reiserfs-quota-2.4.4.dif.bz2
+ http://www.netroedge.com/~lm78/archive/lm_sensors-${SENV}.tar.gz
+ ftp://ftp.sistina.com/pub/LVM/0.9.1_beta/lvm_${LVMVARC}.tar.gz
+ ftp://ftp.alsa-project.org/pub/driver/alsa-driver-${AV}.tar.bz2
+ http://prdownloads.sourceforge.net/pcmcia-cs/pcmcia-cs-${PCV}.tar.gz"
fi
-if [ "`use alsa`" ] ; then
- SRC_URI="${SRC_URI} ftp://ftp.alsa-project.org/pub/driver/alsa-driver-${AV}.tar.bz2"
- if [ "$PN" = "linux" ] ; then
- PROVIDE="virtual/kernel virtual/alsa"
- else
+
+if [ "$PN" != "linux-extras" ]
+then
PROVIDE="virtual/kernel"
- fi
-fi
-if [ "`use pcmcia-cs`" ] ; then
- SRC_URI="${SRC_URI} http://prdownloads.sourceforge.net/pcmcia-cs/pcmcia-cs-${PCV}.tar.gz"
fi
-
-else
- if [ "`use alsa`" ] ; then
- PROVIDE="virtual/alsa"
- fi
+if [ "$PN" != "linux-sources" ]
+then
+ if [ "`use alsa`" ]
+ then
+ PROVIDE="$PROVIDE virtual/alsa"
+ fi
fi
HOMEPAGE="http://www.kernel.org/
@@ -86,7 +75,7 @@ if [ ! $PN = "linux-extras" ] ; then
RDEPEND=">=sys-apps/reiserfs-utils-3.6.25-r1"
DEPEND=">=sys-apps/modutils-2.4.2 sys-devel/perl"
else
- DEPEND=">=sys-kernel/linux-sources-${PV}_${PR}"
+ DEPEND=">=sys-kernel/${PF/extras/sources}"
fi
if [ "`use build`" ] && [ $PN = "linux-sources" ] ; then
DEPEND=""
@@ -100,186 +89,195 @@ src_unpack() {
# We only need to unpack for linux and linux-sources
- if [ ! "$PN" = "linux-extras" ] ; then
-
- #unpack kernel and apply reiserfs-related patches
- cd ${WORKDIR}
- unpack linux-${OKV}.tar.bz2
- try mv linux linux-${KV}
- cd ${S}
- echo "Applying ${KV} patch..."
- try bzip2 -dc ${DISTDIR}/patch-${KV}.bz2 | patch -p1
-# echo "Applying reiserfs-update patch..."
-# try gzip -dc ${DISTDIR}/linux-2.4.2-reiserfs-${RV}.patch.gz | patch -N -p1
-# echo "You can ignore the rejects the changes already are in rc11"
-
-# echo
-# echo "Applying xmlprocfs patch..."
-# try gzip -dc ${DISTDIR}/linux-2.4-xmlprocfs-${XMLV}.patch.gz | patch -p1
- echo "Applying ac-nfsfh patch..."
- try patch -p0 < ${FILESDIR}/${KV}/nfsfh-ac-fix.diff
- echo "Applying reiserfs-knfsd patch..."
- try gzip -dc ${DISTDIR}/linux-${OKV}-knfsd-${KNV}.patch.gz | patch -p1
- echo "Applying ac-nfsfh-knfsd patch..."
- try patch -p0 < ${FILESDIR}/${KV}/nfsfh-ac-knfsd.diff
- echo "Applying reiserfs-procinfo patch..."
- try gzip -dc ${DISTDIR}/linux-${OKV}-procinfo-${PIV}.patch.gz | patch -p1
-# echo "Applying reiserfs-quota patch..."
-# try bzip2 -dc ${DISTDIR}/reiserfs-quota-${OKV}.dif.bz2 | patch -p1
+ if [ ! "$PN" = "linux-extras" ]
+ then
+
+ #unpack kernel and apply reiserfs-related patches
+ cd ${WORKDIR}
+ unpack linux-${OKV}.tar.bz2
+ try mv linux linux-${KV}
+ cd ${S}
+ echo "Applying ${KV} patch..."
+ try bzip2 -dc ${DISTDIR}/patch-${KV}.bz2 | patch -p1
+ # echo "Applying reiserfs-update patch..."
+ # try gzip -dc ${DISTDIR}/linux-2.4.2-reiserfs-${RV}.patch.gz | patch -N -p1
+ # echo "You can ignore the rejects the changes already are in rc11"
+
+ # echo
+ # echo "Applying xmlprocfs patch..."
+ # try gzip -dc ${DISTDIR}/linux-2.4-xmlprocfs-${XMLV}.patch.gz | patch -p1
+ echo "Applying ac-nfsfh patch..."
+ try patch -p0 < ${FILESDIR}/${KV}/nfsfh-ac-fix.diff
+ echo "Applying reiserfs-knfsd patch..."
+ try gzip -dc ${DISTDIR}/linux-${OKV}-knfsd-${KNV}.patch.gz | patch -p1
+ echo "Applying ac-nfsfh-knfsd patch..."
+ try patch -p0 < ${FILESDIR}/${KV}/nfsfh-ac-knfsd.diff
+ echo "Applying reiserfs-procinfo patch..."
+ try gzip -dc ${DISTDIR}/linux-${OKV}-procinfo-${PIV}.patch.gz | patch -p1
+ # echo "Applying reiserfs-quota patch..."
+ # try bzip2 -dc ${DISTDIR}/reiserfs-quota-${OKV}.dif.bz2 | patch -p1
- if [ "`use lvm`" ] || [ "`use alsa`" ] || [ "`use lm_sensors`" ] || [ "`use pcmcia-cs`" ]
- then
- mkdir ${S}/extras
- fi
+ if [ "`use lvm`" ] || [ "`use alsa`" ] || [ "`use lm_sensors`" ] || [ "`use pcmcia-cs`" ]
+ then
+ mkdir ${S}/extras
+ fi
- if [ "`use lvm`" ]
- then
- #create and apply LVM patch. The tools get built later.
- cd ${S}/extras
- echo "Unpacking and applying LVM patch..."
- unpack lvm_${LVMVARC}.tar.gz
- try cd LVM/${LVMV}
+ if [ "`use lvm`" ]
+ then
+ #create and apply LVM patch. The tools get built later.
+ cd ${S}/extras
+ echo "Unpacking and applying LVM patch..."
+ unpack lvm_${LVMVARC}.tar.gz
+ try cd LVM/${LVMV}
- # 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
- try CFLAGS=\""${CFLAGS} -I${S}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${S}"
-
- cd PATCHES
- try make KERNEL_VERSION=${KV} KERNEL_DIR=${S}
- cd ${S}
- # the -l option allows this patch to apply cleanly (ignore whitespace changes)
- try patch -l -p1 < ${S}/extras/LVM/${LVMV}/PATCHES/lvm-${LVMV}-${KV}.patch
- cd ${S}/drivers/md
- try patch -p0 < ${FILESDIR}/${KV}/lvm.c.diff
- 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
+ try CFLAGS=\""${CFLAGS} -I${S}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${S}"
+ cd PATCHES
+ try make KERNEL_VERSION=${KV} KERNEL_DIR=${S}
+ cd ${S}
+ # the -l option allows this patch to apply cleanly (ignore whitespace changes)
+ try patch -l -p1 < ${S}/extras/LVM/${LVMV}/PATCHES/lvm-${LVMV}-${KV}.patch
+ cd ${S}/drivers/md
+ try patch -p0 < ${FILESDIR}/${KV}/lvm.c.diff
+ fi
- if [ "`use alsa`" ]
- then
- #unpack alsa drivers
- echo "Unpacking ALSA drivers..."
- cd ${S}/extras
- unpack alsa-driver-${AV}.tar.bz2
- fi
+ if [ "`use alsa`" ]
+ then
+ #unpack alsa drivers
+ echo "Unpacking ALSA drivers..."
+ cd ${S}/extras
+ unpack alsa-driver-${AV}.tar.bz2
+ 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
- try cd lm_sensors-${SENV}
- try mkpatch/mkpatch.pl . ${S} > ${S}/lm_sensors-patch
- try rmdir src
- try ln -s ../.. src
- try cp -a Makefile Makefile.orig
-
- cd ${S}
- try patch -p1 < lm_sensors-patch
- fi
- if [ "`use pcmcia-cs`" ]
- then
- echo "Unpacking pcmcia-cs tools..."
- cd ${S}/extras
- unpack pcmcia-cs-${PCV}.tar.gz
- patch -p0 < ${FILESDIR}/${KV}/pcmcia-cs-${PCV}-gentoo.diff
- fi
- #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
- if [ "${PN}" = "linux" ]
- then
- #this is the configuration for the default kernel
- try cp ${FILESDIR}/${KV}/config.bootcomp .config
- try yes \"\" \| make oldconfig
- echo "Ignore any errors from the yes command above."
- try make include/linux/version.h
- fi
- #fix silly permissions in tarball
- cd ${WORKDIR}
- chown -R 0.0 ${S}
- chmod -R a+r-w+X,u+w ${S}
-
- 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
+ try cd lm_sensors-${SENV}
+ try mkpatch/mkpatch.pl . ${S} > ${S}/lm_sensors-patch
+ try rmdir src
+ try ln -s ../.. src
+ try cp -a Makefile Makefile.orig
+
+ cd ${S}
+ try patch -p1 < lm_sensors-patch
+ fi
+ if [ "`use pcmcia-cs`" ]
+ then
+ echo "Unpacking pcmcia-cs tools..."
+ cd ${S}/extras
+ unpack pcmcia-cs-${PCV}.tar.gz
+ patch -p0 < ${FILESDIR}/${KV}/pcmcia-cs-${PCV}-gentoo.diff
+ fi
+ #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
+ if [ "${PN}" != "linux-extras" ]
+ then
+ #this is the configuration for the default kernel
+ try cp ${FILESDIR}/${KV}/config.bootcomp .config
+ try yes \"\" \| make oldconfig
+ echo "Ignore any errors from the yes command above."
+ fi
+
+ #fix silly permissions in tarball
+ cd ${WORKDIR}
+ chown -R 0.0 ${S}
+ chmod -R a+r-w+X,u+w ${S}
+
+ fi
}
src_compile() {
- if [ ! "${PN}" = "linux-sources" ] ; then
- if [ $PN = "linux-extras" ] ; then
- KS=/usr/src/linux
- else
- KS=${S}
- fi
- if [ "$PN" = "linux" ] ; then
- try make symlinks
- fi
-
- if [ "`use lvm`" ]
+ if [ "${PN}" != "linux-sources" ]
then
- #LVM tools are included in the linux and linux-extras pakcages
- cd ${KS}/extras/LVM/${LVMV}
-
- # This is needed for linux-extras
- if [ -f "Makefile" ] ; then
- try make clean
- 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
- try CFLAGS=\""${CFLAGS} -I${KS}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${KS}"
-
- try make
- fi
+ if [ $PN = "linux-extras" ]
+ then
+ KS=/usr/src/linux
+ else
+ KS=${S}
+ fi
+ if [ $PN = "linux" ]
+ then
+ try make symlinks
+ fi
+ if [ "`use lvm`" ]
+ then
+ #LVM tools are included in the linux and linux-extras pakcages
+ cd ${KS}/extras/LVM/${LVMV}
+
+ # This is needed for linux-extras
+ if [ -f "Makefile" ]
+ then
+ try make clean
+ 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
+ try CFLAGS=\""${CFLAGS} -I${KS}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${KS}"
+ try make
+ fi
- if [ "`use lm_sensors`" ]
- then
- cd ${KS}/extras/lm_sensors-${SENV}
- try sed -e \"s:^LINUX=.*:LINUX=src:\" \
- -e \"s/^COMPILE_KERNEL.*/COMPILE_KERNEL := 0/\" \
- -e \"s:^I2C_HEADERS.*:I2C_HEADERS=src/include:\" \
- -e \"s#^DESTDIR.*#DESTDIR := ${D}#\" \
- -e \"s#^PREFIX.*#PREFIX := /usr#\" \
- -e \"s#^MANDIR.*#MANDIR := /usr/share/man#\" \
- Makefile.orig > Makefile
-
- try make
- fi
+ if [ "`use lm_sensors`" ]
+ then
+ cd ${KS}/extras/lm_sensors-${SENV}
+ try sed -e \"s:^LINUX=.*:LINUX=src:\" \
+ -e \"s/^COMPILE_KERNEL.*/COMPILE_KERNEL := 0/\" \
+ -e \"s:^I2C_HEADERS.*:I2C_HEADERS=src/include:\" \
+ -e \"s#^DESTDIR.*#DESTDIR := ${D}#\" \
+ -e \"s#^PREFIX.*#PREFIX := /usr#\" \
+ -e \"s#^MANDIR.*#MANDIR := /usr/share/man#\" \
+ Makefile.orig > Makefile
+
+ try make
+ fi
- cd ${S}
+ cd ${S}
- if [ "$PN" == "linux" ]
- then
- try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" dep
- try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" bzImage
- #LEX=\""flex -l"\" bzImage
- try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" modules
- #LEX=\""flex -l"\" modules
- fi
+ if [ "$PN" == "linux" ]
+ then
+ try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" dep
+ try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" bzImage
+ #LEX=\""flex -l"\" bzImage
+ try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" modules
+ #LEX=\""flex -l"\" modules
+ fi
- # This must come after the kernel compilation in linux
+ # This must come after the kernel compilation in linux
if [ "`use alsa`" ]
then
- cd ${KS}/extras/alsa-driver-${AV}
- # This is needed for linux-extras
- if [ -f "Makefile.conf" ] ; then
- try make clean
- fi
- try ./configure --with-kernel=\"${KS}\" --with-isapnp=yes --with-sequencer=yes --with-oss=yes --with-cards=all
- try make
- fi
- if [ "`use pcmcia-cs`" ]
- then
- cd ${KS}/extras/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
+ cd ${KS}/extras/alsa-driver-${AV}
+ # This is needed for linux-extras
+ if [ -f "Makefile.conf" ]
+ then
+ try make clean
+ fi
+ try ./configure --with-kernel=\"${KS}\" --with-isapnp=yes --with-sequencer=yes --with-oss=yes --with-cards=all
+ try make
+ fi
+ if [ "`use pcmcia-cs`" ]
+ then
+ cd ${KS}/extras/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
+ else
+ #linux-sources
+ try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" dep
fi
- fi
}
src_install() {
@@ -292,115 +290,112 @@ src_install() {
# We install the alsa headers in all three packages
if [ "`use alsa`" ]
then
- # get alsa includes
- cd ${KS}/extras/alsa-driver-${AV}
- insinto /usr/src/linux-${KV}/include/linux
- cd include
- doins asound.h asoundid.h asequencer.h ainstr_*.h
+ #i get alsa includes
+ cd ${KS}/extras/alsa-driver-${AV}
+ insinto /usr/src/linux-${KV}/include/linux
+ cd include
+ doins asound.h asoundid.h asequencer.h ainstr_*.h
fi
if [ ! "${PN}" = "linux-sources" ]
then
- if [ $PN = "linux" ] ; then
- KS=${S}
- else
- KS=/usr/src/linux
- fi
- dodir /usr/lib
+ if [ $PN = "linux" ]
+ then
+ KS=${S}
+ else
+ KS=/usr/src/linux
+ fi
+ dodir /usr/lib
- if [ "`use lvm`" ]
- then
- cd ${KS}/extras/LVM/${LVMV}/tools
+ if [ "`use lvm`" ]
+ then
+ cd ${KS}/extras/LVM/${LVMV}/tools
- try CFLAGS=\""${CFLAGS} -I${KS}/include"\" 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
+ try CFLAGS=\""${CFLAGS} -I${KS}/include"\" 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
-
-
- 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}
+ 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
+ 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 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)
+ #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
+ install -d ${D}/lib/modules/`uname -r`
+ try make INSTALL_MOD_PATH=${D} modules_install
- 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
+ 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 alsa`" ]
then
- #install ALSA modules
+ #install ALSA modules
cd ${KS}/extras/alsa-driver-${AV}
- dodoc INSTALL FAQ
- dodir /lib/modules/${KV}/misc
- cp modules/*.o ${D}/lib/modules/${KV}/misc
+ dodoc INSTALL FAQ
+ dodir /lib/modules/${KV}/misc
+ cp modules/*.o ${D}/lib/modules/${KV}/misc
fi
- if [ "`use pcmcia-cs`" ]
- then
- #install PCMCIA modules and utilities
- cd ${KS}/extras/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
-
- else
- dodir /usr/src
-
- cd ${S}
- make mrproper
-
- if [ "`use build`" ] ; then
- dodir /usr/src/linux-${KV}
- #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}
-
+ if [ "`use pcmcia-cs`" ]
+ then
+ #install PCMCIA modules and utilities
+ cd ${KS}/extras/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
else
- echo ">>> Copying sources..."
- cp -ax ${S} ${D}/usr/src
- fi
-
- #don't overwrite existing .config if present
- cd ${D}/usr/src/linux-${KV}
- if [ -e .config ]
- then
- cp -a .config .config.eg
+ dodir /usr/src
+ cd ${S}
+ #make mrproper
+
+ if [ "`use build`" ] ; then
+ dodir /usr/src/linux-${KV}
+ #grab includes and documentation only
+ echo ">>> Copying includes..."
+ cp -ax ${S}/include ${D}/usr/src/linux-${KV}
+ else
+ echo ">>> Copying sources..."
+ cp -ax ${S} ${D}/usr/src
+ fi
+ fi
+ if [ "$PN" != "linux-extras" ]
+ 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
- fi
}
pkg_postinst() {
@@ -411,12 +406,6 @@ pkg_postinst() {
cd ${ROOT}/usr/src/linux-${KV}
if [ "${PN}" = "linux-sources" ] && [ -e .config.eg ] && [ ! -e .config ]
then
- cp -a .config.eg .config
+ cp -a .config.eg .config
fi
}
-
-#pkg_postrm() {
-#
-# rm -f ${ROOT}/usr/src/linux
-# rm -rf ${ROOT}/usr/src/linux-${KV}
-#}