mirror of
https://github.com/gentoo-mirror/guru.git
synced 2025-04-19 15:59:00 -04:00
sys-power/auto-cpufreq: drop 1.9.6
Closes: https://bugs.gentoo.org/931484 Signed-off-by: Julien Roy <julien@jroy.ca>
This commit is contained in:
parent
31d4aa0a78
commit
c46fc4bcb8
@ -1,2 +1 @@
|
||||
DIST auto-cpufreq-1.9.6.tar.gz 28393 BLAKE2B a4204cdfe549743c6781c4cf26c97133e488735d806d97205af2d956500b7b867c1635f6f20ee9940d9b98377b20fc83a31953099319e4e245a381754e35e8ee SHA512 55892a4ed27fbc8ffad8b67c9cfa9f70e510342bb2c4fbf8b84c8e4da0a4ca51940f34e02a052f97efdc41085cf4ff8db5323328a1b7ce948d9a87338a209798
|
||||
DIST auto-cpufreq-2.1.0.tar.gz 211221 BLAKE2B ee376e44b31cd93ae37c3a800fd1b7e89af3b696e1d128d2bc8d335b1240d2e2b0d5aa0e90cd1465185bfff9cee02069ee1d46120be014b1dc61ce056308d4a1 SHA512 e01e6f03e7fcd3e0640ebd829234a07043c8d88bd1feabbcc6df463007b2e93410935394257bc28ed1297b294292425adfe4079a3dff0ec5636c23c3cbdd9ee0
|
||||
|
@ -1,82 +0,0 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..11} )
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
|
||||
inherit distutils-r1 systemd
|
||||
|
||||
DESCRIPTION="Automatic CPU speed & power optimizer for Linux"
|
||||
HOMEPAGE="https://github.com/AdnanHodzic/auto-cpufreq"
|
||||
SRC_URI="https://github.com/AdnanHodzic/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="systemd"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/psutil
|
||||
dev-python/click
|
||||
dev-python/distro
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
DOCS=( README.md )
|
||||
PATCHES=( "${FILESDIR}/${PN}-remove-setuptools_git_versioning.patch" )
|
||||
|
||||
src_prepare() {
|
||||
sed -i 's|usr/local|usr|g' "scripts/${PN}.service" "scripts/${PN}-openrc" auto_cpufreq/core.py || die
|
||||
distutils-r1_src_prepare
|
||||
}
|
||||
|
||||
python_install() {
|
||||
distutils-r1_python_install
|
||||
|
||||
exeinto "/usr/share/${PN}/scripts"
|
||||
doexe scripts/cpufreqctl.sh
|
||||
|
||||
if use systemd; then
|
||||
systemd_douserunit "scripts/${PN}.service"
|
||||
else
|
||||
doinitd "scripts/${PN}-openrc"
|
||||
mv "${D}/etc/init.d/${PN}-openrc" "${D}/etc/init.d/${PN}" || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
touch /var/log/auto-cpufreq.log
|
||||
|
||||
elog ""
|
||||
elog "Enable auto-cpufreq daemon service at boot:"
|
||||
if use systemd; then
|
||||
elog "systemctl enable --now auto-cpufreq"
|
||||
else
|
||||
elog "rc-update add auto-cpufreq default"
|
||||
fi
|
||||
elog ""
|
||||
elog "To view live log, run:"
|
||||
elog "auto-cpufreq --stats"
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
# Remove auto-cpufreq log file
|
||||
if [ -f "/var/log/auto-cpufreq.log" ]; then
|
||||
rm /var/log/auto-cpufreq.log || die
|
||||
fi
|
||||
|
||||
# Remove auto-cpufreq's cpufreqctl binary
|
||||
# it overwrites cpufreqctl.sh
|
||||
if [ -f "/usr/bin/cpufreqctl" ]; then
|
||||
rm /usr/bin/cpufreqctl || die
|
||||
fi
|
||||
|
||||
# Restore original cpufreqctl binary if backup was made
|
||||
if [ -f "/usr/bin/cpufreqctl.auto-cpufreq.bak" ]; then
|
||||
mv /usr/bin/cpufreqctl.auto-cpufreq.bak /usr/bin/cpufreqctl || die
|
||||
fi
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user