summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-libs/freeipmi
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-libs/freeipmi')
-rw-r--r--sys-libs/freeipmi/Manifest4
-rw-r--r--sys-libs/freeipmi/files/bmc-watchdog.confd44
-rw-r--r--sys-libs/freeipmi/files/bmc-watchdog.initd.315
-rw-r--r--sys-libs/freeipmi/files/bmc-watchdog.initd.420
-rw-r--r--sys-libs/freeipmi/files/freeipmi-1.1.1-strictaliasing.patch13
-rw-r--r--sys-libs/freeipmi/files/freeipmi.icinga4
-rw-r--r--sys-libs/freeipmi/files/ipmidetectd.confd5
-rw-r--r--sys-libs/freeipmi/files/ipmiseld.confd5
-rw-r--r--sys-libs/freeipmi/freeipmi-1.2.2.ebuild82
-rw-r--r--sys-libs/freeipmi/freeipmi-1.4.3.ebuild96
-rw-r--r--sys-libs/freeipmi/freeipmi-1.4.6-r1.ebuild93
-rw-r--r--sys-libs/freeipmi/freeipmi-1.4.8.ebuild93
-rw-r--r--sys-libs/freeipmi/metadata.xml11
13 files changed, 485 insertions, 0 deletions
diff --git a/sys-libs/freeipmi/Manifest b/sys-libs/freeipmi/Manifest
new file mode 100644
index 000000000000..4d265f6fe304
--- /dev/null
+++ b/sys-libs/freeipmi/Manifest
@@ -0,0 +1,4 @@
+DIST freeipmi-1.2.2.tar.gz 3031730 SHA256 c8539a8225616e3e647b99903ef1243c5a6a4e1c7bd009399bd8bacf3b263b9c SHA512 86ea9a073ec275b3594e93c7e7fdef2b7214dcd3e696fdec4a017841d4bb7e2179a407d91aa11b26c952cf5b06262801b41293642ed38220d57112a37878a5f4 WHIRLPOOL 763a46cea7bfd1a5e18fae79094a73bd86173a73a8b8d150b3f938bc51c8da6c18db5105ece7ca8f3821254de19bc4e2b2429aac66b260c36426f789be176243
+DIST freeipmi-1.4.3.tar.gz 3089282 SHA256 2d8701555f7fd5c3cdc0186e2e435d2ed7945047d22b66088f1e5417dcc35386 SHA512 88a2dec70696017407aac313628407200ee2c6600547fbff73c6880ae8d65cda166c8e00e0f4b7eaddc35f4376143b8fdb0b4ac284aba401c2592a95804e6cec WHIRLPOOL 36c05750f58d018768c82b2a9531892c8c933a7f7b92ea4513dd3527d27494993f82b59d621558bc2975585f51bc6b555b85e246bec1e79704947ac7591cf08b
+DIST freeipmi-1.4.6.tar.gz 3182413 SHA256 6e404329378aed4ea2078575d7a8787820da3c8e1412b309ab8643f0284626af SHA512 52561ffe0c7b8d29431be6d89b4f4072361c8543a877f005a0190682dbdc739c716b6cfba4e6c6ac26324a94930c5d90554dd06bfd7310f723f8e7dd32432fe3 WHIRLPOOL 391ba17833d64e450bf6e273c7bcca8fdf036ff612f1a3d2be2bb1bbfc3e2dff418f997e78fcdc32571dae40077c2e3089d1002717ee61c8cd4d93dc8b1d42d4
+DIST freeipmi-1.4.8.tar.gz 3185068 SHA256 9fa7e9df7f848445cf6035b26b4167a79711ecc05d8e96ab16bbec10b36e551b SHA512 3cd4acde402bbc945b007e31e7f8dad3ad4539d2cf00310e9168d7cec8024203a280c8ad91e3f08b86dfa9be536779969c5393c4523df2fe8eb904f765fcfc56 WHIRLPOOL ae4393fd36271238597f1602fbaaa6c975268291d26ae3303d9bb1b447cc40070ff4c66ac56a7c301f0544f69ab54eb49a9c6f81fdbdc83ab4d89f3f253b3701
diff --git a/sys-libs/freeipmi/files/bmc-watchdog.confd b/sys-libs/freeipmi/files/bmc-watchdog.confd
new file mode 100644
index 000000000000..4d39cf4d8b7d
--- /dev/null
+++ b/sys-libs/freeipmi/files/bmc-watchdog.confd
@@ -0,0 +1,44 @@
+#
+# This configuration file controls the behaviour of the bmc-watchdog daemon
+# from FreeIPMI.
+#
+# -u INT, --timer-use=INT
+# Set timer use. The timer use value can be set to one of the
+# following: 1 = BIOS FRB2, 2 = BIOS POST, 3 = OS_LOAD, 4 = SMS
+# OS, 5 = OEM.
+#
+# -p INT, --pre-timeout-interrupt=INT
+# Set pre-timeout interrupt. The pre timeout interrupt can be set
+# to one of the following: 0 = None, 1 = SMI, 2 = NMI, 3 = Messag-
+# ing Interrupt.
+#
+# -a INT, --timeout-action=INT
+# Set timeout action. The timeout action can be set to one of the
+# following: 0 = No action, 1 = Hard Reset, 2 = Power Down, 3 =
+# Power Cycle.
+#
+# -F, --clear-bios-frb2
+# Clear BIOS FRB2 Timer Use Flag.
+#
+# -P, --clear-bios-post
+# Clear BIOS POST Timer Use Flag.
+#
+# -L, --clear-os-load
+# Clear OS Load Timer Use Flag.
+#
+# -S, --clear-sms-os
+# Clear SMS/OS Timer Use Flag.
+#
+# -O, --clear-oem
+# Clear OEM Timer Use Flag.
+#
+# -i SECS, --initial-countdown=SECS
+# Set initial countdown in seconds.
+#
+# -e, --reset-period
+# Time interval to wait before resetting timer. The default is 60
+# seconds.
+#
+# For the remaining options, consult man bmc-watchdog
+#
+OPTIONS="-d -u 4 -p 0 -a 1 -F -P -L -S -O -i 900 -e 60"
diff --git a/sys-libs/freeipmi/files/bmc-watchdog.initd.3 b/sys-libs/freeipmi/files/bmc-watchdog.initd.3
new file mode 100644
index 000000000000..e662c9537aae
--- /dev/null
+++ b/sys-libs/freeipmi/files/bmc-watchdog.initd.3
@@ -0,0 +1,15 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_commands="condrestart"
+description_condrestart="Restart the service only if started already"
+
+command="/usr/sbin/${SVCNAME}"
+command_args="${OPTIONS}"
+pidfile=/var/run/$SVCNAME.pid
+
+condrestart() {
+ service_started && restart
+}
diff --git a/sys-libs/freeipmi/files/bmc-watchdog.initd.4 b/sys-libs/freeipmi/files/bmc-watchdog.initd.4
new file mode 100644
index 000000000000..88999eddc99e
--- /dev/null
+++ b/sys-libs/freeipmi/files/bmc-watchdog.initd.4
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_commands="condrestart"
+description_condrestart="Restart the service only if started already"
+
+command="/usr/sbin/${SVCNAME}"
+command_args="${OPTIONS}"
+pidfile=/var/run/$SVCNAME.pid
+
+depend() {
+ need localmount
+ use logger
+}
+
+condrestart() {
+ service_started && restart
+}
diff --git a/sys-libs/freeipmi/files/freeipmi-1.1.1-strictaliasing.patch b/sys-libs/freeipmi/files/freeipmi-1.1.1-strictaliasing.patch
new file mode 100644
index 000000000000..ecbb77f216fb
--- /dev/null
+++ b/sys-libs/freeipmi/files/freeipmi-1.1.1-strictaliasing.patch
@@ -0,0 +1,13 @@
+diff -Nuar freeipmi-1.1.1.orig/libfreeipmi/Makefile.am freeipmi-1.1.1/libfreeipmi/Makefile.am
+--- freeipmi-1.1.1.orig/libfreeipmi/Makefile.am 2012-01-02 19:26:00.000000000 +0000
++++ freeipmi-1.1.1/libfreeipmi/Makefile.am 2012-01-21 20:26:26.957801741 +0000
+@@ -25,7 +25,8 @@
+ -DIPMI_IPCKEY=\"$(localstatedir)/lib/$(PACKAGE_NAME)/ipckey\" \
+ -DIPMI_DEBUG_IPCKEY=\"$(top_builddir)/libfreeipmi/driver/ipmi-semaphores.h\" \
+ -D_GNU_SOURCE \
+- -D_REENTRANT
++ -D_REENTRANT \
++ -fno-strict-aliasing
+
+ libfreeipmi_la_LDFLAGS = \
+ -version-info @LIBFREEIPMI_VERSION_INFO@ $(VERSION_FLAGS) \
diff --git a/sys-libs/freeipmi/files/freeipmi.icinga b/sys-libs/freeipmi/files/freeipmi.icinga
new file mode 100644
index 000000000000..4c4026c72b87
--- /dev/null
+++ b/sys-libs/freeipmi/files/freeipmi.icinga
@@ -0,0 +1,4 @@
+define command {
+ command_name nagios_ipmi_sensors
+ command_line $USER1$/nagios_ipmi_sensors.pl -h $HOSTADDRESS$
+}
diff --git a/sys-libs/freeipmi/files/ipmidetectd.confd b/sys-libs/freeipmi/files/ipmidetectd.confd
new file mode 100644
index 000000000000..74245f14c0c5
--- /dev/null
+++ b/sys-libs/freeipmi/files/ipmidetectd.confd
@@ -0,0 +1,5 @@
+# This configuration file controls the behaviour of the ipmid daemon
+# from FreeIPMI.
+# See `man 8 ipmitdetectd` for further information.
+
+# OPTIONS="-c /etc/freeipmi/ipmidetectd.conf"
diff --git a/sys-libs/freeipmi/files/ipmiseld.confd b/sys-libs/freeipmi/files/ipmiseld.confd
new file mode 100644
index 000000000000..8e40a5c0c8dc
--- /dev/null
+++ b/sys-libs/freeipmi/files/ipmiseld.confd
@@ -0,0 +1,5 @@
+# This configuration file controls the behaviour of the ipmiseld daemon
+# from FreeIPMI.
+# See `man 8 ipmiseld` for further information.
+
+# OPTIONS="--config-file /etc/freeipmi/ipmiseld.conf"
diff --git a/sys-libs/freeipmi/freeipmi-1.2.2.ebuild b/sys-libs/freeipmi/freeipmi-1.2.2.ebuild
new file mode 100644
index 000000000000..a607f57d6449
--- /dev/null
+++ b/sys-libs/freeipmi/freeipmi-1.2.2.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools eutils
+
+DESCRIPTION="Provides Remote-Console and System Management Software as per IPMI v1.5/2.0"
+HOMEPAGE="http://www.gnu.org/software/freeipmi/"
+
+MY_P="${P/_/.}"
+S="${WORKDIR}"/${MY_P}
+[[ ${MY_P} == *.beta* ]] && ALPHA="-alpha"
+SRC_URI="mirror://gnu${ALPHA}/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug"
+
+RDEPEND="dev-libs/libgcrypt:0"
+DEPEND="${RDEPEND}
+ virtual/os-headers"
+RDEPEND="${RDEPEND}
+ sys-apps/openrc"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-1.1.1-strictaliasing.patch
+
+ AT_M4DIR="config" eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ --disable-dependency-tracking \
+ --enable-fast-install \
+ --disable-static \
+ --disable-init-scripts \
+ --localstatedir=/var
+}
+
+# There are no tests
+src_test() { :; }
+
+src_install() {
+ emake DESTDIR="${D}" docdir="/usr/share/doc/${PF}" install
+ find "${D}" -name '*.la' -delete
+
+ # freeipmi by defaults install _all_ commands to /usr/sbin, but
+ # quite a few can be run remotely as standard user, so move them
+ # in /usr/bin afterwards.
+ dodir /usr/bin
+ for file in ipmi{detect,ping,power,console}; do
+ mv "${D}"/usr/{s,}bin/${file} || die
+
+ # The default install symlinks these commands to add a dash
+ # after the ipmi prefix; we repeat those after move for
+ # consistency.
+ rm "${D}"/usr/sbin/${file/ipmi/ipmi-}
+ dosym ${file} /usr/bin/${file/ipmi/ipmi-}
+ done
+
+ dodoc AUTHORS ChangeLog* DISCLAIMER* NEWS README* TODO doc/*.txt
+
+ keepdir \
+ /var/cache/ipmimonitoringsdrcache \
+ /var/lib/freeipmi \
+ /var/log/ipmiconsole
+
+ # starting from version 1.2.0 the two daemons are similar enough
+ newinitd "${FILESDIR}"/bmc-watchdog.initd.4 ipmidetectd
+ newconfd "${FILESDIR}"/ipmidetectd.confd ipmidetectd
+
+ newinitd "${FILESDIR}"/bmc-watchdog.initd.4 bmc-watchdog
+ newconfd "${FILESDIR}"/bmc-watchdog.confd bmc-watchdog
+
+ newinitd "${FILESDIR}"/bmc-watchdog.initd.4 ipmiseld
+ newconfd "${FILESDIR}"/ipmiseld.confd ipmiseld
+}
diff --git a/sys-libs/freeipmi/freeipmi-1.4.3.ebuild b/sys-libs/freeipmi/freeipmi-1.4.3.ebuild
new file mode 100644
index 000000000000..181b80bf5956
--- /dev/null
+++ b/sys-libs/freeipmi/freeipmi-1.4.3.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils multilib autotools-utils
+
+DESCRIPTION="Provides Remote-Console and System Management Software as per IPMI v1.5/2.0"
+HOMEPAGE="http://www.gnu.org/software/freeipmi/"
+
+MY_P="${P/_/.}"
+S="${WORKDIR}"/${MY_P}
+[[ ${MY_P} == *.beta* ]] && ALPHA="-alpha"
+SRC_URI="mirror://gnu${ALPHA}/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+IUSE="debug nagios"
+
+RDEPEND="dev-libs/libgcrypt:0"
+DEPEND="${RDEPEND}
+ virtual/os-headers"
+RDEPEND="${RDEPEND}
+ nagios? (
+ || ( net-analyzer/icinga net-analyzer/nagios )
+ dev-lang/perl
+ )
+ sys-apps/openrc"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.1.1-strictaliasing.patch
+
+ AT_M4DIR="config" eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable debug)
+ --disable-static
+ --disable-init-scripts
+ --localstatedir=/var
+ )
+
+ autotools-utils_src_configure
+}
+
+# There are no tests
+src_test() { :; }
+
+src_install() {
+ autotools-utils_src_install
+
+ # freeipmi by defaults install _all_ commands to /usr/sbin, but
+ # quite a few can be run remotely as standard user, so move them
+ # in /usr/bin afterwards.
+ dodir /usr/bin
+ for file in ipmi{detect,ping,power,console}; do
+ mv "${D}"/usr/{s,}bin/${file} || die
+
+ # The default install symlinks these commands to add a dash
+ # after the ipmi prefix; we repeat those after move for
+ # consistency.
+ rm "${D}"/usr/sbin/${file/ipmi/ipmi-}
+ dosym ${file} /usr/bin/${file/ipmi/ipmi-}
+ done
+
+ # Install the nagios plugin in its proper place, if desired
+ if use nagios; then
+ dodir /usr/$(get_libdir)/nagios/plugins
+ mv "${D}"/usr/share/doc/${PF}/contrib/nagios/nagios_ipmi_sensors.pl \
+ "${D}"/usr/$(get_libdir)/nagios/plugins/ || die
+ fperms 0755 /usr/$(get_libdir)/nagios/plugins/nagios_ipmi_sensors.pl
+
+ insinto /etc/icinga/conf.d
+ newins "${FILESDIR}"/freeipmi.icinga freeipmi-command.cfg
+ fi
+
+ dodoc AUTHORS ChangeLog* DISCLAIMER* NEWS README* TODO doc/*.txt
+
+ keepdir \
+ /var/cache/ipmimonitoringsdrcache \
+ /var/lib/freeipmi \
+ /var/log/ipmiconsole
+
+ # starting from version 1.2.0 the two daemons are similar enough
+ newinitd "${FILESDIR}"/bmc-watchdog.initd.4 ipmidetectd
+ newconfd "${FILESDIR}"/ipmidetectd.confd ipmidetectd
+
+ newinitd "${FILESDIR}"/bmc-watchdog.initd.4 bmc-watchdog
+ newconfd "${FILESDIR}"/bmc-watchdog.confd bmc-watchdog
+
+ newinitd "${FILESDIR}"/bmc-watchdog.initd.4 ipmiseld
+ newconfd "${FILESDIR}"/ipmiseld.confd ipmiseld
+}
diff --git a/sys-libs/freeipmi/freeipmi-1.4.6-r1.ebuild b/sys-libs/freeipmi/freeipmi-1.4.6-r1.ebuild
new file mode 100644
index 000000000000..6ee1c3ea7d03
--- /dev/null
+++ b/sys-libs/freeipmi/freeipmi-1.4.6-r1.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+#AUTOTOOLS_AUTORECONF=1
+AT_M4DIR="config"
+
+inherit eutils multilib autotools-utils
+
+DESCRIPTION="Provides Remote-Console and System Management Software as per IPMI v1.5/2.0"
+HOMEPAGE="http://www.gnu.org/software/freeipmi/"
+
+MY_P="${P/_/.}"
+S="${WORKDIR}"/${MY_P}
+[[ ${MY_P} == *.beta* ]] && ALPHA="-alpha"
+SRC_URI="mirror://gnu${ALPHA}/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug nagios"
+
+RDEPEND="dev-libs/libgcrypt:0"
+DEPEND="${RDEPEND}
+ virtual/os-headers"
+RDEPEND="${RDEPEND}
+ nagios? (
+ || ( net-analyzer/icinga net-analyzer/nagios )
+ dev-lang/perl
+ )
+ sys-apps/openrc"
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable debug)
+ --disable-static
+ --disable-init-scripts
+ --localstatedir=/var
+ )
+
+ autotools-utils_src_configure
+}
+
+# There are no tests
+src_test() { :; }
+
+src_install() {
+ autotools-utils_src_install
+
+ # freeipmi by defaults install _all_ commands to /usr/sbin, but
+ # quite a few can be run remotely as standard user, so move them
+ # in /usr/bin afterwards.
+ dodir /usr/bin
+ for file in ipmi{detect,ping,power,console}; do
+ mv "${D}"/usr/{s,}bin/${file} || die
+
+ # The default install symlinks these commands to add a dash
+ # after the ipmi prefix; we repeat those after move for
+ # consistency.
+ rm "${D}"/usr/sbin/${file/ipmi/ipmi-}
+ dosym ${file} /usr/bin/${file/ipmi/ipmi-}
+ done
+
+ # Install the nagios plugin in its proper place, if desired
+ if use nagios; then
+ dodir /usr/$(get_libdir)/nagios/plugins
+ mv "${D}"/usr/share/doc/${PF}/contrib/nagios/nagios_ipmi_sensors.pl \
+ "${D}"/usr/$(get_libdir)/nagios/plugins/ || die
+ fperms 0755 /usr/$(get_libdir)/nagios/plugins/nagios_ipmi_sensors.pl
+
+ insinto /etc/icinga/conf.d
+ newins "${FILESDIR}"/freeipmi.icinga freeipmi-command.cfg
+ fi
+
+ dodoc AUTHORS ChangeLog* DISCLAIMER* NEWS README* TODO doc/*.txt
+
+ keepdir \
+ /var/cache/ipmimonitoringsdrcache \
+ /var/lib/freeipmi \
+ /var/log/ipmiconsole
+
+ # starting from version 1.2.0 the two daemons are similar enough
+ newinitd "${FILESDIR}"/bmc-watchdog.initd.4 ipmidetectd
+ newconfd "${FILESDIR}"/ipmidetectd.confd ipmidetectd
+
+ newinitd "${FILESDIR}"/bmc-watchdog.initd.4 bmc-watchdog
+ newconfd "${FILESDIR}"/bmc-watchdog.confd bmc-watchdog
+
+ newinitd "${FILESDIR}"/bmc-watchdog.initd.4 ipmiseld
+ newconfd "${FILESDIR}"/ipmiseld.confd ipmiseld
+}
diff --git a/sys-libs/freeipmi/freeipmi-1.4.8.ebuild b/sys-libs/freeipmi/freeipmi-1.4.8.ebuild
new file mode 100644
index 000000000000..340a50929548
--- /dev/null
+++ b/sys-libs/freeipmi/freeipmi-1.4.8.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+#AUTOTOOLS_AUTORECONF=1
+AT_M4DIR="config"
+
+inherit eutils multilib autotools-utils
+
+DESCRIPTION="Provides Remote-Console and System Management Software as per IPMI v1.5/2.0"
+HOMEPAGE="http://www.gnu.org/software/freeipmi/"
+
+MY_P="${P/_/.}"
+S="${WORKDIR}"/${MY_P}
+[[ ${MY_P} == *.beta* ]] && ALPHA="-alpha"
+SRC_URI="mirror://gnu${ALPHA}/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug nagios"
+
+RDEPEND="dev-libs/libgcrypt:0"
+DEPEND="${RDEPEND}
+ virtual/os-headers"
+RDEPEND="${RDEPEND}
+ nagios? (
+ || ( net-analyzer/icinga net-analyzer/nagios )
+ dev-lang/perl
+ )
+ sys-apps/openrc"
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable debug)
+ --disable-static
+ --disable-init-scripts
+ --localstatedir=/var
+ )
+
+ autotools-utils_src_configure
+}
+
+# There are no tests
+src_test() { :; }
+
+src_install() {
+ autotools-utils_src_install
+
+ # freeipmi by defaults install _all_ commands to /usr/sbin, but
+ # quite a few can be run remotely as standard user, so move them
+ # in /usr/bin afterwards.
+ dodir /usr/bin
+ for file in ipmi{detect,ping,power,console}; do
+ mv "${D}"/usr/{s,}bin/${file} || die
+
+ # The default install symlinks these commands to add a dash
+ # after the ipmi prefix; we repeat those after move for
+ # consistency.
+ rm "${D}"/usr/sbin/${file/ipmi/ipmi-}
+ dosym ${file} /usr/bin/${file/ipmi/ipmi-}
+ done
+
+ # Install the nagios plugin in its proper place, if desired
+ if use nagios; then
+ dodir /usr/$(get_libdir)/nagios/plugins
+ mv "${D}"/usr/share/doc/${PF}/contrib/nagios/nagios_ipmi_sensors.pl \
+ "${D}"/usr/$(get_libdir)/nagios/plugins/ || die
+ fperms 0755 /usr/$(get_libdir)/nagios/plugins/nagios_ipmi_sensors.pl
+
+ insinto /etc/icinga/conf.d
+ newins "${FILESDIR}"/freeipmi.icinga freeipmi-command.cfg
+ fi
+
+ dodoc AUTHORS ChangeLog* DISCLAIMER* NEWS README* TODO doc/*.txt
+
+ keepdir \
+ /var/cache/ipmimonitoringsdrcache \
+ /var/lib/freeipmi \
+ /var/log/ipmiconsole
+
+ # starting from version 1.2.0 the two daemons are similar enough
+ newinitd "${FILESDIR}"/bmc-watchdog.initd.4 ipmidetectd
+ newconfd "${FILESDIR}"/ipmidetectd.confd ipmidetectd
+
+ newinitd "${FILESDIR}"/bmc-watchdog.initd.4 bmc-watchdog
+ newconfd "${FILESDIR}"/bmc-watchdog.confd bmc-watchdog
+
+ newinitd "${FILESDIR}"/bmc-watchdog.initd.4 ipmiseld
+ newconfd "${FILESDIR}"/ipmiseld.confd ipmiseld
+}
diff --git a/sys-libs/freeipmi/metadata.xml b/sys-libs/freeipmi/metadata.xml
new file mode 100644
index 000000000000..3ab012f3c9fa
--- /dev/null
+++ b/sys-libs/freeipmi/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sysadmin</herd>
+
+ <use>
+ <flag name='nagios'>
+ Install a nagios plugin to check sensors' status.
+ </flag>
+ </use>
+</pkgmetadata>