From: "Georgy Yakovlev" <gyakovlev@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-power/intel-undervolt/, sys-power/intel-undervolt/files/
Date: Thu, 23 May 2019 20:34:08 +0000 (UTC) [thread overview]
Message-ID: <1558643582.8c3bdbb8fccf3b3a93a58fffe9f5657f47a1f5ec.gyakovlev@gentoo> (raw)
commit: 8c3bdbb8fccf3b3a93a58fffe9f5657f47a1f5ec
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Thu May 23 20:32:50 2019 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Thu May 23 20:33:02 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c3bdbb8
sys-power/intel-undervolt: new package
Intel CPU undervolting and throttling configuration tool
Package-Manager: Portage-2.3.66, Repoman-2.3.12
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
sys-power/intel-undervolt/Manifest | 1 +
sys-power/intel-undervolt/files/confd | 1 +
sys-power/intel-undervolt/files/initd | 23 ++++++++
.../intel-undervolt/intel-undervolt-1.6.ebuild | 62 ++++++++++++++++++++++
sys-power/intel-undervolt/metadata.xml | 14 +++++
5 files changed, 101 insertions(+)
diff --git a/sys-power/intel-undervolt/Manifest b/sys-power/intel-undervolt/Manifest
new file mode 100644
index 00000000000..6b09153cf63
--- /dev/null
+++ b/sys-power/intel-undervolt/Manifest
@@ -0,0 +1 @@
+DIST intel-undervolt-1.6.tar.gz 22465 BLAKE2B 947f3e3f94316a9988fc0311faa23b07e8e0a99afb737232e6e581f45cca89124a49e47bbc85eb0e836b7fc7f966869910fe4d42581e47d98d8c036390c3dec2 SHA512 1c1de1083654085d6711aad28d2815f2aa05d08b7fddbee425b59ab8109dc1e635c2a9bdda8ba0221420e9e00fcd61013bd4a4633d05ede87808c49898772db3
diff --git a/sys-power/intel-undervolt/files/confd b/sys-power/intel-undervolt/files/confd
new file mode 100644
index 00000000000..0911f6a5899
--- /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 00000000000..0a43656ea79
--- /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 00000000000..74c44d3fe53
--- /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/metadata.xml b/sys-power/intel-undervolt/metadata.xml
new file mode 100644
index 00000000000..52dabf8e780
--- /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>
reply other threads:[~2019-05-23 20:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1558643582.8c3bdbb8fccf3b3a93a58fffe9f5657f47a1f5ec.gyakovlev@gentoo \
--to=gyakovlev@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox