diff options
author | okhsunrog | 2021-12-19 04:42:04 +0300 |
---|---|---|
committer | okhsunrog | 2021-12-19 04:42:04 +0300 |
commit | e761b089725a74737d57079d0df9052f6bf22ad5 (patch) | |
tree | e263e59834591a98b0671c321b1b43454e1731ae | |
download | aur-e761b089725a74737d57079d0df9052f6bf22ad5.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 34 | ||||
-rw-r--r-- | throttled.service | 11 |
3 files changed, 65 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..8e2d8a41cd82 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = throttled-git + pkgdesc = Workaround for Intel throttling issues in Linux. + pkgver = 0.9.2 + pkgrel = 1 + url = https://github.com/erpalma/throttled + arch = any + license = MIT + depends = python-dbus + depends = python-psutil + depends = python-gobject + conflicts = lenovo-throttling-fix-git + conflicts = lenovo-throttling-fix + replaces = lenovo-throttling-fix + backup = etc/lenovo_fix.conf + source = git+https://github.com/erpalma/throttled.git + source = throttled.service + sha256sums = SKIP + sha256sums = SKIP + +pkgname = throttled-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ff0082d2405f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,34 @@ + +pkgname=throttled-git +pkgver=0.9.2 +pkgrel=1 +pkgdesc="Workaround for Intel throttling issues in Linux." +arch=('any') +url="https://github.com/erpalma/throttled" +license=('MIT') +depends=('python-dbus' 'python-psutil' 'python-gobject') +conflicts=('lenovo-throttling-fix-git' 'lenovo-throttling-fix') +replaces=('lenovo-throttling-fix') +backup=('etc/lenovo_fix.conf') +source=("git+https://github.com/erpalma/throttled.git" + 'throttled.service') +sha256sums=('SKIP' + 'SKIP') + + +build() { + cd "${srcdir}/throttled/" + python -m compileall *.py +} + +package() { + cd "${srcdir}/throttled/" + install -Dm644 etc/throttled.conf "$pkgdir"/etc/throttled.conf + install -Dm644 ../throttled.service "$pkgdir"/usr/lib/systemd/system/throttled.service + install -Dm755 throttled.py "$pkgdir"/usr/lib/$pkgname/throttled.py + mkdir "$pkgdir"/usr/bin/ + ln -s /usr/lib/$pkgname/throttled.py "$pkgdir"/usr/bin/throttled + 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 +} diff --git a/throttled.service b/throttled.service new file mode 100644 index 000000000000..2b9adb1ef425 --- /dev/null +++ b/throttled.service @@ -0,0 +1,11 @@ +[Unit] +Description=Stop Intel throttling + +[Service] +Type=simple +ExecStart=/usr/lib/throttled-git/throttled.py +# Setting PYTHONUNBUFFERED is necessary to see the output of this service in the journal +Environment=PYTHONUNBUFFERED=1 + +[Install] +WantedBy=multi-user.target |