1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit linux-info systemd toolchain-funcs udev vcs-snapshot toolchain-funcs
8 DESCRIPTION="Device mapper target autoconfig"
9 HOMEPAGE="http://christophe.varoqui.free.fr/"
10 SRC_URI="https://git.opensvc.com/?p=multipath-tools/.git;a=snapshot;h=${PV};sf=tgz -> ${P}.tar.gz"
14 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86"
17 BDEPEND="virtual/pkgconfig"
22 dev-libs/userspace-rcu:=
24 >=virtual/libudev-232-r3
26 rbd? ( sys-cluster/ceph )
27 systemd? ( sys-apps/systemd )
32 CONFIG_CHECK="~DM_MULTIPATH"
37 "${FILESDIR}"/${PN}-0.7.5-respect-flags.patch
38 "${FILESDIR}"/${PN}-0.8.3-no-gziped-docs.patch
43 $(tc-getPKG_CONFIG) --modversion systemd
49 # The upstream lacks any way to configure the build at present
50 # and ceph is a huge dependency, so we're using sed to make it
51 # optional until the upstream has a proper configure system
54 -e "s/libcheckrbd.so/# libcheckrbd.so/" \
56 -i libmultipath/checkers/Makefile \
62 # LIBDM_API_FLUSH involves grepping files in /usr/include,
63 # so force the test to go the way we want #411337.
66 LIBDM_API_FLUSH=1 SYSTEMD="$(get_systemd_pv)"
70 dodir /sbin /usr/share/man/man{5,8}
74 SYSTEMD=$(get_systemd_pv) \
75 unitdir="$(systemd_get_systemunitdir)" \
76 libudevdir='${prefix}'/"$(get_udevdir)" \
77 pkgconfdir='${prefix}'/usr/'${LIB}'/pkgconfig \
80 newinitd "${FILESDIR}"/multipathd-r1.rc multipathd
81 newinitd "${FILESDIR}"/multipath.rc multipath
87 if [[ -z ${REPLACING_VERSIONS} ]]; then
88 elog "If you need multipath on your system, you must"
89 elog "add 'multipath' into your boot runlevel!"