summaryrefslogtreecommitdiff
path: root/net-analyzer/arpon/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-09-30 17:27:54 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-09-30 17:27:54 +0100
commitf70a1bfc721336d4fc7dfb711c2f518a6b18cf16 (patch)
treee907cb121b30e3c1df1710719c0ddf4029597a47 /net-analyzer/arpon/files
parentdb063b515939ab15261136b24e4bc44386335c0c (diff)
gentoo resync : 30.09.2020
Diffstat (limited to 'net-analyzer/arpon/files')
-rw-r--r--net-analyzer/arpon/files/arpon-3.0-CFLAGS.patch17
-rw-r--r--net-analyzer/arpon/files/arpon-3.0-gentoo.patch146
-rw-r--r--net-analyzer/arpon/files/arpon.confd-34
-rw-r--r--net-analyzer/arpon/files/arpon.initd-321
4 files changed, 188 insertions, 0 deletions
diff --git a/net-analyzer/arpon/files/arpon-3.0-CFLAGS.patch b/net-analyzer/arpon/files/arpon-3.0-CFLAGS.patch
new file mode 100644
index 000000000000..7cc917b305c7
--- /dev/null
+++ b/net-analyzer/arpon/files/arpon-3.0-CFLAGS.patch
@@ -0,0 +1,17 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -88,12 +88,12 @@
+ message(STATUS "Build type: Debug")
+
+ set(CMAKE_BUILD_TYPE "Debug")
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wextra -Wformat=2 -Winit-self -Wreturn-type -Wswitch-default -Wswitch-enum -Wunused-parameter -Wuninitialized -Wstrict-aliasing=3 -Wstrict-overflow=5 -Wdeclaration-after-statement -Wundef -Wpointer-arith -Wunsafe-loop-optimizations -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wsizeof-pointer-memaccess -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-declaration -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wlong-long -Wvariadic-macros -Wvarargs -Wvla -Wdisabled-optimization -Woverlength-strings -O0 -g -ggdb")
++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat=2 -Winit-self -Wreturn-type -Wswitch-default -Wswitch-enum -Wunused-parameter -Wuninitialized -Wstrict-aliasing=3 -Wstrict-overflow=5 -Wdeclaration-after-statement -Wundef -Wpointer-arith -Wunsafe-loop-optimizations -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wsizeof-pointer-memaccess -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-declaration -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wlong-long -Wvariadic-macros -Wvarargs -Wvla -Wdisabled-optimization -Woverlength-strings")
+ else(cmake_build_type_tolower STREQUAL "debug")
+ message(STATUS "Build type: Release")
+
+ set(CMAKE_BUILD_TYPE "Release")
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wextra -O3 -DNDEBUG")
++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -DNDEBUG")
+ endif(cmake_build_type_tolower STREQUAL "debug")
+
+ find_package(Headers)
diff --git a/net-analyzer/arpon/files/arpon-3.0-gentoo.patch b/net-analyzer/arpon/files/arpon-3.0-gentoo.patch
new file mode 100644
index 000000000000..1deda181acf0
--- /dev/null
+++ b/net-analyzer/arpon/files/arpon-3.0-gentoo.patch
@@ -0,0 +1,146 @@
+--- a/doc/CMakeLists.txt
++++ b/doc/CMakeLists.txt
+@@ -31,7 +31,7 @@
+
+ set(arpon_doc_src "${CMAKE_SOURCE_DIR}/doc/arpon")
+
+-if(${CMAKE_INSTALL_PREFIX} STREQUAL "/")
++if(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr")
+ install(DIRECTORY ${arpon_doc_src}
+ DESTINATION /usr/share/doc
+ FILE_PERMISSIONS OWNER_READ GROUP_READ WORLD_READ
+@@ -41,7 +41,7 @@
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc
+ FILE_PERMISSIONS OWNER_READ GROUP_READ WORLD_READ
+ COMPONENT Doc)
+-endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/")
++endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr")
+
+ #
+ # EOF
+--- a/log/CMakeLists.txt
++++ b/log/CMakeLists.txt
+@@ -31,7 +31,7 @@
+
+ set(arpon_log_src "${CMAKE_SOURCE_DIR}/log/arpon.log")
+
+-if(${CMAKE_INSTALL_PREFIX} STREQUAL "/")
++if(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr")
+ install(FILES ${arpon_log_src}
+ DESTINATION /var/log
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ
+@@ -41,7 +41,7 @@
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/log
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ
+ COMPONENT Log)
+-endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/")
++endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr")
+
+ #
+ # EOF
+--- a/etc/CMakeLists.txt
++++ b/etc/CMakeLists.txt
+@@ -31,7 +31,7 @@
+
+ set(arpon_etc_src "${CMAKE_SOURCE_DIR}/etc/arpon.conf")
+
+-if(${CMAKE_INSTALL_PREFIX} STREQUAL "/")
++if(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr")
+ install(FILES ${arpon_etc_src}
+ DESTINATION /etc
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+@@ -41,7 +41,7 @@
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/etc
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+ COMPONENT Etc)
+-endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/")
++endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr")
+
+ #
+ # EOF
+--- a/run/CMakeLists.txt
++++ b/run/CMakeLists.txt
+@@ -31,7 +31,7 @@
+
+ set(arpon_run_src "${CMAKE_SOURCE_DIR}/run/arpon.pid")
+
+-if(${CMAKE_INSTALL_PREFIX} STREQUAL "/")
++if(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr")
+ install(FILES ${arpon_run_src}
+ DESTINATION /var/run
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+@@ -41,7 +41,7 @@
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/run
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+ COMPONENT Run)
+-endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/")
++endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr")
+
+ #
+ # EOF
+--- a/man8/CMakeLists.txt
++++ b/man8/CMakeLists.txt
+@@ -31,7 +31,7 @@
+
+ set(arpon_man_src "${CMAKE_SOURCE_DIR}/man8/arpon.8")
+
+-if(${CMAKE_INSTALL_PREFIX} STREQUAL "/")
++if(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr")
+ set(ARPON_DOC_FILE
+ "/usr/share/doc/arpon/index.html")
+ set(ARPON_ETC_FILE
+@@ -49,7 +49,7 @@
+ "${CMAKE_INSTALL_PREFIX}/log/arpon.log")
+ set(ARPON_PID_FILE
+ "${CMAKE_INSTALL_PREFIX}/run/arpon.pid")
+-endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/")
++endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr")
+
+ file(READ ${arpon_man_src} FILE_CONTENT)
+ string(REGEX REPLACE "ARPON_DOC" "${ARPON_DOC_FILE}"
+@@ -65,7 +65,7 @@
+ MODIFIED_FILE_CONTENT4 "${MODIFIED_FILE_CONTENT3}")
+ file(WRITE ${PROJECT_BINARY_DIR}/man8/arpon.8 "${MODIFIED_FILE_CONTENT4}")
+
+-if(${CMAKE_INSTALL_PREFIX} STREQUAL "/")
++if(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr")
+ install(FILES
+ ${PROJECT_BINARY_DIR}/man8/arpon.8 DESTINATION /usr/share/man/man8
+ PERMISSIONS OWNER_READ GROUP_READ WORLD_READ
+@@ -76,7 +76,7 @@
+ ${CMAKE_INSTALL_PREFIX}/share/man/man8
+ PERMISSIONS OWNER_READ GROUP_READ WORLD_READ
+ COMPONENT Man)
+-endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/")
++endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr")
+
+ #
+ # EOF
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -29,13 +29,13 @@
+ # $ArpON: CMakeLists.txt,v 3.0-ng 01/29/2016 03:07:40 spikey Exp $
+ #
+
+-if(${CMAKE_INSTALL_PREFIX} STREQUAL "/")
+- set(ARPON_SBIN /sbin/arpon)
++if(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr")
++ set(ARPON_SBIN /usr/sbin/arpon)
+ set(ARPON_DOC /usr/share/doc/arpon/index.html)
+ set(ARPON_ETC /etc/arpon.conf)
+ set(ARPON_LOG /var/log/arpon.log)
+ set(ARPON_PID /var/run/arpon.pid)
+- set(install_prefix /sbin)
++ set(install_prefix /usr/sbin)
+ else(${CMAKE_INSTALL_PREFIX} STREQUAL "/")
+ set(ARPON_SBIN ${CMAKE_INSTALL_PREFIX}/sbin/arpon)
+ set(ARPON_DOC ${CMAKE_INSTALL_PREFIX}/share/doc/arpon/index.html)
+@@ -43,7 +43,7 @@
+ set(ARPON_LOG ${CMAKE_INSTALL_PREFIX}/log/arpon.log)
+ set(ARPON_PID ${CMAKE_INSTALL_PREFIX}/run/arpon.pid)
+ set(install_prefix ${CMAKE_INSTALL_PREFIX}/sbin)
+-endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/")
++endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr")
+
+ configure_file(
+ "${PROJECT_SOURCE_DIR}/src/config.h.in"
diff --git a/net-analyzer/arpon/files/arpon.confd-3 b/net-analyzer/arpon/files/arpon.confd-3
new file mode 100644
index 000000000000..9508cb644ddf
--- /dev/null
+++ b/net-analyzer/arpon/files/arpon.confd-3
@@ -0,0 +1,4 @@
+METHOD="--darpi"
+IFACE="eth0"
+
+ARPON_OPTS="${METHOD} --interface ${IFACE}"
diff --git a/net-analyzer/arpon/files/arpon.initd-3 b/net-analyzer/arpon/files/arpon.initd-3
new file mode 100644
index 000000000000..0fad4cebb3bf
--- /dev/null
+++ b/net-analyzer/arpon/files/arpon.initd-3
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ checkpath -f /var/log/arpon.log
+ checkpath -f /var/run/arpon.pid
+ ebegin "Starting arpon"
+ start-stop-daemon --start --background --make-pidfile --pidfile "/var/run/arpon.pid" \
+ --exec /usr/sbin/arpon -- ${ARPON_OPTS} >/dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping arpon"
+ start-stop-daemon --stop --pidfile "/var/run/arpon.pid"
+ eend $?
+}