aports/testing/throttled/APKBUILD
Sertonix 7d4ba47e1b */*: prefer relative paths with amove
In several occasions absolute paths also included globs which leads to
globbing the host filesystem. To avoid this in the future never
explicitly use absolute paths.

This affected
- community/bubblejail
- community/py3-pygame
- main/git
- main/linux-firmware
- main/gcc (was already fixed in 5a434d40e5)

(also strip some ./ to avoid confusion)
2025-06-09 08:24:05 +00:00

44 lines
1.4 KiB
Text

# Contributor: amolinae06 <amolinaegames@gmail.com>
maintainer="amolinae06 <amolinaegames@gmail.com>"
pkgname=throttled
pkgver=0.10.0
pkgrel=1
pkgdesc="Workaround for Intel throttling issues in Linux."
url="https://github.com/erpalma/throttled"
arch="noarch"
license="MIT"
depends="py3-dbus py3-psutil py3-gobject3 pciutils"
checkdepends="python3"
subpackages="$pkgname-openrc $pkgname-pyc"
options="!check" # no tests.
source="
https://github.com/erpalma/throttled/archive/v$pkgver/throttled-$pkgver.tar.gz
no-venv-openrc.patch
"
prepare() {
default_prepare
mv $srcdir/$pkgname-$pkgver/openrc/throttled $srcdir/$pkgname-$pkgver/openrc/throttled.initd
}
pyc() {
default_pyc
amove usr/lib/$pkgname/__pycache__/
}
build() {
python -m compileall ./*.py
}
package() {
install -Dm644 etc/throttled.conf "$pkgdir"/etc/throttled.conf
install -Dm755 openrc/throttled.initd "$pkgdir"/etc/init.d/throttled
install -Dm755 throttled.py "$pkgdir"/usr/lib/$pkgname/throttled.py
install -Dm755 mmio.py "$pkgdir"/usr/lib/$pkgname/mmio.py
cp -a __pycache__ "$pkgdir"/usr/lib/$pkgname/
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
sha512sums="
b89c467295bfc592d7b3ce0c4a41fedf436acf8067f8ef63d8596b92343ed8e04d371d065a9e35fdddba40772f12255c30960c2c46f0cbd5093bfc5e72fb4e18 throttled-0.10.0.tar.gz
d68d1b377068f695cfb1f867b6a568c6d98e25ae723076107c65f0c08b78b489c0178066836a3b0c3edda3e7651d998e45abd7be1fcf6da994f8c08916b90321 no-venv-openrc.patch
"