--- kmod-7.ebuild 2012-03-23 15:27:48.000000000 +0100 +++ - 2012-03-29 16:24:23.511973274 +0200 @@ -20,7 +20,7 @@ LICENSE="LGPL-2" SLOT="0" -IUSE="debug doc lzma static-libs +tools zlib" +IUSE="debug doc lzma static-libs +tools zlib usr" COMMON_DEPEND="!sys-apps/module-init-tools !sys-apps/modutils @@ -56,6 +56,10 @@ local myconf [[ ${PV} == 9999 ]] && myconf="$(use_enable doc gtk-doc)" + if use usr ; then + myconf="$myconf --bindir=/bin --libdir=/lib" + fi + econf \ $(use_enable static-libs static) \ $(use_enable tools) \ @@ -69,15 +73,20 @@ { default + local mypref + mypref="/usr/bin" + if use usr ; then + mypref="/bin" + fi find "${D}" -name libkmod.la -exec rm -f {} + if use tools; then dodir /bin - dosym /usr/bin/kmod /bin/lsmod + dosym $mypref/kmod /bin/lsmod dodir /sbin local cmd for cmd in depmod insmod modinfo modprobe rmmod; do - dosym /usr/bin/kmod /sbin/${cmd} + dosym $mypref/kmod /sbin/${cmd} done fi }