summaryrefslogtreecommitdiff
blob: 54464fa5b82622d4ae0ef7342dde46150134a4bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-fs/multipath-tools/multipath-tools-0.4.2.ebuild,v 1.5 2005/03/01 23:14:27 azarah Exp $

DESCRIPTION="Device mapper target autoconfig."
HOMEPAGE="http://christophe.varoqui.free.fr/wiki/wakka.php?wiki=Home"
SRC_URI="http://christophe.varoqui.free.fr/${PN}/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"

IUSE=""

RDEPEND=">=sys-fs/device-mapper-1.00.19
	sys-fs/udev
	sys-fs/sysfsutils"

DEPEND="${RDEPEND}"

src_unpack() {
	unpack ${A}; cd ${S}
	sed -i -e 's:^bindir.*:bindir = /usr/sbin:' \
		${S}/multipathd/Makefile
	sed -i -e 's:rules.d/.*:rules.d/40-multipath.rules:' \
		${S}/multipath/Makefile
}

src_compile() {
	emake || die "emake failed"
}

src_install() {
	make DESTDIR=${D} install || die "install failed"

	insinto /etc
	newins ${S}/multipath.conf.annotated multipath.conf
	fperms 644 /etc/udev/rules.d/multipath.rules
	newinitd ${FILESDIR}/rc-multipathd multipathd

	dodoc AUTHOR COPYING ChangeLog FAQ README TODO
	docinto dmadm; dodoc README
	docinto kpartx; dodoc ChangeLog README
}