1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit autotools eutils
7 DESCRIPTION="Utility for controlling IPMI enabled devices."
8 HOMEPAGE="http://ipmitool.sf.net/"
11 DEBIAN_PF="${DEBIAN_P}-${DEBIAN_PR}"
12 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
13 https://launchpad.net/ubuntu/+archive/primary/+files/${DEBIAN_PF}.tar.xz"
14 #IUSE="freeipmi openipmi status"
15 IUSE="libressl openipmi static"
17 KEYWORDS="amd64 hppa ~ia64 ppc x86"
21 !libressl? ( dev-libs/openssl:0= )
22 libressl? ( dev-libs/libressl:0= )
25 openipmi? ( sys-libs/openipmi )
27 #freeipmi? ( sys-libs/freeipmi )
28 # ipmitool CAN build against || ( sys-libs/openipmi sys-libs/freeipmi )
29 # but it doesn't actually need either.
33 [ -d "${S}"/debian ] && mv "${S}"/debian{,.package}
34 ln -s "${WORKDIR}"/debian "${S}"
35 for p in $(grep -v "^#" debian/patches/series) ; do
36 eapply debian/patches/$p
43 # - LIPMI and BMC are the Solaris libs
44 # - OpenIPMI is unconditionally enabled in the configure as there is compat
45 # code that is used if the library itself is not available
46 # FreeIPMI does build now, but is disabled until the other arches keyword it
47 # `use_enable freeipmi intf-free` \
48 # --enable-ipmievd is now unconditional
50 $(use_enable static) \
53 --enable-intf-lanplus \
55 --enable-intf-serial \
57 --disable-intf-dummy \
60 --disable-intf-lipmi \
61 --disable-internal-md5 \
62 --with-kerneldir=/usr --bindir=/usr/sbin
64 # Fix linux/ipmi.h to compile properly. This is a hack since it doesn't
65 # include the below file to define some things.
66 echo "#include <asm/byteorder.h>" >>config.h
70 emake DESTDIR="${D}" PACKAGE="${PF}" install
73 dosbin contrib/bmclanconf
74 rm -f "${D}"/usr/share/doc/${PF}/COPYING
77 dodoc collect_data.sh create_rrds.sh create_webpage_compact.sh create_webpage.sh README
79 newinitd "${FILESDIR}"/${PN}-1.8.9-ipmievd.initd ipmievd
80 newconfd "${FILESDIR}"/${PN}-1.8.9-ipmievd.confd ipmievd
81 # TODO: init script for contrib/bmc-snmp-proxy
82 # TODO: contrib/exchange-bmc-os-info