PKGBUILD 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. pkgname=throttled
  2. pkgver=0.6
  3. pkgrel=4
  4. pkgdesc="Workaround for Intel throttling issues in Linux."
  5. arch=('any')
  6. url="https://github.com/erpalma/throttled"
  7. license=('MIT')
  8. depends=('python-dbus' 'python-psutil' 'python-gobject')
  9. conflicts=('lenovo-throttling-fix-git' 'lenovo-throttling-fix')
  10. replaces=('lenovo-throttling-fix')
  11. backup=('etc/lenovo_fix.conf')
  12. source=("git+https://github.com/Hyper-KVM/throttled.git#branch=openrc")
  13. sha256sums=('SKIP')
  14. #prepare() {
  15. # sed -i "s|ExecStart=.*|ExecStart=/usr/lib/$pkgname/lenovo_fix.py|" $pkgname-$pkgver/systemd/lenovo_fix.service
  16. #}
  17. build() {
  18. cd "${srcdir}/throttled/"
  19. python -m compileall *.py
  20. }
  21. package() {
  22. cd "${srcdir}/throttled/"
  23. install -Dm644 etc/lenovo_fix.conf "$pkgdir"/etc/lenovo_fix.conf
  24. install -Dm644 systemd/lenovo_fix.service "$pkgdir"/usr/lib/systemd/system/lenovo_fix.service
  25. install -Dm755 lenovo_fix.py "$pkgdir"/usr/lib/$pkgname/lenovo_fix.py
  26. install -Dm755 openrc/lenovo_fix "$pkgdir/etc/init.d/lenovo_fix"
  27. install -Dm755 mmio.py "$pkgdir"/usr/lib/$pkgname/mmio.py
  28. cp -a __pycache__ "$pkgdir"/usr/lib/$pkgname/
  29. install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
  30. }