new package: cpulimit

This commit is contained in:
Leonid Pliushch 2020-11-14 14:46:06 +02:00
parent 0a30e62f15
commit 64579eb13e
3 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,8 @@
diff -uNr cpulimit-0.2/Makefile cpulimit-0.2.mod/Makefile
--- cpulimit-0.2/Makefile 2015-06-17 09:46:59.000000000 +0300
+++ cpulimit-0.2.mod/Makefile 2020-11-14 14:45:00.272241701 +0200
@@ -2,4 +2,3 @@
.DEFAULT:
cd src && $(MAKE) $@
- cd tests && $(MAKE) $@

View File

@ -0,0 +1,11 @@
TERMUX_PKG_HOMEPAGE=https://github.com/opsengine/cpulimit
TERMUX_PKG_DESCRIPTION="CPU usage limiter"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_VERSION=0.2
TERMUX_PKG_SRCURL=https://github.com/opsengine/cpulimit/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=64312f9ac569ddcadb615593cd002c94b76e93a0d4625d3ce1abb49e08e2c2da
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_make_install() {
install -Dm700 -t $TERMUX_PREFIX/bin src/cpulimit
}

View File

@ -0,0 +1,12 @@
diff -uNr cpulimit-0.2/src/cpulimit.c cpulimit-0.2.mod/src/cpulimit.c
--- cpulimit-0.2/src/cpulimit.c 2015-06-17 09:46:59.000000000 +0300
+++ cpulimit-0.2.mod/src/cpulimit.c 2020-11-14 14:42:58.123123342 +0200
@@ -38,7 +38,7 @@
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include <sys/sysctl.h>
+#include <linux/sysctl.h>
#include <sys/resource.h>
#include <sys/types.h>
#include <sys/wait.h>