new package: rinetd (#4993)

This commit is contained in:
Leonid Pliushch 2020-02-29 14:15:34 +02:00 committed by GitHub
parent 729b7b9f08
commit 57dae1c80e
3 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,19 @@
diff -uNr rinetd-0973bd2d1c187da9706fd83c8aa68fabc1775a31/Makefile rinetd-0973bd2d1c187da9706fd83c8aa68fabc1775a31.mod/Makefile
--- rinetd-0973bd2d1c187da9706fd83c8aa68fabc1775a31/Makefile 2019-10-22 14:45:57.000000000 +0300
+++ rinetd-0973bd2d1c187da9706fd83c8aa68fabc1775a31.mod/Makefile 2020-02-29 14:02:04.947085665 +0200
@@ -1,9 +1,10 @@
-CFLAGS=-DLINUX -g
+CC?=gcc
+CFLAGS+=-DLINUX -g
+PREFIX?=/usr/local
rinetd: rinetd.o match.o
- gcc rinetd.o match.o -o rinetd
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) rinetd.o match.o -o rinetd
install: rinetd
- install -m 700 rinetd /usr/sbin
- install -m 644 rinetd.8 /usr/man/man8
-
+ install -Dm 755 rinetd $(PREFIX)/bin/rinetd
+ install -Dm 644 rinetd.8 $(PREFIX)/share/man/man8/rinetd.8

8
packages/rinetd/build.sh Normal file
View File

@ -0,0 +1,8 @@
TERMUX_PKG_HOMEPAGE=https://github.com/boutell/rinetd
TERMUX_PKG_DESCRIPTION="A user-mode TCP port redirection server"
TERMUX_PKG_LICENSE="GPL-2.0"
_COMMIT=0973bd2d1c187da9706fd83c8aa68fabc1775a31
TERMUX_PKG_VERSION=2019.10.22-${_COMMIT:0:8}
TERMUX_PKG_SRCURL=https://github.com/boutell/rinetd/archive/${_COMMIT}.tar.gz
TERMUX_PKG_SHA256=66d04c1385b8308e423f388678b8b9236e0b036a1d5dcce758d7b777a554b818
TERMUX_PKG_BUILD_IN_SRC=true

View File

@ -0,0 +1,12 @@
diff -uNr rinetd-0973bd2d1c187da9706fd83c8aa68fabc1775a31/rinetd.c rinetd-0973bd2d1c187da9706fd83c8aa68fabc1775a31.mod/rinetd.c
--- rinetd-0973bd2d1c187da9706fd83c8aa68fabc1775a31/rinetd.c 2019-10-22 14:45:57.000000000 +0300
+++ rinetd-0973bd2d1c187da9706fd83c8aa68fabc1775a31.mod/rinetd.c 2020-02-29 14:05:14.328184024 +0200
@@ -214,7 +214,7 @@
};
RinetdOptions options = {
- "/etc/rinetd.conf"
+ "@TERMUX_PREFIX@/etc/rinetd.conf"
};
int readArgs (int argc,