summaryrefslogtreecommitdiff
blob: 15e85c0ed130e99f33c1171fdb24b7b26bf0c68e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit gkrellm-plugin

MY_P=${P/gkrellm/gkrellm2}

DESCRIPTION="A Gkrellm2 plugin for displaying and manipulating CPU frequency"
HOMEPAGE="https://github.com/sainsaar/gkrellm2-cpupower/"
SRC_URI="https://github.com/sainsaar/gkrellm2-cpupower/archive/${PV}.tar.gz -> ${MY_P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

S="${WORKDIR}/${MY_P}"

# Collision with /usr/sbin/cpufreqnextgovernor
RDEPEND="app-admin/sudo
	sys-power/cpupower
	!x11-plugins/gkrellm-cpufreq"

PLUGIN_SO="cpupower.so"

src_install() {
	gkrellm-plugin_src_install
	dosbin cpufreqnextgovernor
	emake DESTDIR="${D}" install-sudo
}

pkg_postinst() {
	echo
	einfo "For changing the governor and CPU frequencies as a user, create the \"trusted\""
	einfo "group, and add those users to that group who should be allowed to perform"
	einfo "these changes."
	echo
}