1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils systemd toolchain-funcs udev
8 DESCRIPTION="Device mapper target autoconfig"
9 HOMEPAGE="http://christophe.varoqui.free.fr/"
10 SRC_URI="http://christophe.varoqui.free.fr/${PN}/${P}.tar.bz2"
14 KEYWORDS="~alpha amd64 ~arm ~ia64 ppc ppc64 ~sparc x86"
17 RDEPEND=">=sys-fs/lvm2-2.02.45
21 systemd? ( sys-apps/systemd )"
26 epatch "${FILESDIR}"/${P}-makefile.patch
27 epatch "${FILESDIR}"/${P}-systemd-pkgconfig.patch
32 # LIBDM_API_FLUSH involves grepping files in /usr/include,
33 # so force the test to go the way we want #411337.
34 emake LIBDM_API_FLUSH=1 CC="$(tc-getCC)" SYSTEMD=$(usex systemd 1 "")
38 local udevdir="$(get_udevdir)"
40 dodir /sbin /usr/share/man/man8
43 SYSTEMD=$(usex systemd 1 "") \
44 unitdir="$(systemd_get_unitdir)" \
45 libudevdir='${prefix}'/"${udevdir}" \
49 newins "${S}"/multipath.conf.annotated multipath.conf
50 # /etc/udev is reserved for user modified rules!
51 mv "${D}"/etc/udev/rules.d "${D}/${udevdir}"/ || die
52 fperms 644 "${udevdir}"/rules.d/66-kpartx.rules
53 newinitd "${FILESDIR}"/rc-multipathd multipathd
54 newinitd "${FILESDIR}"/multipath.rc multipath
56 dodoc multipath.conf.* AUTHOR ChangeLog FAQ
58 dodoc kpartx/ChangeLog kpartx/README
62 if [[ -z ${REPLACING_VERSIONS} ]]; then
63 elog "If you need multipath on your system, you must"
64 elog "add 'multipath' into your boot runlevel!"