* [gentoo-commits] repo/proj/guru:dev commit in: sys-apps/corefreq/, sys-apps/corefreq/files/
@ 2023-05-31 18:41 Vitaly Zdanevich
0 siblings, 0 replies; only message in thread
From: Vitaly Zdanevich @ 2023-05-31 18:41 UTC (permalink / raw
To: gentoo-commits
commit: d6fabbc14eb274f541b6593d6d3b848b8a02a7d1
Author: Vitaly Zdanevich <zdanevich.vitaly <AT> ya <DOT> ru>
AuthorDate: Wed May 31 18:41:03 2023 +0000
Commit: Vitaly Zdanevich <zdanevich.vitaly <AT> ya <DOT> ru>
CommitDate: Wed May 31 18:41:03 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d6fabbc1
sys-apps/corefreq: fix compilation
By adapting ebuild from https://bugs.gentoo.org/828443#c9
Signed-off-by: Vitaly Zdanevich <zdanevich.vitaly <AT> ya.ru>
sys-apps/corefreq/corefreq-1.96.2.ebuild | 46 ++++++++++++++++----------------
sys-apps/corefreq/files/corefreq | 6 +++++
sys-apps/corefreq/files/corefreq.conf | 4 +++
3 files changed, 33 insertions(+), 23 deletions(-)
diff --git a/sys-apps/corefreq/corefreq-1.96.2.ebuild b/sys-apps/corefreq/corefreq-1.96.2.ebuild
index 98e78dedd..a0d04c326 100644
--- a/sys-apps/corefreq/corefreq-1.96.2.ebuild
+++ b/sys-apps/corefreq/corefreq-1.96.2.ebuild
@@ -3,47 +3,47 @@
EAPI=8
-inherit linux-mod
+inherit linux-mod systemd
DESCRIPTION="CPU monitoring software designed for the 64-bits Processors, like top"
HOMEPAGE="https://www.cyring.fr/"
-SRC_URI="https://github.com/cyring/CoreFreq/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI="https://github.com/cyring/$PN/archive/$PV.tar.gz -> $P.tar.gz"
+S="${WORKDIR}/CoreFreq-${PV}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="-* ~amd64"
+IUSE="doc systemd"
+
+DEPEND="sys-devel/make
+ kernel_linux? ( virtual/linux-sources )"
+
BDEPEND="sys-devel/gcc
- sys-devel/make
- dev-vcs/git"
+ sys-devel/make
+ dev-vcs/git"
+
RDEPEND="sys-libs/glibc"
CONFIG_CHECK="SMP X86_MSR ~HOTPLUG_CPU ~CPU_IDLE ~CPU_FREQ ~PM_SLEEP ~DMI ~XEN ~AMD_NB ~HAVE_PERF_EVENTS ~SCHED_MUQSS ~SCHED_BMQ ~SCHED_PDS"
-MODULE_NAMES="corefreqk()"
BUILD_TARGETS="clean all"
-pkg_setup() {
- if kernel_is -lt 3 3 ; then
- die "kernels < 3.3 are not supported"
- fi
-
- elog "Checking for kernel configurations..."
- elog "Enable optional configurations only as you see fit."
- elog "Not all optional configurations will be suitable for your system."
- elog "Build will fail for required configs."
- elog "The other configs are all optional configs."
-
- linux-mod_pkg_setup
-}
+MODULE_NAMES="corefreqk(misc:${S})"
+MODULESD_COREFREQK_ENABLED="yes"
-src_unpack() {
- default
- mv CoreFreq-${PV} ${P}
+pkg_setup() {
+ get_version
+ require_configured_kernel
+ BUILD_PARAMS="KERNELDIR=/lib/modules/${KV_FULL}/build"
+ linux-mod_pkg_setup
}
src_install() {
linux-mod_src_install
- emake -j1 PREFIX="${D}/usr" install
- newinitd "${FILESDIR}/corefreqd corefreqd"
+ dobin corefreqd corefreq-cli
+ newconfd "${FILESDIR}/${PN}.conf" "${PN}"
+ doinitd "${FILESDIR}/${PN}"
+ use systemd && systemd_dounit ${PN}.service
+ use doc && dodoc README.md
}
diff --git a/sys-apps/corefreq/files/corefreq b/sys-apps/corefreq/files/corefreq
new file mode 100644
index 000000000..05409182c
--- /dev/null
+++ b/sys-apps/corefreq/files/corefreq
@@ -0,0 +1,6 @@
+#!/sbin/openrc-run
+name=corefreq
+command=/usr/bin/corefreqd
+command_args=${COREFREQD_ARGS}
+command_background=1
+pidfile=/run/corefreqd.pid
diff --git a/sys-apps/corefreq/files/corefreq.conf b/sys-apps/corefreq/files/corefreq.conf
new file mode 100644
index 000000000..9cb090cc6
--- /dev/null
+++ b/sys-apps/corefreq/files/corefreq.conf
@@ -0,0 +1,4 @@
+# Default settings for /etc/init.d/corefreq.
+
+# Options to pass to corefreqd
+COREFREQD_ARGS="-q"
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-31 18:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-31 18:41 [gentoo-commits] repo/proj/guru:dev commit in: sys-apps/corefreq/, sys-apps/corefreq/files/ Vitaly Zdanevich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox