From cefb567b6b5e355e2128f6e524d903adab3edb6f Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Thu, 9 Dec 2004 19:34:00 +0000 Subject: Merge bk://oe-devel@oe-devel.bkbits.net/openembedded/ into home.hrw.one.pl:/home/hrw/zaurus/bb/openembedded 2004/12/09 18:13:47+01:00 hrw.one.pl!hrw Merge bk://oe-devel@oe-devel.bkbits.net/openembedded/ into home.hrw.one.pl:/home/hrw/zaurus/bb/openembedded 2004/12/09 13:12:46+01:00 hrw.one.pl!hrw Merge bk://oe-devel@oe-devel.bkbits.net/openembedded/ into home.hrw.one.pl:/home/hrw/zaurus/bb/openembedded 2004/12/09 11:22:47+01:00 hrw.one.pl!hrw Merge bk://oe-devel@oe-devel.bkbits.net/openembedded/ into home.hrw.one.pl:/home/hrw/zaurus/bb/packages 2004/12/09 11:14:43+01:00 hrw.one.pl!hrw Merge bk://oe-devel@oe-devel.bkbits.net/openembedded/ into home.hrw.one.pl:/home/hrw/zaurus/bb/packages 2004/12/09 10:37:22+01:00 hrw.one.pl!hrw Merge bk://oe-devel@oe-devel.bkbits.net/openembedded/ into home.hrw.one.pl:/home/hrw/zaurus/bb/packages 2004/12/09 08:53:07+01:00 hrw.one.pl!hrw Merge bk://oe-devel@oe-devel.bkbits.net/openembedded into home.hrw.one.pl:/home/hrw/zaurus/bb/packages 2004/12/08 20:00:54+01:00 hrw.one.pl!hrw Merge bk://oe-devel@oe-devel.bkbits.net/packages.bb into home.hrw.one.pl:/home/hrw/zaurus/bb/packages BKrev: 41b8a8a8SlOmZV40nqMAYr3hQDG8Gg --- packages/modutils/modutils_2.4.27.bb | 87 ++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) (limited to 'packages/modutils') diff --git a/packages/modutils/modutils_2.4.27.bb b/packages/modutils/modutils_2.4.27.bb index e69de29bb2..17fbb2f44d 100644 --- a/packages/modutils/modutils_2.4.27.bb +++ b/packages/modutils/modutils_2.4.27.bb @@ -0,0 +1,87 @@ +SECTION = "base" +DESCRIPTION = "These utilities are intended to make a Linux modular kernel \ +manageable for all users, administrators and distribution maintainers." +LICENSE = "GPLv2" +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/files" +PR = "r6" + +SRC_URI = "ftp://ftp.kernel.org/pub/linux/utils/kernel/modutils/v2.4/modutils-${PV}.tar.bz2 \ + file://lex.l.diff;patch=1 \ + file://modutils-notest.patch;patch=1 \ + file://configure.patch;patch=1 \ + file://program_prefix.patch;patch=1 \ + file://armeb.patch;patch=1" + +inherit autotools + +# modutils go in /sbin +sbindir = "/sbin" +EXTRA_OECONF = "--disable-strip" +export BUILDCC = "${BUILD_CC}" +export BUILDCFLAGS = "${BUILD_CFLAGS}" + +do_install () { + oe_runmake 'DESTDIR=${D}' install + install -d ${D}/${sysconfdir} + rm ${D}/sbin/lsmod + install -d ${D}/bin/ + ln -s ../sbin/insmod ${D}/bin/lsmod + for f in bin/lsmod sbin/insmod sbin/rmmod sbin/modprobe sbin/modinfo sbin/depmod; do mv ${D}/$f ${D}/$f.24 + done +} + +pkg_postinst_modutils () { +#!/bin/sh +for f in sbin/insmod sbin/modprobe sbin/rmmod bin/lsmod; do + bn=`basename $f` + update-alternatives --install /$f $bn /$f.24 10 +done +if test -n "$D"; then + D="-r $D" + if test -n "`which ${TARGET_PREFIX}depmod`"; then + for kerneldir in `ls -p ${IMAGE_ROOTFS}/lib/modules|grep /`; do + kernelver=`basename $kerneldir` + ${TARGET_PREFIX}depmod -a -b ${IMAGE_ROOTFS} -C ${IMAGE_ROOTFS}/${sysconfdir}/modules.conf -r $kernelver + done + fi +fi +update-rc.d $D modutils.sh start 20 S . +} + +pkg_prerm_modutils () { +#!/bin/sh +for f in sbin/insmod sbin/modprobe sbin/rmmod sbin/depmod sbin/modinfo bin/lsmod; do +bn=`basename $f` + update-alternatives --remove $bn /$f.24 +done +if test -n "$D"; then + D="-r $D" +fi +update-rc.d $D modutils.sh remove +} + +pkg_postinst_modutils-depmod() { +#!/bin/sh +update-alternatives --install /sbin/depmod depmod /sbin/depmod.24 10 +} + +pkg_postinst_modutils-modinfo() { +#!/bin/sh +update-alternatives --install /sbin/modinfo modinfo /sbin/modinfo.24 10 +} + +pkg_prerm_modutils-depmod() { +#!/bin/sh +update-alternatives --remove depmod /sbin/depmod.24 +} + +pkg_prerm_modutils-modinfo() { +#!/bin/sh +update-alternatives --remove modinfo /sbin/modinfo.24 +} + +PACKAGES = "modutils-depmod modutils-modinfo modutils-doc modutils" + +FILES_modutils-depmod = "sbin/depmod.24" +FILES_modutils-modinfo = "sbin/modinfo.24" +RDEPENDS_modutils = "modutils-depmod" -- cgit v1.2.3