diff options
author | Georgy Yakovlev <gyakovlev@gentoo.org> | 2022-09-14 15:08:09 -0700 |
---|---|---|
committer | Georgy Yakovlev <gyakovlev@gentoo.org> | 2022-09-14 15:14:23 -0700 |
commit | a18dfbf98d9f0bf122257a4cf9e1abd321faa109 (patch) | |
tree | 081ade578591d1aa972fbdaf35ba17a2737a0537 | |
parent | sys-apps/portage: Stabilize 3.0.36 amd64, #869887 (diff) | |
download | gentoo-a18dfbf98d9f0bf122257a4cf9e1abd321faa109.tar.gz gentoo-a18dfbf98d9f0bf122257a4cf9e1abd321faa109.tar.bz2 gentoo-a18dfbf98d9f0bf122257a4cf9e1abd321faa109.zip |
sys-apps/ipmi-fan-control: add 9999
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
-rw-r--r-- | sys-apps/ipmi-fan-control/ipmi-fan-control-9999.ebuild | 58 |
1 files changed, 58 insertions, 0 deletions
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 +} |