www-client/google-chrome-beta: automated update (84.0.4147.30)
[gentoo.git] / sys-apps / ipmitool / ipmitool-1.8.18-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
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         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"
17 SLOT="0"
18 KEYWORDS="amd64 hppa ~ia64 ppc ~ppc64 x86"
19 LICENSE="BSD"
20
21 RDEPEND="
22         !libressl? ( dev-libs/openssl:0= )
23         libressl? ( dev-libs/libressl:0= )
24         sys-libs/readline:0="
25 DEPEND="${RDEPEND}
26                 openipmi? ( sys-libs/openipmi )
27                 virtual/os-headers"
28                 #freeipmi? ( sys-libs/freeipmi )
29 # ipmitool CAN build against || ( sys-libs/openipmi sys-libs/freeipmi )
30 # but it doesn't actually need either.
31
32 PATCHES=(
33         "${FILESDIR}"/${P}-openssl-1.1.patch
34 )
35
36 src_prepare() {
37         default
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
42         done
43
44         eautoreconf
45 }
46
47 src_configure() {
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
54         econf \
55                 $(use_enable static) \
56                 --enable-ipmishell \
57                 --enable-intf-lan \
58                 --enable-intf-lanplus \
59                 --enable-intf-open \
60                 --enable-intf-serial \
61                 --disable-intf-bmc \
62                 --disable-intf-dummy \
63                 --disable-intf-free \
64                 --disable-intf-imb \
65                 --disable-intf-lipmi \
66                 --disable-internal-md5 \
67                 --with-kerneldir=/usr --bindir=/usr/sbin
68
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
72 }
73
74 src_install() {
75         emake DESTDIR="${D}" PACKAGE="${PF}" install
76
77         into /usr
78         dosbin contrib/bmclanconf
79         rm -f "${D}"/usr/share/doc/${PF}/COPYING
80         docinto contrib
81         cd "${S}"/contrib
82         dodoc collect_data.sh create_rrds.sh create_webpage_compact.sh create_webpage.sh README
83
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
88 }