www-client/google-chrome-beta: automated update (84.0.4147.30)
[gentoo.git] / sys-apps / ipmitool / ipmitool-1.8.17-r1.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit autotools eutils
6
7 DESCRIPTION="Utility for controlling IPMI enabled devices."
8 HOMEPAGE="http://ipmitool.sf.net/"
9 DEBIAN_PR="1.debian"
10 DEBIAN_P="${P/-/_}"
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"
16 SLOT="0"
17 KEYWORDS="amd64 hppa ~ia64 ppc x86"
18 LICENSE="BSD"
19
20 RDEPEND="
21         !libressl? ( dev-libs/openssl:0= )
22         libressl? ( dev-libs/libressl:0= )
23         sys-libs/readline:0="
24 DEPEND="${RDEPEND}
25                 openipmi? ( sys-libs/openipmi )
26                 virtual/os-headers"
27                 #freeipmi? ( sys-libs/freeipmi )
28 # ipmitool CAN build against || ( sys-libs/openipmi sys-libs/freeipmi )
29 # but it doesn't actually need either.
30
31 src_prepare() {
32         default
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
37         done
38
39         eautoreconf
40 }
41
42 src_configure() {
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
49         econf \
50                 $(use_enable static) \
51                 --enable-ipmishell \
52                 --enable-intf-lan \
53                 --enable-intf-lanplus \
54                 --enable-intf-open \
55                 --enable-intf-serial \
56                 --disable-intf-bmc \
57                 --disable-intf-dummy \
58                 --disable-intf-free \
59                 --disable-intf-imb \
60                 --disable-intf-lipmi \
61                 --disable-internal-md5 \
62                 --with-kerneldir=/usr --bindir=/usr/sbin
63
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
67 }
68
69 src_install() {
70         emake DESTDIR="${D}" PACKAGE="${PF}" install
71
72         into /usr
73         dosbin contrib/bmclanconf
74         rm -f "${D}"/usr/share/doc/${PF}/COPYING
75         docinto contrib
76         cd "${S}"/contrib
77         dodoc collect_data.sh create_rrds.sh create_webpage_compact.sh create_webpage.sh README
78
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
83 }