# $Id$ PNAME="kmod" PVER="20" PBUILD="r1" PCAT="sys-apps" DESCRIPTION="Library and tools for managing linux kernel-modules." HOMEPAGE="http://git.profusion.mobi/cgit.cgi/kmod.git" DEPEND=">= virtual/glibc >= app-arch/xz-utils-5 >= sys-libs/zlib-1.2.5" PROVIDE="virtual/module-tools" SRCFILE="${PNAME}-${PVER}.tar.xz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mbuild mtools multilib msetfeature "!check" SRC_URI=( http://ftp.kernel.org/pub/linux/utils/kernel/${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) UP2DATE="updatecmd 'http://ftp.kernel.org/pub/linux/utils/kernel/${PNAME}/' | lasttarball xz" src_compile() { mconfigure --disable-debug --enable-tools --with-xz --with-zlib || die mmake || die } src_install() { mmake DESTDIR=${BINDIR} install || die # compat symlinks minstalldir /usr/bin || die minstalldir /usr/sbin || die mlink kmod /usr/bin/lsmod || die local i for i in in {ins,rm,dep}mod mod{info,probe} do mlink ../bin/kmod /usr/sbin/${i} || die done minstalldocs COPYING NEWS README TODO || die } preinstall() { if [[ ! -z $(magequery -n module-init-tools) ]] then echo -e ${COLRED} echo -e "Error: sys-apps/module-init-tools is installed!!" echo -e "module-init-tools is now replaced by kmod and cannot be installed together." echo -e "Please uninstall sys-apps/module-init-tools first!" echo -e ${COLDEFAULT} die "sys-apps/module-init-tools found!" fi }