sys-apps/ipmiutil: Bump to version 3.1.4
[gentoo.git] / sys-apps / ipmiutil / ipmiutil-3.1.2.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit autotools systemd
6
7 DESCRIPTION="IPMI Management Utilities"
8 HOMEPAGE="http://ipmiutil.sourceforge.net/"
9 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
10
11 LICENSE="BSD"
12 SLOT="0"
13 KEYWORDS="~amd64 ~hppa ~x86"
14 IUSE="static-libs"
15
16 RDEPEND=">=dev-libs/openssl-1:0="
17 DEPEND="${RDEPEND}
18         virtual/os-headers"
19
20 PATCHES=(
21         "${FILESDIR}"/${PN}-2.9.8-flags.patch
22         "${FILESDIR}"/${PN}-2.9.9-lib_symlink.patch
23 )
24
25 src_prepare() {
26         default
27
28         sed -i -e 's|-O2 -g|$(CFLAGS)|g;s|-g -O2|$(CFLAGS)|g' util/Makefile.am* || die
29         sed -i -e 's|which rpm |which we_are_gentoo_rpm_is_a_guest |' configure.ac || die
30
31         eautoreconf
32 }
33
34 src_configure() {
35         econf --disable-systemd --enable-sha256
36 }
37
38 src_compile() {
39         # Ulgy workaround. Upstream is misusing the make system here
40         # and it doesn't even work.
41         # Please check on each bump if this workaround is still required.
42         pushd lib/lanplus &>/dev/null || die
43         emake || die "emake lanplus failed"
44         cp libipmi_lanplus.a .. || die
45         popd &>/dev/null || die
46
47         emake
48 }
49
50 src_install() {
51         emake DESTDIR="${D}" sysdto="${D}/$(systemd_get_systemunitdir)" install
52         dodoc -r AUTHORS ChangeLog NEWS README TODO doc/UserGuide
53
54         # Init scripts are only for Fedora
55         rm -r "${ED%/}"/etc/init.d || die 'remove initscripts failed'
56
57         if ! use static-libs ; then
58                 find "${ED}" -name '*.a' -delete || die
59         fi
60
61         keepdir /var/lib/ipmiutil
62 }