kumquat-buildroot/package/cpulimit/cpulimit.mk
Florian Fainelli 9e8e80d1e3 package: Add cpulimit
Cpulimit is a tool which limits the CPU usage of a process (expressed in
percentage, not in CPU time). It is useful to control batch jobs, when
you don't want them to eat too many CPU cycles.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
[Peter: depend on BR2_USE_MMU, add pull request links to patches]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-05-05 22:43:13 +02:00

24 lines
652 B
Makefile

################################################################################
#
# cpulimit
#
################################################################################
CPULIMIT_VERSION = 0.2
CPULIMIT_SITE = $(call github,opsengine,cpulimit,v$(CPULIMIT_VERSION))
CPULIMIT_LICENSE = GPL-2.0+
CPULIMIT_LICENSE_FILES = LICENSE
define CPULIMIT_BUILD_CMDS
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" \
LDLIBS="$(TARGET_LDFLAGS)"
endef
define CPULIMIT_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/src/cpulimit \
$(TARGET_DIR)/usr/bin/cpulimit
endef
$(eval $(generic-package))