mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-08 22:52:59 -04:00
sys-apps/corefreq: fix compilation
By adapting ebuild from https://bugs.gentoo.org/828443#c9 Signed-off-by: Vitaly Zdanevich <zdanevich.vitaly@ya.ru>
This commit is contained in:
@@ -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"
|
||||
|
||||
MODULE_NAMES="corefreqk(misc:${S})"
|
||||
MODULESD_COREFREQK_ENABLED="yes"
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
default
|
||||
mv CoreFreq-${PV} ${P}
|
||||
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
|
||||
}
|
||||
|
||||
6
sys-apps/corefreq/files/corefreq
Normal file
6
sys-apps/corefreq/files/corefreq
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/sbin/openrc-run
|
||||
name=corefreq
|
||||
command=/usr/bin/corefreqd
|
||||
command_args=${COREFREQD_ARGS}
|
||||
command_background=1
|
||||
pidfile=/run/corefreqd.pid
|
||||
4
sys-apps/corefreq/files/corefreq.conf
Normal file
4
sys-apps/corefreq/files/corefreq.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
# Default settings for /etc/init.d/corefreq.
|
||||
|
||||
# Options to pass to corefreqd
|
||||
COREFREQD_ARGS="-q"
|
||||
Reference in New Issue
Block a user