freeipmi-1.2.2.ebuild 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit autotools eutils
  5. DESCRIPTION="Provides Remote-Console and System Management Software as per IPMI v1.5/2.0"
  6. HOMEPAGE="https://www.gnu.org/software/freeipmi/"
  7. MY_P="${P/_/.}"
  8. S="${WORKDIR}"/${MY_P}
  9. [[ ${MY_P} == *.beta* ]] && ALPHA="-alpha"
  10. SRC_URI="mirror://gnu${ALPHA}/${PN}/${MY_P}.tar.gz"
  11. LICENSE="GPL-3"
  12. SLOT="0"
  13. KEYWORDS="amd64 x86"
  14. IUSE="debug"
  15. RDEPEND="dev-libs/libgcrypt:0"
  16. DEPEND="${RDEPEND}
  17. virtual/os-headers"
  18. RDEPEND="${RDEPEND}
  19. sys-apps/openrc"
  20. src_prepare() {
  21. epatch \
  22. "${FILESDIR}"/${PN}-1.1.1-strictaliasing.patch
  23. AT_M4DIR="config" eautoreconf
  24. }
  25. src_configure() {
  26. econf \
  27. $(use_enable debug) \
  28. --disable-dependency-tracking \
  29. --enable-fast-install \
  30. --disable-static \
  31. --disable-init-scripts \
  32. --localstatedir=/var
  33. }
  34. # There are no tests
  35. src_test() { :; }
  36. src_install() {
  37. emake DESTDIR="${D}" docdir="/usr/share/doc/${PF}" install
  38. find "${D}" -name '*.la' -delete
  39. # freeipmi by defaults install _all_ commands to /usr/sbin, but
  40. # quite a few can be run remotely as standard user, so move them
  41. # in /usr/bin afterwards.
  42. dodir /usr/bin
  43. for file in ipmi{detect,ping,power,console}; do
  44. mv "${D}"/usr/{s,}bin/${file} || die
  45. # The default install symlinks these commands to add a dash
  46. # after the ipmi prefix; we repeat those after move for
  47. # consistency.
  48. rm "${D}"/usr/sbin/${file/ipmi/ipmi-}
  49. dosym ${file} /usr/bin/${file/ipmi/ipmi-}
  50. done
  51. dodoc AUTHORS ChangeLog* DISCLAIMER* NEWS README* TODO doc/*.txt
  52. keepdir \
  53. /var/cache/ipmimonitoringsdrcache \
  54. /var/lib/freeipmi \
  55. /var/log/ipmiconsole
  56. # starting from version 1.2.0 the two daemons are similar enough
  57. newinitd "${FILESDIR}"/bmc-watchdog.initd.4 ipmidetectd
  58. newconfd "${FILESDIR}"/ipmidetectd.confd ipmidetectd
  59. newinitd "${FILESDIR}"/bmc-watchdog.initd.4 bmc-watchdog
  60. newconfd "${FILESDIR}"/bmc-watchdog.confd bmc-watchdog
  61. newinitd "${FILESDIR}"/bmc-watchdog.initd.4 ipmiseld
  62. newconfd "${FILESDIR}"/ipmiseld.confd ipmiseld
  63. }