1 |
commit: 540b5786ee8bbc26fffab9523866ac6e36719aec |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 1 00:37:46 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 1 00:37:56 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=540b5786 |
7 |
|
8 |
sys-fs/multipath-tools: fix plugin path |
9 |
|
10 |
Bug: https://bugs.gentoo.org/883759 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
.../multipath-tools-0.9.3-r1.ebuild | 96 ++++++++++++++++++++++ |
14 |
1 file changed, 96 insertions(+) |
15 |
|
16 |
diff --git a/sys-fs/multipath-tools/multipath-tools-0.9.3-r1.ebuild b/sys-fs/multipath-tools/multipath-tools-0.9.3-r1.ebuild |
17 |
new file mode 100644 |
18 |
index 000000000000..99c183634c13 |
19 |
--- /dev/null |
20 |
+++ b/sys-fs/multipath-tools/multipath-tools-0.9.3-r1.ebuild |
21 |
@@ -0,0 +1,96 @@ |
22 |
+# Copyright 1999-2022 Gentoo Authors |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=8 |
26 |
+ |
27 |
+inherit linux-info systemd toolchain-funcs udev tmpfiles |
28 |
+ |
29 |
+DESCRIPTION="Device mapper target autoconfig" |
30 |
+HOMEPAGE="http://christophe.varoqui.free.fr/" |
31 |
+SRC_URI="https://github.com/opensvc/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" |
32 |
+ |
33 |
+LICENSE="GPL-2" |
34 |
+SLOT="0" |
35 |
+KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ~loong ppc ppc64 ~riscv x86" |
36 |
+IUSE="systemd test" |
37 |
+RESTRICT="!test? ( test )" |
38 |
+ |
39 |
+RDEPEND=" |
40 |
+ dev-libs/json-c:= |
41 |
+ dev-libs/libaio |
42 |
+ dev-libs/userspace-rcu:= |
43 |
+ >=sys-fs/lvm2-2.02.45 |
44 |
+ >=virtual/libudev-232-r3 |
45 |
+ sys-libs/readline:= |
46 |
+ systemd? ( sys-apps/systemd )" |
47 |
+DEPEND="${RDEPEND} |
48 |
+ test? ( dev-util/cmocka )" |
49 |
+BDEPEND="virtual/pkgconfig" |
50 |
+ |
51 |
+CONFIG_CHECK="~DM_MULTIPATH" |
52 |
+ |
53 |
+src_prepare() { |
54 |
+ default |
55 |
+ |
56 |
+ sed -r -i -e '/^(CPPFLAGS|CFLAGS)\>/s,^(CPPFLAGS|CFLAGS)\>[[:space:]]+:=,\1 := $(GENTOO_\1),' \ |
57 |
+ "${S}"/Makefile.inc || die |
58 |
+} |
59 |
+ |
60 |
+src_compile() { |
61 |
+ tc-export CC |
62 |
+ |
63 |
+ # LIBDM_API_FLUSH involves grepping files in /usr/include, |
64 |
+ # so force the test to go the way we want #411337. |
65 |
+ emake \ |
66 |
+ prefix="${EPREFIX}/usr" \ |
67 |
+ LIB="$(get_libdir)" \ |
68 |
+ LIBDM_API_FLUSH=1 \ |
69 |
+ PKGCONFIG="$(tc-getPKG_CONFIG)" \ |
70 |
+ GENTOO_CFLAGS="${CFLAGS}" \ |
71 |
+ GENTOO_CPPFLAGS="${CPPFLAGS}" \ |
72 |
+ FAKEVAR=1 |
73 |
+} |
74 |
+ |
75 |
+src_install() { |
76 |
+ dodir /sbin |
77 |
+ |
78 |
+ # Please clean this up > 0.9.3: https://github.com/opensvc/multipath-tools/pull/53 |
79 |
+ # $(prefix) doesn't work correctly in makefile in 0.9.3. |
80 |
+ emake \ |
81 |
+ DESTDIR="${ED}" \ |
82 |
+ prefix="${EPREFIX}" \ |
83 |
+ LIB="$(get_libdir)" \ |
84 |
+ RUN=run \ |
85 |
+ plugindir="$(get_libdir)//multipath" \ |
86 |
+ unitdir="$(systemd_get_systemunitdir)" \ |
87 |
+ libudevdir="${EPREFIX}/$(get_udevdir)" \ |
88 |
+ pkgconfdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig" \ |
89 |
+ GENTOO_CFLAGS="${CFLAGS}" \ |
90 |
+ GENTOO_CPPFLAGS="${CPPFLAGS}" \ |
91 |
+ install |
92 |
+ |
93 |
+ rmdir "${ED}"/usr/include |
94 |
+ rmdir "${ED}"/usr/share |
95 |
+ mv "${ED}"/include "${ED}"/usr/include || die |
96 |
+ mv "${ED}"/share "${ED}"/usr/share || die |
97 |
+ einstalldocs |
98 |
+ |
99 |
+ newinitd "${FILESDIR}"/multipathd-r1.rc multipathd |
100 |
+ newinitd "${FILESDIR}"/multipath.rc multipath |
101 |
+ |
102 |
+ find "${ED}" -type f -name '*.la' -delete || die |
103 |
+} |
104 |
+ |
105 |
+pkg_postinst() { |
106 |
+ tmpfiles_process /usr/lib/tmpfiles.d/multipath.conf |
107 |
+ udev_reload |
108 |
+ |
109 |
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then |
110 |
+ elog "If you need multipath on your system, you must" |
111 |
+ elog "add 'multipath' into your boot runlevel!" |
112 |
+ fi |
113 |
+} |
114 |
+ |
115 |
+pkg_postrm() { |
116 |
+ udev_reload |
117 |
+} |