sys-apps/coolercontrold: add 4.0.1

Signed-off-by: Alfred Wingate <parona@protonmail.com>
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
This commit is contained in:
Paul Zander
2026-03-12 16:00:46 +01:00
parent 119158af8f
commit 31e055ac98
2 changed files with 121 additions and 0 deletions

View File

@@ -1,2 +1,4 @@
DIST coolercontrol-3.1.1.tar.gz 9191127 BLAKE2B 8d495119c8fca6194f3a205945d1a60691e5653d2ca32be33dc0d0fc59f2b7da7198a2e2c1d3afba7cf9b0b78066fbb2fe7dbe9d5e31b56ff044412715a01620 SHA512 a0686ff0ffbd6aab1f8c38f48d04279ff477ab6c6c6e4ba2d46524fb21d80730e09394036afb41e7893d59d726777f655e31e6764bb8892e2b97665b83209cfe
DIST coolercontrol-4.0.1.tar.gz 9462039 BLAKE2B b35a3a6a3c5b0e9a80a90bb282d1704c92ab06d751c8a39fce1ff9ce1bb2c778ba024ccd7980a2dae6ded8cafc87931363f8804277d90f5e856fd22f346b07ae SHA512 3b32ed002c26b4492badf4fff6a174164931d6c6ca4a142754102356d36c727473122483b39ae977e7abfb4867a75936d9e69168ba8c87712157ca676dd6d385
DIST coolercontrold-3.1.1-vendor.tar.gz 72559141 BLAKE2B d7f35e6e53a472a8bfd04329f7e3800bdc21aecfd72913b82195df4d6437e3fa99639648e75b4e3e4f0bb5de4c93deddd320f3f4495acb3d23652b9c594b4183 SHA512 162523da13e33a258b5600fdb979049178a331d6b1b8bf73c027aa9e6fa83ee060f7bc8825e6d21217a919a5aff74e83d182eba7e541ca89ad388aae7cae7c51
DIST coolercontrold-4.0.1-vendor.tar.gz 87396383 BLAKE2B ce56f56f4ba33301b9a35c284f73fbeeec066e4441a9fa75b77a9fac575541b7c7e1468db89c26c27881cfd65748ffdc3b4737ceb02887c27ef001bb156840fa SHA512 f4120818aa46798fb609d24bc91da3fa283e6e6102b0801b1c047f5ce67cf4f31a11f29d0dd8f0362c8d17c5f6986a12ce7076be24cdad1610944940321e5e2e

View File

@@ -0,0 +1,119 @@
# Copyright 2024-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Vendored aws-lc
# https://github.com/aws/aws-lc-rs/issues/936
CRATES="
"
RUST_MIN_VER="1.87.0"
PYTHON_COMPAT=( python3_{12..14} )
inherit cargo eapi9-ver optfeature python-single-r1 systemd
DESCRIPTION="Monitor and control your cooling and other devices (daemon)"
HOMEPAGE="https://gitlab.com/coolercontrol/coolercontrol"
MY_P="coolercontrol-${PV}"
SRC_URI="
https://gitlab.com/coolercontrol/coolercontrol/-/releases/${PV}/downloads/packages/${MY_P}.tar.gz
https://gitlab.com/coolercontrol/coolercontrol/-/releases/${PV}/downloads/packages/coolercontrold-vendor.tar.gz
-> ${P}-vendor.tar.gz
${CARGO_CRATE_URIS}
"
S="${WORKDIR}/${MY_P}/${PN}"
LICENSE="GPL-3+"
# https://gitlab.com/coolercontrol/coolercontrol/-/blob/main/coolercontrold/cc-detect/README.md#attribution
LICENSE+=" GPL-2+"
# Dependent crate licenses
LICENSE+="
AGPL-3+ Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD GPL-3+
ISC MIT UoI-NCSA openssl Unicode-3.0 ZLIB
"
SLOT="0"
KEYWORDS="~amd64"
IUSE="liquidctl"
REQUIRED_USE="liquidctl? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND="
app-arch/zstd:=
liquidctl? (
${PYTHON_DEPS}
$(python_gen_cond_dep '
app-misc/liquidctl[${PYTHON_USEDEP}]
')
)
"
DEPEND="${RDEPEND}"
BDEPEND="dev-libs/protobuf[protoc(+)]"
QA_FLAGS_IGNORED=".*"
PATCHES=(
"${FILESDIR}"/coolercontrold-4.0.1-liquidctl.patch
)
pkg_setup() {
rust_pkg_setup
use liquidctl && python-single-r1_pkg_setup
}
src_unpack() {
# trickery to avoid double unpacking :/
A="${A[@]/${P}-vendor.tar.gz/}" cargo_src_unpack
pushd "${S}" >/dev/null || die
unpack ${P}-vendor.tar.gz
popd >/dev/null || die
}
src_prepare() {
pushd .. >/dev/null || die
default
popd >/dev/null || die
if use liquidctl; then
# Upstream solution not suitable for Gentoo where multiple python targets are available.
sed -e "s|@@PYTHON@@|${PYTHON}|" \
-i src/repositories/liquidctl/liqctld_service.rs || die
fi
}
src_configure() {
export ZSTD_SYS_USE_PKG_CONFIG=1
cargo_src_configure
}
src_install() {
cargo_src_install --path daemon
einstalldocs
doman ../packaging/man/coolercontrold.8
doinitd ../packaging/openrc/init.d/coolercontrol
doconfd ../packaging/openrc/conf.d/coolercontrol
# Match documentation and systemd name to avoid confusion
newinitd ../packaging/openrc/init.d/coolercontrol coolercontrold
newconfd ../packaging/openrc/conf.d/coolercontrol coolercontrold
systemd_dounit ../packaging/systemd/coolercontrold.service
}
pkg_postinst() {
# libdrm[video_cards_amdgpu] dlopen'd, but the feature is not really noteworthy enough for optfeature
# (more accurate gpu names for amd)
optfeature "sensors support" sys-apps/lm-sensors
if ver_replacing -lt 3.0.0; then
elog "coolercontrol-liqctld isn't packaged separately anymore. It's behind the liqtctl use flag now."
fi
}