From 10c4c1b7b312b50be00f16ed6237d0d2e6449f25 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sun, 19 Aug 2018 20:10:36 +0800 Subject: [PATCH] sys-apps/lenovo-throttling-fix: add scm exheres --- metadata/repository_mask.conf | 1 + .../lenovo-throttling-fix-scm.exheres-0 | 41 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 packages/sys-apps/lenovo-throttling-fix/lenovo-throttling-fix-scm.exheres-0 diff --git a/metadata/repository_mask.conf b/metadata/repository_mask.conf index ffa4c04e..9fc1e69e 100644 --- a/metadata/repository_mask.conf +++ b/metadata/repository_mask.conf @@ -21,6 +21,7 @@ net-misc/remmina[~scm] net-misc/trickle[~scm] sys-apps/fd[~scm] + sys-apps/lenovo-throttling-fix[~scm] sys-apps/ripgrep[~scm] x11-apps/terminator[~scm] x11-misc/cbatticon[~scm] diff --git a/packages/sys-apps/lenovo-throttling-fix/lenovo-throttling-fix-scm.exheres-0 b/packages/sys-apps/lenovo-throttling-fix/lenovo-throttling-fix-scm.exheres-0 new file mode 100644 index 00000000..2abd8140 --- /dev/null +++ b/packages/sys-apps/lenovo-throttling-fix/lenovo-throttling-fix-scm.exheres-0 @@ -0,0 +1,41 @@ +# Copyright 2018 Julian Ospald +# Distributed under the terms of the GNU General Public License v2 + +require github [ user="erpalma" tag="v${PV}" ] +require python [ blacklist=2 multibuild=false ] +require systemd-service [ systemd_files=[ ] ] +require openrc-service + +SUMMARY="Workaround for Intel throttling issues on Thinkpads in Linux" + +LICENCES="MIT" +SLOT="0" +PLATFORMS="~amd64 ~x86" +MYOPTIONS="" + +DEPENDENCIES=" + build+run: + dev-python/dbus-python[python_abis:*(-)?] + dev-python/psutil[python_abis:*(-)?] + gnome-bindings/pygobject[python_abis:*(-)?] +" + +BUGS_TO="hasufell@posteo.de" + +src_install() { + default + + insinto /etc + doins etc/lenovo_fix.conf + systemd_files_doins "${SYSTEMDSYSTEMUNITDIR}" systemd/lenovo_fix.service + + edo sed -i -e "s:env python[[:digit:].]*$:env ${PYTHON##*/}:" \ + lenovo_fix.py + insinto /usr/$(exhost --target)/lib/lenovo-throttling-fix + doins mmio.py + exeinto /usr/$(exhost --target)/lib/lenovo-throttling-fix + doexe lenovo_fix.py + python_bytecompile /usr/$(exhost --target)/lib/lenovo-throttling-fix + + install_openrc_files +}