public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-power/intel-undervolt/, sys-power/intel-undervolt/files/
@ 2019-05-23 20:34 Georgy Yakovlev
  0 siblings, 0 replies; only message in thread
From: Georgy Yakovlev @ 2019-05-23 20:34 UTC (permalink / raw
  To: gentoo-commits

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>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-23 20:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-23 20:34 [gentoo-commits] repo/gentoo:master commit in: sys-power/intel-undervolt/, sys-power/intel-undervolt/files/ Georgy Yakovlev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox