summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/nuttcp/files')
-rw-r--r--net-analyzer/nuttcp/files/nuttcp-8.1.4-makefile.patch21
-rw-r--r--net-analyzer/nuttcp/files/nuttcp.confd5
-rw-r--r--net-analyzer/nuttcp/files/nuttcp.initd16
3 files changed, 42 insertions, 0 deletions
diff --git a/net-analyzer/nuttcp/files/nuttcp-8.1.4-makefile.patch b/net-analyzer/nuttcp/files/nuttcp-8.1.4-makefile.patch
new file mode 100644
index 000000000000..02de62a80e70
--- /dev/null
+++ b/net-analyzer/nuttcp/files/nuttcp-8.1.4-makefile.patch
@@ -0,0 +1,21 @@
+--- a/Makefile 2017-10-29 08:39:34.209474792 +0200
++++ b/Makefile 2017-10-29 15:11:02.082490459 +0200
+@@ -2,8 +2,7 @@
+ #EXTRAVERSION=-pre1
+ CC = gcc -Wall
+ #OPT = -g -O0
+-OPT = -O3
+-CFLAGS = $(OPT) $(NOIPV6)
++CFLAGS += $(OPT) $(NOIPV6)
+ LIBS =
+ ifneq ($(NOIPV6),)
+ APPEXTV6=-noipv6
+@@ -53,7 +52,7 @@
+ # $(MAKE) CC=icc OPT="-w -O3 -parallel -unroll -align -xM -vec_report -par_report2"
+
+ $(APP)$(EXTRAVERSION)$(APPEXT): $(APP)$(EXTRAVERSION).c $(LIBS)
+- $(CC) $(CFLAGS) -o $@ $< $(LIBS)
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
+ inet_ntop.o: missing/inet_ntop.c missing/config.h
+ $(CC) $(CFLAGS.MISSING) -o $@ -c $<
+ inet_pton.o: missing/inet_pton.c missing/config.h
diff --git a/net-analyzer/nuttcp/files/nuttcp.confd b/net-analyzer/nuttcp/files/nuttcp.confd
new file mode 100644
index 000000000000..a41d858550a1
--- /dev/null
+++ b/net-analyzer/nuttcp/files/nuttcp.confd
@@ -0,0 +1,5 @@
+# Config file for /etc/init.d/nuttcp
+
+# extra options (run nuttcp -h for a list of supported options)
+# Parameter -S indicates that nuttcp acts as a server.
+NUTTCP_OPTS="-S"
diff --git a/net-analyzer/nuttcp/files/nuttcp.initd b/net-analyzer/nuttcp/files/nuttcp.initd
new file mode 100644
index 000000000000..3ba80fab8f6e
--- /dev/null
+++ b/net-analyzer/nuttcp/files/nuttcp.initd
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/bin/nuttcp"
+command_background="yes"
+command_args="${NUTTCP_OPTS}"
+pidfile="/run/${RC_SVCNAME}.pid"
+
+depend() {
+ need net
+}
+
+start_post() {
+ pgrep -n "${RC_SVCNAME%%.*}" > "${pidfile}"
+}