DESCRIPTION="dmraid (Device-mapper RAID tool and library)" HOMEPAGE="http://people.redhat.com/~heinzm/sw/dmraid/" SRC_URI="http://people.redhat.com/~heinzm/sw/dmraid/src/${PN}-${PV/_/.}.tar.bz2" inherit eutils flag-o-matic LICENSE="GPL" SLOT="0" KEYWORDS="-* ~x86 ~amd64" IUSE="doc" DEPEND="virtual/libc sys-fs/device-mapper" RDEPEND=${DEPEND} pkg_setup() { if [ ! `echo ${KV} | grep 2\.[56]\.` ]; then ewarn "You are using kernel version ${KV}" ewarn "DMraid uses recently introduced Device-Mapper features." ewarn "These might be unavailable in the kernel you are running now." fi } src_compile() { cd ${WORKDIR}/${PN}/${PV/_/.} #inlining doesnt seem to work for dmraid filter-flags -fno-inline # We want shared. For static boot stuff, people should use genkernel. ./configure --enable-shared_lib || die "Failed configure" emake || die "Failed emake" } src_install() { cd ${WORKDIR}/${PN}/${PV/_/.} einstall DESTDIR=${D} install || die "Failed einstall" dolib.a lib/libdmraid.a # no header file is installed by make install mkdir -p ${D}/usr/include cp include/dmraid.h ${D}/usr/include/libdmraid.h use doc && dodoc CHANGELOG README TODO KNOWN_BUGS doc/* } pkg_postinst() { echo einfo "For booting Gentoo from Device-Mapper RAID you can use Genkernel." echo einfo "Genkernel will generate the kernel and the initrd with a staticly linked dmraid binary:" einfo "emerge -av sys-kernel/genkernel" einfo "genkernel --dmraid --udev all" echo ewarn "DMraid should be safe to use, but no warranties can be given" echo ebeep 5 epause 5 }