ipmitool-1.8.18-r1.ebuild 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit autotools eutils
  5. DESCRIPTION="Utility for controlling IPMI enabled devices."
  6. HOMEPAGE="http://ipmitool.sf.net/"
  7. DEBIAN_PR="1.debian"
  8. DEBIAN_P="${P/-/_}"
  9. DEBIAN_PF="${DEBIAN_P}-${DEBIAN_PR}"
  10. SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
  11. http://http.debian.net/debian/pool/main/i/${PN}/${DEBIAN_PF}.tar.xz"
  12. # https://launchpad.net/ubuntu/+archive/primary/+files/${DEBIAN_PF}.tar.xz
  13. #IUSE="freeipmi openipmi status"
  14. IUSE="libressl openipmi static"
  15. SLOT="0"
  16. KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~x86"
  17. LICENSE="BSD"
  18. RDEPEND="
  19. !libressl? ( dev-libs/openssl:0= )
  20. libressl? ( dev-libs/libressl:0= )
  21. sys-libs/readline:0="
  22. DEPEND="${RDEPEND}
  23. openipmi? ( sys-libs/openipmi )
  24. virtual/os-headers"
  25. #freeipmi? ( sys-libs/freeipmi )
  26. # ipmitool CAN build against || ( sys-libs/openipmi sys-libs/freeipmi )
  27. # but it doesn't actually need either.
  28. src_prepare() {
  29. default
  30. [ -d "${S}"/debian ] && mv "${S}"/debian{,.package}
  31. ln -s "${WORKDIR}"/debian "${S}"
  32. for p in $(grep -v "^#" debian/patches/series) ; do
  33. eapply debian/patches/$p
  34. done
  35. eautoreconf
  36. }
  37. src_configure() {
  38. # - LIPMI and BMC are the Solaris libs
  39. # - OpenIPMI is unconditionally enabled in the configure as there is compat
  40. # code that is used if the library itself is not available
  41. # FreeIPMI does build now, but is disabled until the other arches keyword it
  42. # `use_enable freeipmi intf-free` \
  43. # --enable-ipmievd is now unconditional
  44. econf \
  45. $(use_enable static) \
  46. --enable-ipmishell \
  47. --enable-intf-lan \
  48. --enable-intf-lanplus \
  49. --enable-intf-open \
  50. --enable-intf-serial \
  51. --disable-intf-bmc \
  52. --disable-intf-dummy \
  53. --disable-intf-free \
  54. --disable-intf-imb \
  55. --disable-intf-lipmi \
  56. --disable-internal-md5 \
  57. --with-kerneldir=/usr --bindir=/usr/sbin
  58. # Fix linux/ipmi.h to compile properly. This is a hack since it doesn't
  59. # include the below file to define some things.
  60. echo "#include <asm/byteorder.h>" >>config.h
  61. }
  62. src_install() {
  63. emake DESTDIR="${D}" PACKAGE="${PF}" install
  64. into /usr
  65. dosbin contrib/bmclanconf
  66. rm -f "${D}"/usr/share/doc/${PF}/COPYING
  67. docinto contrib
  68. cd "${S}"/contrib
  69. dodoc collect_data.sh create_rrds.sh create_webpage_compact.sh create_webpage.sh README
  70. newinitd "${FILESDIR}"/${PN}-1.8.9-ipmievd.initd ipmievd
  71. newconfd "${FILESDIR}"/${PN}-1.8.9-ipmievd.confd ipmievd
  72. # TODO: init script for contrib/bmc-snmp-proxy
  73. # TODO: contrib/exchange-bmc-os-info
  74. }