summaryrefslogtreecommitdiff
path: root/sys-power/intel-undervolt/intel-undervolt-9999.ebuild
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/intel-undervolt-9999.ebuild
parent6f8038813c460b4f0572d5ef595cdfa94af3a94d (diff)
gentoo resync : 02.06.2019
Diffstat (limited to 'sys-power/intel-undervolt/intel-undervolt-9999.ebuild')
-rw-r--r--sys-power/intel-undervolt/intel-undervolt-9999.ebuild62
1 files changed, 62 insertions, 0 deletions
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
+}