summaryrefslogtreecommitdiff
path: root/sys-power/intel-undervolt
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-06-02 21:45:28 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-06-02 21:45:28 +0100
commit2018227e9344edb9da15fc6a4a8298086cc2aa77 (patch)
treec18e1c09e605e94e2a1e93345ad25746cc9e14b9 /sys-power/intel-undervolt
parent6f8038813c460b4f0572d5ef595cdfa94af3a94d (diff)
gentoo resync : 02.06.2019
Diffstat (limited to 'sys-power/intel-undervolt')
-rw-r--r--sys-power/intel-undervolt/Manifest6
-rw-r--r--sys-power/intel-undervolt/files/confd1
-rw-r--r--sys-power/intel-undervolt/files/initd23
-rw-r--r--sys-power/intel-undervolt/intel-undervolt-1.6.ebuild62
-rw-r--r--sys-power/intel-undervolt/intel-undervolt-9999.ebuild62
-rw-r--r--sys-power/intel-undervolt/metadata.xml14
6 files changed, 168 insertions, 0 deletions
diff --git a/sys-power/intel-undervolt/Manifest b/sys-power/intel-undervolt/Manifest
new file mode 100644
index 000000000000..1f01f4330b39
--- /dev/null
+++ b/sys-power/intel-undervolt/Manifest
@@ -0,0 +1,6 @@
+AUX confd 75 BLAKE2B 48999f73a7bf3809383904c90a40d6e53a7c338f76585238260bb9d0261ec1b7a31db4ea8039ee31598b042b87c97e6487d048d7880a118864e7bf11cd474344 SHA512 335fc14643b6b0f8f19152966d41d40021b5e6a894f3c27211dcb42c106eef9c03e1b623b8a7bd9e48aeb904854b11d3ac9681738baa87d6eabfd4ac3df9b188
+AUX initd 506 BLAKE2B 0ead334ec3eb2cbfef7a02e326fe73f91a159b60080391b56dba10c021936fe02cc49fd99141b351e17b6231299a4c2ee7c4751744fa3c057ac06a5a8513d751 SHA512 22ba7987ea2dbebf88740967cb326dc6cc2e6797920d8f850494d3bd95280b41655598d07807fd7c2c3f653ee7b65c5e8ad6260dde083f953804497b40f19594
+DIST intel-undervolt-1.6.tar.gz 22465 BLAKE2B 947f3e3f94316a9988fc0311faa23b07e8e0a99afb737232e6e581f45cca89124a49e47bbc85eb0e836b7fc7f966869910fe4d42581e47d98d8c036390c3dec2 SHA512 1c1de1083654085d6711aad28d2815f2aa05d08b7fddbee425b59ab8109dc1e635c2a9bdda8ba0221420e9e00fcd61013bd4a4633d05ede87808c49898772db3
+EBUILD intel-undervolt-1.6.ebuild 1148 BLAKE2B 8f84169e6bcb0d30fdb3b1901ba7cdbce971e933514e447d67c4cabde2078a57194107f900cd430306d81bfbd245c960d2c9c48780c8ff84694eed8f7afe3385 SHA512 8116d5545b70c0a3a8e81f4c5258462f4f1912712725574177cc92c61e58b355abdc2e70abe854f748eeca1ee747d5c0d436485fd49831580445fbb3e477bd5d
+EBUILD intel-undervolt-9999.ebuild 1148 BLAKE2B 8f84169e6bcb0d30fdb3b1901ba7cdbce971e933514e447d67c4cabde2078a57194107f900cd430306d81bfbd245c960d2c9c48780c8ff84694eed8f7afe3385 SHA512 8116d5545b70c0a3a8e81f4c5258462f4f1912712725574177cc92c61e58b355abdc2e70abe854f748eeca1ee747d5c0d436485fd49831580445fbb3e477bd5d
+MISC metadata.xml 462 BLAKE2B 6d4509f86962260abc93564e10dd087dcc1a7aa4b18c804a4a78c0c51d8659c8bd16227dcc654f60c05a0db178d81643a0a301135cb6a0857122a9b591f20e2c SHA512 99358e143a74ab36d352331d30a65ca100818edd57e62258f5ffb32f8c33f41be06e190b9f1291779db5e68228ce82241c7e30af7052c204df2c70ed7dafae1a
diff --git a/sys-power/intel-undervolt/files/confd b/sys-power/intel-undervolt/files/confd
new file mode 100644
index 000000000000..0911f6a58995
--- /dev/null
+++ b/sys-power/intel-undervolt/files/confd
@@ -0,0 +1 @@
+# /etc/conf.d/intel-undervolt: config file for /etc/init.d/intel-undervolt
diff --git a/sys-power/intel-undervolt/files/initd b/sys-power/intel-undervolt/files/initd
new file mode 100644
index 000000000000..0a43656ea79f
--- /dev/null
+++ b/sys-power/intel-undervolt/files/initd
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ after thermald
+}
+
+command="/usr/bin/intel-undervolt"
+command_args="daemon"
+command_background="true"
+pidfile="/run/${RC_SVCNAME}.pid"
+required_files="/etc/intel-undervolt.conf"
+
+start_pre() {
+ if service_started thermald; then
+ eerror "thermald conflits with ${RC_SVCNAME}, exiting"
+ fi
+
+ ebegin "${RC_SVCNAME} -> apply initial voltage"
+ "${command}" apply
+ eend $?
+}
diff --git a/sys-power/intel-undervolt/intel-undervolt-1.6.ebuild b/sys-power/intel-undervolt/intel-undervolt-1.6.ebuild
new file mode 100644
index 000000000000..74c44d3fe535
--- /dev/null
+++ b/sys-power/intel-undervolt/intel-undervolt-1.6.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit linux-info systemd toolchain-funcs
+
+DESCRIPTION="Intel CPU undervolting and throttling configuration tool"
+HOMEPAGE="https://github.com/kitsunyan/intel-undervolt"
+
+if [ ${PV} == "9999" ] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/kitsunyan/${PN}.git"
+else
+ SRC_URI="https://github.com/kitsunyan/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="-* ~amd64"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+BDEPEND=""
+
+CONFIG_CHECK="~INTEL_RAPL ~X86_MSR"
+
+src_prepare() {
+ # respect CC, CFLAGS and avoid calling pkg-config
+ sed -i \
+ -e 's/^CC=/CC?=/' \
+ -e 's/^CFLAGS=/CFLAGS?=/' \
+ -e '/^UNITDIR=/d' \
+ Makefile || die
+
+ default
+}
+
+src_compile() {
+
+ tc-export CC
+
+ myemakeargs=(
+ BINDIR="${EPREFIX}"/usr/bin
+ SYSCONFDIR="${EPREFIX}"/etc
+ UNITDIR="$(systemd_get_systemunitdir)"
+ )
+ emake "${myemakeargs[@]}"
+}
+
+src_install() {
+ myemakeargs+=(
+ DESTDIR="${D}"
+ )
+ emake "${myemakeargs[@]}" install
+
+ newinitd "${FILESDIR}"/initd "${PN}"
+ newconfd "${FILESDIR}"/confd "${PN}"
+
+ einstalldocs
+}
diff --git a/sys-power/intel-undervolt/intel-undervolt-9999.ebuild b/sys-power/intel-undervolt/intel-undervolt-9999.ebuild
new file mode 100644
index 000000000000..74c44d3fe535
--- /dev/null
+++ b/sys-power/intel-undervolt/intel-undervolt-9999.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit linux-info systemd toolchain-funcs
+
+DESCRIPTION="Intel CPU undervolting and throttling configuration tool"
+HOMEPAGE="https://github.com/kitsunyan/intel-undervolt"
+
+if [ ${PV} == "9999" ] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/kitsunyan/${PN}.git"
+else
+ SRC_URI="https://github.com/kitsunyan/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="-* ~amd64"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+BDEPEND=""
+
+CONFIG_CHECK="~INTEL_RAPL ~X86_MSR"
+
+src_prepare() {
+ # respect CC, CFLAGS and avoid calling pkg-config
+ sed -i \
+ -e 's/^CC=/CC?=/' \
+ -e 's/^CFLAGS=/CFLAGS?=/' \
+ -e '/^UNITDIR=/d' \
+ Makefile || die
+
+ default
+}
+
+src_compile() {
+
+ tc-export CC
+
+ myemakeargs=(
+ BINDIR="${EPREFIX}"/usr/bin
+ SYSCONFDIR="${EPREFIX}"/etc
+ UNITDIR="$(systemd_get_systemunitdir)"
+ )
+ emake "${myemakeargs[@]}"
+}
+
+src_install() {
+ myemakeargs+=(
+ DESTDIR="${D}"
+ )
+ emake "${myemakeargs[@]}" install
+
+ newinitd "${FILESDIR}"/initd "${PN}"
+ newconfd "${FILESDIR}"/confd "${PN}"
+
+ einstalldocs
+}
diff --git a/sys-power/intel-undervolt/metadata.xml b/sys-power/intel-undervolt/metadata.xml
new file mode 100644
index 000000000000..52dabf8e7809
--- /dev/null
+++ b/sys-power/intel-undervolt/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>gyakovlev@gentoo.org</email>
+ <name>Georgy Yakovlev</name>
+ </maintainer>
+ <longdescription lang="en">
+ Tool for undervolting and throttling limits alteration for Intel CPUs
+ </longdescription>
+ <upstream>
+ <remote-id type="github">kitsunyan/intel-undervolt</remote-id>
+ </upstream>
+</pkgmetadata>