# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sys-fs/dmraid/dmraid-1.0.0_rc16-r1.ebuild,v 1.1 2009/12/01 17:03:54 tommy Exp $ EAPI="2" inherit cvs linux-info flag-o-matic autotools MY_PV=${PV/_/.} DESCRIPTION="Device-mapper RAID tool and library" HOMEPAGE="http://people.redhat.com/~heinzm/sw/dmraid/" SRC_URI="" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~ppc ~x86" IUSE="static" RDEPEND="|| ( >=sys-fs/lvm2-2.02.45 sys-fs/device-mapper )" DEPEND="${RDEPEND}" S=${WORKDIR}/${PN} pkg_setup() { if kernel_is lt 2 6 ; then ewarn "You are using a kernel < 2.6" ewarn "DMraid uses recently introduced Device-Mapper features." ewarn "These might be unavailable in the kernel you are running now." fi ewarn "This is a LIVE CVS HEAD package - Use at own risk" ewarn "Note - dmraid from this package will most likely not be compatible with" ewarn "genkernel, and no tarball will be installed in /usr/share/dmraid to support it" } src_unpack() { ECVS_SERVER="sources.redhat.com:/cvs/dm" ECVS_USER="anonymous" ECVS_PASS="" ECVS_AUTH="pserver" ECVS_MODULE="dmraid" ECVS_TOP_DIR="${DISTDIR}/cvs-src/${ECVS_MODULE}" cvs_src_unpack } src_prepare() { # our patches epatch "${FILESDIR}"/${PN}-1.0.0_rc16-undo-p-rename.patch || \ ewarn "p-rename patch failed -- device names will be DIFFERENT than genkernel" epatch "${FILESDIR}"/${PN}-1.0.0_rc16-return-all-sets.patch || \ ewarn "return-all-sets patch failed" eautoreconf } src_configure() { econf $(use_enable static static_link) } src_install() { emake DESTDIR="${D}" install || die "emake install failed" dodoc CHANGELOG README TODO KNOWN_BUGS doc/* || die "dodoc failed" } pkg_postinst() { ewarn "DMRAID from CVS LIVE HEAD might be safe to use, but no warranties can be given" }