sys-power/throttled: add ebuild
Package-Manager: Portage-3.0.17, Repoman-3.0.2
This commit is contained in:
parent
ca5cf4b6f1
commit
c4bb20ea7b
4 changed files with 76 additions and 0 deletions
4
sys-power/throttled/Manifest
Normal file
4
sys-power/throttled/Manifest
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
AUX throttled 311 BLAKE2B 090259e66c6a8607336f5896a31ce60237b71c750c908367e83bd69f648da81b7610ad6bf938130669faeb22231f5d2334d27dd783c3319358d8a3c513cd950b SHA512 5971dda3f39e657218c66e698e1e91f41d0d9b0545876711577a95c6f441b9705d97777c3e70634106ba6b57f47f5745fe262c0a8fbb1b96adfadd3ce43faecb
|
||||
DIST v0.8.tar.gz 20213 BLAKE2B b6f1a49bd2b237ce9988326163ce0da767984f33e02c7cd1bf1b9e3e2a7651414bc0eb4654768ca1027531fdc4084e3809883e714871234851afbc8fbbafceb0 SHA512 bbefbd6c49c5221ee99857067dfe2013d3d33b4b2a63435c67ebec11d23441b0441513a723bd0d54e7720f329b803086cfde6b53d02bf683eab77da56786e51d
|
||||
EBUILD throttled-0.8.ebuild 1115 BLAKE2B e644405309442b339ce0a2bcc4d343ab24adb610e87f9207705cc77538f1ea1b3829078bccf819268999f8bf8e2ea858f3edec1f1fbdf62a8486adff43c6c555 SHA512 db57bf35b38c8ed4c2df98c5b61b9a91b6b1b2838123d6cf6fe7f0cd086fbf8b4a07cd03ef5983c751154e4d833ee458a772649ccd517180276534cdd5a578e2
|
||||
MISC metadata.xml 244 BLAKE2B 2bb6c43463d05a08c72a370f89f9c86bf690e180b8f88d6c5fad3e396054c3b9548c120647deb5c741de92b341140892b3d0c95c674fb309d7bb897260ac08cc SHA512 581a3838c21e87aa7bd64f0ae9fd7a25ca6e27239087c4c04ff9537e0874a0bd76c60ca60c31f61ec8faf46fa80ca8bc34f6f6b0facc07b7ac9013bbc984270d
|
||||
14
sys-power/throttled/files/throttled
Normal file
14
sys-power/throttled/files/throttled
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
pidfile="/var/run/throttled.pid"
|
||||
command="/usr/bin/throttled"
|
||||
description="Stop Intel throttling"
|
||||
start_stop_daemon_args="-b -m -p ${pidfile}"
|
||||
|
||||
depend() {
|
||||
need localmount
|
||||
use logger
|
||||
}
|
||||
|
||||
8
sys-power/throttled/metadata.xml
Normal file
8
sys-power/throttled/metadata.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>ischluff@mailbox.org</email>
|
||||
<name>Anton Schubert</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
||||
50
sys-power/throttled/throttled-0.8.ebuild
Normal file
50
sys-power/throttled/throttled-0.8.ebuild
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{7,8,9} )
|
||||
|
||||
inherit python-r1 linux-info systemd
|
||||
|
||||
DESCRIPTION="Fix Intel CPU Throttling on Linux"
|
||||
HOMEPAGE="https://github.com/erpalma/throttled"
|
||||
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="${HOMEPAGE}.git"
|
||||
EGIT_BRANCH="master"
|
||||
else
|
||||
MY_P="v${PV}"
|
||||
SRC_URI="https://github.com/erpalma/${PN}/archive/${MY_P}.tar.gz"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
DEPEND="${PYTHON_DEPS}"
|
||||
RDEPEND="${DEPEND}
|
||||
dev-python/dbus-python[${PYTHON_USEDEP}]
|
||||
dev-python/pygobject[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
CONFIG_CHECK="X86_MSR DEVMEM"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
sed -i -e "s/ExecStart=.*/ExecStart=${PN}/" systemd/lenovo_fix.service
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
python_foreach_impl python_domodule mmio.py
|
||||
python_foreach_impl python_newscript lenovo_fix.py ${PN}
|
||||
dodoc README.md
|
||||
insinto /etc/
|
||||
doins etc/lenovo_fix.conf
|
||||
doinitd "${FILESDIR}"/"${PN}"
|
||||
systemd_newunit "${S}/systemd/lenovo_fix.service" "${PN}".service
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue