Merge Official Source

This commit is contained in:
Xiaokailnol
2026-01-18 18:43:31 +08:00
parent 4f3df77363
commit 9506a57e2d
12 changed files with 0 additions and 58 deletions

View File

@@ -1,37 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=cpulimit
PKG_VERSION:=0.3.2
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/denji/cpulimit/tar.gz/$(PKG_VERSION)?
PKG_HASH:=0c61d394407fdd0547b53e6435ecb817d2e3ba914b48aa9f48ccf42c8278d3a6
PKG_BUILD_PARALLEL:=1
PKG_LICENSE_FILES:=LICENSE
MAKE_PATH:=src
include $(INCLUDE_DIR)/package.mk
define Package/cpulimit
SECTION:=utils
CATEGORY:=Utilities
TITLE:=CPU usage limiter
URL:=https://github.com/denji/cpulimit
endef
define Package/cpulimit/description
Cpulimit is a tool which limits the CPU usage of a process
(expressed in percentage, not in CPU time).
endef
TARGET_CFLAGS += -D_GNU_SOURCE
define Package/cpulimit/install
$(INSTALL_DIR) $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/cpulimit $(1)/usr/bin/
endef
$(eval $(call BuildPackage,cpulimit))

View File

@@ -1,21 +0,0 @@
--- a/src/process_group.c
+++ b/src/process_group.c
@@ -24,17 +24,10 @@
#include <limits.h>
#include <sys/time.h>
#include <signal.h>
-
-#if defined(__APPLE__) || defined(__FREEBSD__)
- #include <libgen.h>
-#endif
+#include <libgen.h>
#include <assert.h>
-#ifdef __sun__
- #include <libgen.h>
-#endif
-
#include "process_iterator.h"
#include "process_group.h"
#include "list.h"