multipath-tools-0.6.2.ebuild 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit eutils systemd toolchain-funcs udev
  5. DESCRIPTION="Device mapper target autoconfig"
  6. HOMEPAGE="http://christophe.varoqui.free.fr/"
  7. COMMIT_ID='e165b73a16fc9027aa3306df40052038c175be1b'
  8. SRC_URI="http://git.opensvc.com/?p=multipath-tools/.git;a=snapshot;h=${COMMIT_ID};sf=tgz -> ${P}.tar.gz"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
  12. IUSE="systemd"
  13. RDEPEND=">=sys-fs/lvm2-2.02.45
  14. >=virtual/udev-171
  15. dev-libs/libaio
  16. dev-libs/userspace-rcu
  17. sys-libs/readline
  18. systemd? ( sys-apps/systemd )"
  19. DEPEND="${RDEPEND}
  20. virtual/pkgconfig"
  21. S="${WORKDIR}/${PN}-${COMMIT_ID:0:7}"
  22. PATCHES=(
  23. "${FILESDIR}"/${PN}-0.6.2-makefile.patch
  24. )
  25. src_compile() {
  26. # LIBDM_API_FLUSH involves grepping files in /usr/include,
  27. # so force the test to go the way we want #411337.
  28. emake LIBDM_API_FLUSH=1 CC="$(tc-getCC)" SYSTEMD=$(usex systemd 1 "")
  29. }
  30. src_install() {
  31. local udevdir="$(get_udevdir)"
  32. dodir /sbin /usr/share/man/man{5,8}
  33. emake \
  34. DESTDIR="${D}" \
  35. SYSTEMD=$(usex systemd 1 "") \
  36. unitdir="$(systemd_get_systemunitdir)" \
  37. libudevdir='${prefix}'/"${udevdir}" \
  38. install
  39. newinitd "${FILESDIR}"/rc-multipathd multipathd
  40. newinitd "${FILESDIR}"/multipath.rc multipath
  41. dodoc README ChangeLog
  42. }
  43. pkg_postinst() {
  44. if [[ -z ${REPLACING_VERSIONS} ]]; then
  45. elog "If you need multipath on your system, you must"
  46. elog "add 'multipath' into your boot runlevel!"
  47. fi
  48. }