summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2016-09-07 21:25:54 -0400
committerMike Gilbert <floppym@gentoo.org>2016-09-07 21:28:01 -0400
commit16ea9eebec61442474c6feb6b9a279633d8fb7cf (patch)
tree5e930eb15d2668b49a825a0a8494bf909c694f7b
parentnet-misc/openssh: Update patch to avoid hangs at exit (diff)
downloadgentoo-16ea9eebec61442474c6feb6b9a279633d8fb7cf.tar.gz
gentoo-16ea9eebec61442474c6feb6b9a279633d8fb7cf.tar.bz2
gentoo-16ea9eebec61442474c6feb6b9a279633d8fb7cf.zip
sys-power/cpupower: add cpupower-frequency-set.service
Bug: https://bugs.gentoo.org/531360
-rw-r--r--profiles/package.mask2
-rw-r--r--sys-power/cpupower/cpupower-4.5.0-r1.ebuild (renamed from sys-power/cpupower/cpupower-4.5.0.ebuild)7
-rw-r--r--sys-power/cpupower/cpupower-4.7.0-r1.ebuild (renamed from sys-power/cpupower/cpupower-4.7.0.ebuild)7
-rw-r--r--sys-power/cpupower/files/cpupower-frequency-set.service9
-rw-r--r--sys-power/cpupower/files/cpupower-frequency-set.service.conf2
5 files changed, 24 insertions, 3 deletions
diff --git a/profiles/package.mask b/profiles/package.mask
index 0abb2fae8f7e..dd77ae2f4f47 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -597,7 +597,7 @@ dev-libs/skyutils
# Mike Gilbert <floppym@gentoo.org> (07 Aug 2016)
# Fails to switch cpufreq governor.
# https://bugs.gentoo.org/590780
-=sys-power/cpupower-4.7.0
+~sys-power/cpupower-4.7.0
# Pacho Ramos <pacho@gentoo.org> (7 Aug 2016)
# Upstream dead, depends on old gstreamer, old webkit, many unresolved bug
diff --git a/sys-power/cpupower/cpupower-4.5.0.ebuild b/sys-power/cpupower/cpupower-4.5.0-r1.ebuild
index 432a45f45741..54365d0183af 100644
--- a/sys-power/cpupower/cpupower-4.5.0.ebuild
+++ b/sys-power/cpupower/cpupower-4.5.0-r1.ebuild
@@ -3,7 +3,9 @@
# $Id$
EAPI=6
-inherit eutils toolchain-funcs
+
+# eutils: strip-linguas
+inherit eutils systemd toolchain-funcs
DESCRIPTION="Shows and sets processor power related values"
HOMEPAGE="https://www.kernel.org/"
@@ -53,4 +55,7 @@ src_install() {
newconfd "${FILESDIR}"/conf.d-r2 cpupower
newinitd "${FILESDIR}"/init.d-r4 cpupower
+
+ systemd_dounit "${FILESDIR}"/cpupower-frequency-set.service
+ systemd_install_serviced "${FILESDIR}"/cpupower-frequency-set.service.conf
}
diff --git a/sys-power/cpupower/cpupower-4.7.0.ebuild b/sys-power/cpupower/cpupower-4.7.0-r1.ebuild
index 432a45f45741..54365d0183af 100644
--- a/sys-power/cpupower/cpupower-4.7.0.ebuild
+++ b/sys-power/cpupower/cpupower-4.7.0-r1.ebuild
@@ -3,7 +3,9 @@
# $Id$
EAPI=6
-inherit eutils toolchain-funcs
+
+# eutils: strip-linguas
+inherit eutils systemd toolchain-funcs
DESCRIPTION="Shows and sets processor power related values"
HOMEPAGE="https://www.kernel.org/"
@@ -53,4 +55,7 @@ src_install() {
newconfd "${FILESDIR}"/conf.d-r2 cpupower
newinitd "${FILESDIR}"/init.d-r4 cpupower
+
+ systemd_dounit "${FILESDIR}"/cpupower-frequency-set.service
+ systemd_install_serviced "${FILESDIR}"/cpupower-frequency-set.service.conf
}
diff --git a/sys-power/cpupower/files/cpupower-frequency-set.service b/sys-power/cpupower/files/cpupower-frequency-set.service
new file mode 100644
index 000000000000..2d9ef35655af
--- /dev/null
+++ b/sys-power/cpupower/files/cpupower-frequency-set.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=CPU Frequency Scaling
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/cpupower frequency-set $OPTS
+
+[Install]
+WantedBy=multiuser.target
diff --git a/sys-power/cpupower/files/cpupower-frequency-set.service.conf b/sys-power/cpupower/files/cpupower-frequency-set.service.conf
new file mode 100644
index 000000000000..969c8ab2f214
--- /dev/null
+++ b/sys-power/cpupower/files/cpupower-frequency-set.service.conf
@@ -0,0 +1,2 @@
+[Service]
+Environment="OPTS=-g ondemand"