sys-fs/multipath-tools: Sync with Gentoo

It's from Gentoo commit e15f6ba5d67459faff090252c50a9233c8de01bb.
This commit is contained in:
Flatcar Buildbot 2023-04-24 07:15:27 +00:00 committed by Krzesimir Nowak
parent 0ccb6caa9e
commit fc2b384c57
3 changed files with 102 additions and 1 deletions

View File

@ -1,2 +1,3 @@
DIST multipath-tools-0.9.3.tar.gz 552442 BLAKE2B e2065119cdd68bd8c2b4420bd0de9ce370601597972dba32c076bfc4df6d0a1a65356454a2f96f95f27cf681387685edcbac2eb41258d4a7049a1ef62cdf0949 SHA512 4faa2ee5a96a9d5d752219931ebc885cb70ed6b022d45ede985ad7919c043a3aee166e6f126d32dffd187c5c32d5cbce91747d87d0b55557e2f7f68b279583da
DIST multipath-tools-0.9.4.tar.gz 554381 BLAKE2B 297f002e23312415467d8c4935da3b7f449318cd68120c719f40f0f45a9ebebc27f1297b918068b63471b65f72c08ce3cc6cad9b7bafcb646bb163c6486194ea SHA512 5e0dcea610fc215e345444c04453a38f39c73e493c2bc53f6b3a90cd701266aabdf7c4693dfc321099af836d0019bf27355e265ad5db5deff48f8bb94ed4719d
DIST multipath-tools-0.9.5.tar.gz 557469 BLAKE2B 1a9b9b01c28c8a4e9d4ae9bc55896cb764308f5118ac2f8c983163c0b2e49c0c4a84536c7edd7464a1bcb8ca6aef92452d5c25d4a1d9d490e0e3077b10462171 SHA512 39c2e5d45542c6076eb3b17b9994629b4c1f74347aa43e0119001fa2d07d3a606fd5e617962906a11b313afb37a115bd8eec2ef24447e980e61b5900625f9146

View File

@ -11,7 +11,7 @@ SRC_URI="https://github.com/opensvc/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~x86"
KEYWORDS="~alpha ~amd64 ~arm arm64 ~ia64 ~loong ~ppc ppc64 ~riscv ~x86"
IUSE="systemd test"
RESTRICT="!test? ( test )"

View File

@ -0,0 +1,100 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit linux-info systemd tmpfiles toolchain-funcs udev
DESCRIPTION="Device mapper target autoconfig"
HOMEPAGE="http://christophe.varoqui.free.fr/"
SRC_URI="https://github.com/opensvc/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~x86"
IUSE="systemd test"
RESTRICT="!test? ( test )"
RDEPEND="
dev-libs/json-c:=
dev-libs/libaio
dev-libs/userspace-rcu:=
>=sys-fs/lvm2-2.02.45
sys-libs/readline:=
>=virtual/libudev-232-r3
systemd? ( sys-apps/systemd )
"
DEPEND="
${RDEPEND}
test? ( dev-util/cmocka )
"
BDEPEND="virtual/pkgconfig"
CONFIG_CHECK="~DM_MULTIPATH"
PATCHES=(
"${FILESDIR}"/${PN}-0.9.4-remove-Werror.patch
)
myemake() {
local myemakeargs=(
prefix="${EPREFIX}"
usr_prefix="${EPREFIX}/usr"
LIB="$(get_libdir)"
RUN=run
plugindir="${EPREFIX}/$(get_libdir)/multipath"
unitdir="$(systemd_get_systemunitdir)"
libudevdir="${EPREFIX}$(get_udevdir)"
GENTOO_CFLAGS="${CFLAGS}"
GENTOO_CPPFLAGS="${CPPFLAGS}"
FORTIFY_OPT=
OPTFLAGS=
FAKEVAR=1
V=1
)
emake "${myemakeargs[@]}" "$@"
}
src_prepare() {
default
sed -r -i -e '/^(CPPFLAGS|CFLAGS)\>/s,^(CPPFLAGS|CFLAGS)\>[[:space:]]+:=,\1 := $(GENTOO_\1),' \
"${S}"/Makefile.inc || die
}
src_compile() {
tc-export CC
myemake
}
src_test() {
myemake test
}
src_install() {
dodir /sbin
myemake DESTDIR="${ED}" install
einstalldocs
newinitd "${FILESDIR}"/multipathd-r1.rc multipathd
newinitd "${FILESDIR}"/multipath.rc multipath
find "${ED}" -type f -name '*.la' -delete || die
}
pkg_postinst() {
tmpfiles_process /usr/lib/tmpfiles.d/multipath.conf
udev_reload
if [[ -z ${REPLACING_VERSIONS} ]] ; then
elog "If you need multipath on your system, you must"
elog "add 'multipath' into your boot runlevel!"
fi
}
pkg_postrm() {
udev_reload
}