# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: dmraid-1.0.0_rc3.ebuild,v 1.0 2004/09/06 20:00:00 assl0r Exp $ inherit flag-o-matic IUSE="" DESCRIPTION="multipath-tools (using multipath device-mapper)" SRC_URI="http://christophe.varoqui.free.fr/multipath-tools/${P}.tar.bz2" HOMEPAGE="http://christophe.varoqui.free.fr/" LICENSE="GPL-2" DEPEND=">=sys-libs/device-mapper-1.00.19-r1 =sys-kernel/linux26-headers \ =sys-fs/sysfsutils" RDEPEND=${DEPEND} SLOT=0 KEYWORDS="x86 amd64" pkg_setup() { if [ ! `echo ${KV} | grep 2\.[56]\.` ]; then eerror "You are using kernel version ${KV}" eerror "This makes only sense for the 2.6.* kernel-branch" eerror "so stopping the merge!" die fi } src_unpack() { unpack ${A} cd ${S} epatch ${FILESDIR}/multipath-tools-gentoo-init.patch } src_compile() { cd ${WORKDIR}/${P} DESTDIR=${D} emake || die "make failed" } src_install () { DESTDIR=${D} make install cd ${WORKDIR}/${P} dosbin dmadm/dmadm dodoc ChangeLog README TODO FAQ AUTHOR COPYING docinto dmadm dodoc dmadm/README docinto kpartx dodoc kpartx/README kpartx/ChangeLog # Called before default rules (50) but after local settings (10) mv ${D}/etc/udev/rules.d/multipath.rules ${D}/etc/udev/rules.d/40-multipath.rules chmod 644 ${D}/etc/udev/rules.d/40-multipath.rules } pkg_postinst() { ewarn "*******************************************************************" ewarn "This is a test ebuild and may be unresiliant" ewarn "So please take backups before using these tools" ewarn "*******************************************************************" # Fix the config file if it already exists from a previous ebuild chmod 644 /etc/udev/rules.d/40-multipath.rules }