commit:     e19885eda75078e2cd34684af9f28fc9c79e0361
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 25 08:39:00 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 25 08:49:32 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e19885ed

sys-apps/ipmiutil: add 3.2.1

Bug: https://bugs.gentoo.org/863590
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/ipmiutil/Manifest              |  1 +
 sys-apps/ipmiutil/ipmiutil-3.2.1.ebuild | 86 +++++++++++++++++++++++++++++++++
 2 files changed, 87 insertions(+)

diff --git a/sys-apps/ipmiutil/Manifest b/sys-apps/ipmiutil/Manifest
index dbfacc86ff5a..110b92efc3c9 100644
--- a/sys-apps/ipmiutil/Manifest
+++ b/sys-apps/ipmiutil/Manifest
@@ -1 +1,2 @@
 DIST ipmiutil-3.1.9.tar.gz 1876478 BLAKE2B 
ddbd4d91d1d09fd9a7d4f7a3f9358787cab1baf3e2f34e43b4ebf44843d9ccc8d8b241b030d0f62a4b183ac4642c6676b304a51b8c6611f69d475dd19c1d3181
 SHA512 
3c9f60669dd6769dc64977c99d68fc0a0838993fb5ef3d8b1b1026b6daf6e6bfbe8738f3dd120b116fc663c84bafe6ed93420a92fecf57a17785d283b415d9c7
+DIST ipmiutil-3.2.1.tar.gz 1745071 BLAKE2B 
dab369c727a48ae517c1028ef2d68164e980744ef1809e09f9e8d92fcbbdb311d9aaf8efc5477b26d322c65741b104fb0442976e876778c03ca8b6b68026ba28
 SHA512 
ddb8cee46306c06ef9f0daa6298e1ef92523b050a036beb7230973f1e0ab7cd8e3576202fc6d76fc80a39f57d4ac3c79210dfffe5b486bb11467b53597ce6a6a

diff --git a/sys-apps/ipmiutil/ipmiutil-3.2.1.ebuild 
b/sys-apps/ipmiutil/ipmiutil-3.2.1.ebuild
new file mode 100644
index 000000000000..db63f0c238b2
--- /dev/null
+++ b/sys-apps/ipmiutil/ipmiutil-3.2.1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools systemd
+
+DESCRIPTION="IPMI Management Utilities"
+HOMEPAGE="https://ipmiutil.sourceforge.net/";
+SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz";
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~x86"
+IUSE="static-libs"
+
+RDEPEND=">=dev-libs/openssl-1:="
+DEPEND="
+       ${RDEPEND}
+       virtual/os-headers
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-2.9.9-lib_symlink.patch
+       "${FILESDIR}"/${PN}-3.1.8-fix-configure.patch
+)
+
+src_prepare() {
+       default
+
+       # Fix hardcoded CFLAGS
+       sed -i \
+               -e 's|-O2 -g|$(CFLAGS)|g' \
+               -e 's|-g -O2|$(CFLAGS)|g' \
+               util/Makefile.am* || die
+
+       # The configure script makes some guarded and some blind calls to rpm &
+       # rpmbuild, that trigger sandbox warnings if rpm is installed in Gentoo.
+       sed -r -i -e 's/which rpm/false &/' configure.ac || die
+       sed -r -i -e 's/`(rpm|rpmbuild)/`false \1/' configure.ac || die
+       # Don't try to inject -O2 or hardening flags (which we set in the 
toolchain).
+       sed -i -e '/CFLAGS="-O2"/d' -e '/cfhard=/d' configure.ac || die
+
+       # Don't compress man pages
+       sed '/gzip -nf/d' -i doc/Makefile.am || die
+
+       eautoreconf
+}
+
+src_configure() {
+       local myeconfargs=(
+               --disable-systemd
+               --enable-sha256
+               --enable-lanplus
+       )
+       econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+       # Ugly workaround. Upstream is misusing the make system here
+       # and it doesn't even work.
+       # Please check on each bump if this workaround is still required.
+       # Yup, still needed in 3.18
+       pushd lib/lanplus &>/dev/null || die
+       emake
+       cp libipmi_lanplus.a .. || die
+       popd &>/dev/null || die
+
+       emake
+}
+
+src_install() {
+       emake DESTDIR="${D}" sysdto="${D}/$(systemd_get_systemunitdir)" install
+       dodoc -r AUTHORS ChangeLog NEWS README TODO doc/UserGuide
+
+       # Init scripts are only for Fedora
+       # TODO: ship OpenRC systems for non-systemd?
+       rm -r "${ED}"/etc/init.d || die 'remove initscripts failed'
+
+       # --disable-static has no effect
+       if ! use static-libs ; then
+               find "${ED}" -type f -name '*.a' -delete || die
+       fi
+
+       keepdir /var/lib/ipmiutil
+}

Reply via email to