From a18dfbf98d9f0bf122257a4cf9e1abd321faa109 Mon Sep 17 00:00:00 2001 From: Georgy Yakovlev Date: Wed, 14 Sep 2022 15:08:09 -0700 Subject: sys-apps/ipmi-fan-control: add 9999 Signed-off-by: Georgy Yakovlev --- .../ipmi-fan-control/ipmi-fan-control-9999.ebuild | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 sys-apps/ipmi-fan-control/ipmi-fan-control-9999.ebuild (limited to 'sys-apps/ipmi-fan-control') diff --git a/sys-apps/ipmi-fan-control/ipmi-fan-control-9999.ebuild b/sys-apps/ipmi-fan-control/ipmi-fan-control-9999.ebuild new file mode 100644 index 000000000000..34f602de380e --- /dev/null +++ b/sys-apps/ipmi-fan-control/ipmi-fan-control-9999.ebuild @@ -0,0 +1,58 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CRATES=" +" + +inherit cargo optfeature systemd + +DESCRIPTION="SuperMicro IPMI fan control daemon" +HOMEPAGE="https://github.com/chenxiaolong/ipmi-fan-control" + +if [[ ${PV} == 9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/chenxiaolong/${PN}" +else + SRC_URI="https://github.com/chenxiaolong/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz + $(cargo_crate_uris)" + # supported boards are x86_64 only, do not keyword elsewhere + # technically it could run on remote host and issue commands via ipmitool lanplus, but that's very edgy case + KEYWORDS="-* ~amd64" +fi + +LICENSE="MIT 0BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD Boost-1.0 GPL-3+ MIT Unicode-DFS-2016 Unlicense ZLIB" +SLOT="0" + +RDEPEND="sys-apps/ipmitool" + +QA_FLAGS_IGNORED="usr/bin/${PN}" + +src_unpack() { + if [[ ${PV} == 9999 ]]; then + git-r3_src_unpack + cargo_live_src_unpack + else + cargo_src_unpack + fi +} + +src_install() { + cargo_src_install + + sed -i \ + -e "s|@BINDIR@|${EPREFIX}/usr/bin|" \ + -e "s|@SYSCONFDIR@|${EPREFIX}/etc|" \ + dist/ipmi-fan-control.service.in || die + + # TODO: add openrc service + systemd_newunit dist/ipmi-fan-control.service.in ipmi-fan-control.service + + insinto /etc + newins config.sample.toml "${PN}".toml +} + +pkg_postinst() { + optfeature "S.M.A.R.T. drive temperature support" sys-apps/smartmontools +} -- cgit v1.2.3-65-gdbad