summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-plugins/gkrellm-cpufreq/gkrellm-cpufreq-0.6.4.ebuild')
-rw-r--r--x11-plugins/gkrellm-cpufreq/gkrellm-cpufreq-0.6.4.ebuild42
1 files changed, 42 insertions, 0 deletions
diff --git a/x11-plugins/gkrellm-cpufreq/gkrellm-cpufreq-0.6.4.ebuild b/x11-plugins/gkrellm-cpufreq/gkrellm-cpufreq-0.6.4.ebuild
new file mode 100644
index 0000000..59e9580
--- /dev/null
+++ b/x11-plugins/gkrellm-cpufreq/gkrellm-cpufreq-0.6.4.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils gkrellm-plugin
+
+MY_P=${P/gkrellm/gkrellm2}
+
+DESCRIPTION="A Gkrellm2 plugin for displaying and manipulating CPU frequency"
+HOMEPAGE="http://chw.populus.org/rub/7"
+SRC_URI="http://christoph.winkelmann.googlepages.com/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+RDEPEND="app-admin/gkrellm:2[X]
+ sys-power/cpupower
+ app-admin/sudo"
+
+PATCHES=( "${FILESDIR}"/${P}-use-cpupower.patch )
+
+PLUGIN_SO=cpufreq.so
+
+src_install() {
+ gkrellm-plugin_src_install
+ exeinto /usr/sbin
+ doexe cpufreqnextgovernor
+}
+
+pkg_postinst() {
+ echo
+ einfo "Add these lines to /etc/sudoers to allow users to change cpu governor and speed:"
+ einfo "ALL ALL = (root) NOPASSWD: /usr/bin/cpupower -c [0-9]* frequency-set -g userspace"
+ einfo "ALL ALL = (root) NOPASSWD: /usr/bin/cpupower -c [0-9]* frequency-set -f [0-9]*"
+ einfo "ALL ALL = (root) NOPASSWD: /usr/sbin/cpufreqnextgovernor"
+ echo
+}