1 # Copyright 1999-2020 Gentoo Authors
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 http://http.debian.net/debian/pool/main/i/${PN}/${DEBIAN_PF}.tar.xz"
14 # https://launchpad.net/ubuntu/+archive/primary/+files/${DEBIAN_PF}.tar.xz
15 #IUSE="freeipmi openipmi status"
16 IUSE="libressl openipmi static"
18 KEYWORDS="amd64 hppa ~ia64 ppc ~ppc64 x86"
22 !libressl? ( dev-libs/openssl:0= )
23 libressl? ( dev-libs/libressl:0= )
26 openipmi? ( sys-libs/openipmi )
28 #freeipmi? ( sys-libs/freeipmi )
29 # ipmitool CAN build against || ( sys-libs/openipmi sys-libs/freeipmi )
30 # but it doesn't actually need either.
33 "${FILESDIR}"/${P}-openssl-1.1.patch
38 [ -d "${S}"/debian ] && mv "${S}"/debian{,.package}
39 ln -s "${WORKDIR}"/debian "${S}"
40 for p in $(grep -v "^#" debian/patches/series) ; do
41 eapply debian/patches/$p
48 # - LIPMI and BMC are the Solaris libs
49 # - OpenIPMI is unconditionally enabled in the configure as there is compat
50 # code that is used if the library itself is not available
51 # FreeIPMI does build now, but is disabled until the other arches keyword it
52 # `use_enable freeipmi intf-free` \
53 # --enable-ipmievd is now unconditional
55 $(use_enable static) \
58 --enable-intf-lanplus \
60 --enable-intf-serial \
62 --disable-intf-dummy \
65 --disable-intf-lipmi \
66 --disable-internal-md5 \
67 --with-kerneldir=/usr --bindir=/usr/sbin
69 # Fix linux/ipmi.h to compile properly. This is a hack since it doesn't
70 # include the below file to define some things.
71 echo "#include <asm/byteorder.h>" >>config.h
75 emake DESTDIR="${D}" PACKAGE="${PF}" install
78 dosbin contrib/bmclanconf
79 rm -f "${D}"/usr/share/doc/${PF}/COPYING
82 dodoc collect_data.sh create_rrds.sh create_webpage_compact.sh create_webpage.sh README
84 newinitd "${FILESDIR}"/${PN}-1.8.9-ipmievd.initd ipmievd
85 newconfd "${FILESDIR}"/${PN}-1.8.9-ipmievd.confd ipmievd
86 # TODO: init script for contrib/bmc-snmp-proxy
87 # TODO: contrib/exchange-bmc-os-info