3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
inherit linux-info systemd toolchain-funcs udev tmpfiles
|
|
6 |
inherit linux-info systemd tmpfiles toolchain-funcs udev
|
7 |
7 |
|
8 |
8 |
DESCRIPTION="Device mapper target autoconfig"
|
9 |
9 |
HOMEPAGE="http://christophe.varoqui.free.fr/"
|
... | ... | |
11 |
11 |
|
12 |
12 |
LICENSE="GPL-2"
|
13 |
13 |
SLOT="0"
|
14 |
|
KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ~loong ppc ppc64 ~riscv x86"
|
|
14 |
KEYWORDS="~alpha ~amd64 ~arm arm64 ~ia64 ~loong ~ppc ppc64 ~riscv ~x86"
|
15 |
15 |
IUSE="systemd test"
|
16 |
16 |
RESTRICT="!test? ( test )"
|
17 |
17 |
|
... | ... | |
20 |
20 |
dev-libs/libaio
|
21 |
21 |
dev-libs/userspace-rcu:=
|
22 |
22 |
>=sys-fs/lvm2-2.02.45
|
23 |
|
>=virtual/libudev-232-r3
|
24 |
23 |
sys-libs/readline:=
|
25 |
|
systemd? ( sys-apps/systemd )"
|
26 |
|
DEPEND="${RDEPEND}
|
27 |
|
test? ( dev-util/cmocka )"
|
|
24 |
>=virtual/libudev-232-r3
|
|
25 |
systemd? ( sys-apps/systemd )
|
|
26 |
"
|
|
27 |
DEPEND="
|
|
28 |
${RDEPEND}
|
|
29 |
test? ( dev-util/cmocka )
|
|
30 |
"
|
28 |
31 |
BDEPEND="virtual/pkgconfig"
|
29 |
32 |
|
30 |
33 |
CONFIG_CHECK="~DM_MULTIPATH"
|
31 |
34 |
|
|
35 |
PATCHES=(
|
|
36 |
"${FILESDIR}"/${PN}-0.9.4-test-fix.patch
|
|
37 |
"${FILESDIR}"/${PN}-0.9.4-remove-Werror.patch
|
|
38 |
)
|
|
39 |
|
|
40 |
myemake() {
|
|
41 |
local myemakeargs=(
|
|
42 |
prefix="${EPREFIX}"
|
|
43 |
usr_prefix="${EPREFIX}/usr"
|
|
44 |
LIB="$(get_libdir)"
|
|
45 |
RUN=run
|
|
46 |
plugindir="${EPREFIX}/$(get_libdir)/multipath"
|
|
47 |
unitdir="$(systemd_get_systemunitdir)"
|
|
48 |
libudevdir="${EPREFIX}$(get_udevdir)"
|
|
49 |
GENTOO_CFLAGS="${CFLAGS}"
|
|
50 |
GENTOO_CPPFLAGS="${CPPFLAGS}"
|
|
51 |
FORTIFY_OPT=
|
|
52 |
OPTFLAGS=
|
|
53 |
FAKEVAR=1
|
|
54 |
V=1
|
|
55 |
)
|
|
56 |
|
|
57 |
emake "${myemakeargs[@]}" "$@"
|
|
58 |
}
|
|
59 |
|
32 |
60 |
src_prepare() {
|
33 |
61 |
default
|
34 |
62 |
|
... | ... | |
38 |
66 |
|
39 |
67 |
src_compile() {
|
40 |
68 |
tc-export CC
|
|
69 |
myemake
|
|
70 |
}
|
41 |
71 |
|
42 |
|
# LIBDM_API_FLUSH involves grepping files in /usr/include,
|
43 |
|
# so force the test to go the way we want #411337.
|
44 |
|
emake \
|
45 |
|
prefix="${EPREFIX}/usr" \
|
46 |
|
plugindir="${EPREFIX}/$(get_libdir)/multipath" \
|
47 |
|
LIB="$(get_libdir)" \
|
48 |
|
LIBDM_API_FLUSH=1 \
|
49 |
|
PKGCONFIG="$(tc-getPKG_CONFIG)" \
|
50 |
|
GENTOO_CFLAGS="${CFLAGS}" \
|
51 |
|
GENTOO_CPPFLAGS="${CPPFLAGS}" \
|
52 |
|
FAKEVAR=1
|
|
72 |
src_test() {
|
|
73 |
myemake test
|
53 |
74 |
}
|
54 |
75 |
|
55 |
76 |
src_install() {
|
56 |
77 |
dodir /sbin
|
57 |
78 |
|
58 |
|
# Please clean this up > 0.9.3: https://github.com/opensvc/multipath-tools/pull/53
|
59 |
|
# $(prefix) doesn't work correctly in makefile in 0.9.3.
|
60 |
|
emake \
|
61 |
|
DESTDIR="${ED}" \
|
62 |
|
prefix="${EPREFIX}" \
|
63 |
|
LIB="$(get_libdir)" \
|
64 |
|
RUN=run \
|
65 |
|
plugindir="${EPREFIX}/$(get_libdir)/multipath" \
|
66 |
|
unitdir="$(systemd_get_systemunitdir)" \
|
67 |
|
libudevdir="${EPREFIX}/$(get_udevdir)" \
|
68 |
|
pkgconfdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig" \
|
69 |
|
GENTOO_CFLAGS="${CFLAGS}" \
|
70 |
|
GENTOO_CPPFLAGS="${CPPFLAGS}" \
|
71 |
|
install
|
72 |
|
|
73 |
|
rmdir "${ED}"/usr/include
|
74 |
|
rmdir "${ED}"/usr/share
|
75 |
|
mv "${ED}"/include "${ED}"/usr/include || die
|
76 |
|
mv "${ED}"/share "${ED}"/usr/share || die
|
|
79 |
myemake DESTDIR="${ED}" install
|
|
80 |
|
77 |
81 |
einstalldocs
|
78 |
82 |
|
79 |
83 |
newinitd "${FILESDIR}"/multipathd-r1.rc multipathd
|