# $Id: module-init-tools-3.10-r1.smage2 3065 2009-10-07 21:52:46Z niro $ PNAME="module-init-tools" PVER="3.12" PBUILD="r1" PCATEGORIE="sys-apps" STATE="unstable" DESCRIPTION="Kernel module utilities for 2.6x kernel series." HOMEPAGE="http://www.kerneltools.org/" DEPEND=">= virtual/glibc >= sys-libs/zlib-1.2.3 >= virtual/debianutils" SRCFILE="${PNAME}-${PVER}.tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" MCORE_ONLY_KEEP="bin/lsmod sbin/depmod sbin/insmod sbin/lsmod sbin/modprobe sbin/rmmod" sminclude mtools mcore-split SRC_URI=( http://www.kernel.org/pub/linux/utils/kernel/${PNAME}/${SRCFILE} http://www.kernel.org/pub/linux/kernel/people/jcm/${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-0.9.15-legacy-modext-support.patch mirror://${PNAME}/${PNAME}-3.2.2-handle-dupliate-aliases.patch ) # note: we dropped buildin modutils, *no* kernel-2.4 support anymore! UP2DATE="updatecmd http://www.kernel.org/pub/linux/utils/kernel/${PNAME} | grep -v rc | lasttarball" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # support legacy .o modules mpatch ${PNAME}-0.9.15-legacy-modext-support.patch || die # fixes an endless loop mpatch ${PNAME}-3.2.2-handle-dupliate-aliases.patch || die # from gentoo: # make sure we link dynamically with zlib; our zlib.so is in /lib vs # /usr/lib so it's safe to link with. fixes ugly textrels as well. sed -i 's:-Wl,-Bstatic -lz -Wl,-Bdynamic:-lz:' configure || die [ -e ${SRCDIR}/missing ] && rm missing || die export WANT_AUTOMAKE=1.10 autoreconf --verbose --install --force || die # do not regenerate man-pages (needs docbook2man) touch *.5 *.8 || die } src_compile() { cd ${SRCDIR} DOCBOOKTOMAN=true mconfigure --prefix=/ --enable-zlib || die mmake || die } mcore_generic_src_install() { cd ${SRCDIR} mmake DESTDIR=${BINDIR} install || die # installs compat symlinks mlink ../bin/lsmod /sbin/lsmod || die } postinstall() { if [ -x /sbin/modules-update ] then echo "Updating module dependencies" /sbin/modules-update fi }