mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-22 21:43:03 -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
|
EAPI=8
|
||||||
|
|
||||||
inherit linux-mod
|
inherit linux-mod systemd
|
||||||
|
|
||||||
DESCRIPTION="CPU monitoring software designed for the 64-bits Processors, like top"
|
DESCRIPTION="CPU monitoring software designed for the 64-bits Processors, like top"
|
||||||
HOMEPAGE="https://www.cyring.fr/"
|
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"
|
LICENSE="GPL-2"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS="-* ~amd64"
|
KEYWORDS="-* ~amd64"
|
||||||
|
|
||||||
|
IUSE="doc systemd"
|
||||||
|
|
||||||
|
DEPEND="sys-devel/make
|
||||||
|
kernel_linux? ( virtual/linux-sources )"
|
||||||
|
|
||||||
BDEPEND="sys-devel/gcc
|
BDEPEND="sys-devel/gcc
|
||||||
sys-devel/make
|
sys-devel/make
|
||||||
dev-vcs/git"
|
dev-vcs/git"
|
||||||
|
|
||||||
RDEPEND="sys-libs/glibc"
|
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"
|
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"
|
BUILD_TARGETS="clean all"
|
||||||
|
|
||||||
|
MODULE_NAMES="corefreqk(misc:${S})"
|
||||||
|
MODULESD_COREFREQK_ENABLED="yes"
|
||||||
|
|
||||||
pkg_setup() {
|
pkg_setup() {
|
||||||
if kernel_is -lt 3 3 ; then
|
get_version
|
||||||
die "kernels < 3.3 are not supported"
|
require_configured_kernel
|
||||||
fi
|
BUILD_PARAMS="KERNELDIR=/lib/modules/${KV_FULL}/build"
|
||||||
|
linux-mod_pkg_setup
|
||||||
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}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
linux-mod_src_install
|
linux-mod_src_install
|
||||||
emake -j1 PREFIX="${D}/usr" install
|
dobin corefreqd corefreq-cli
|
||||||
newinitd "${FILESDIR}/corefreqd corefreqd"
|
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