# $Header: /alx-cvs/smage-eglibc/module-init-tools/module-init-tools-3.4-r1.smage2,v 1.1 2008/02/27 10:19:53 niro Exp $ PNAME="module-init-tools" PVER="3.4" 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 >= sys-apps/debianutils-2.14" SRCFILE="${PNAME}-${PVER}.tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mtools alx SRC_URI=( 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.1-generate-modprobe-assume-kernel.patch mirror://${PNAME}/${PNAME}-3.1-abort-on-modprobe-failure.patch mirror://${PNAME}/${PNAME}-3.2.2-handle-dupliate-aliases.patch mirror://${PNAME}/${PNAME}-${PVER}-manpages.patch ) # note: we dropped buildin modutils, *no* kernel-2.4 support anymore! src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # support legacy .o modules mpatch ${PNAME}-0.9.15-legacy-modext-support.patch || die mpatch ${PNAME}-3.1-generate-modprobe-assume-kernel.patch || die mpatch ${PNAME}-3.1-abort-on-modprobe-failure.patch || die # fixes an endless loop mpatch ${PNAME}-3.2.2-handle-dupliate-aliases.patch || die # workaround docbook2man dependency; provide prebuild man-pages # -Np1 must be given, this patch creates new files! mpatch -Np1 ${PNAME}-${PVER}-manpages.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.9 automake --add-missing || die # do not regenerate man-pages (needs docbook2man) touch *.5 *.8 || die } src_compile() { cd ${SRCDIR} mconfigure --prefix=/ --enable-zlib || die mmake || die } 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 }