commit:     fbb974e265054c64a553d3bd5e0a9700710b2a1b
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 27 11:03:41 2020 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Sep 27 11:40:24 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fbb974e2

net-analyzer/arpon: Version 3.0

Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 net-analyzer/arpon/Manifest                     |   1 +
 net-analyzer/arpon/arpon-3.0.ebuild             |  40 +++++++
 net-analyzer/arpon/files/arpon-3.0-CFLAGS.patch |  17 +++
 net-analyzer/arpon/files/arpon-3.0-gentoo.patch | 146 ++++++++++++++++++++++++
 net-analyzer/arpon/files/arpon.confd-3          |   4 +
 net-analyzer/arpon/files/arpon.initd-3          |  21 ++++
 6 files changed, 229 insertions(+)

diff --git a/net-analyzer/arpon/Manifest b/net-analyzer/arpon/Manifest
index 1ff3b41863a..032e98bce0d 100644
--- a/net-analyzer/arpon/Manifest
+++ b/net-analyzer/arpon/Manifest
@@ -1 +1,2 @@
 DIST ArpON-2.7.2.tar.gz 2780607 BLAKE2B 
58d7a0db475658d90112441508d4c4d9babd601533a6ab9a22b24f07e037b6f3debcbe0f3c1f09a87b7e0cdf9217a38f52b85431db023d12b0f1ee58765e0bfb
 SHA512 
7518f8f8920817725c9b3e0a6420190dcc101b1c0c7cd9eec50870b3f893fe2322eddc90cb71e9c3c35326b4e1730aa02797ca51775caa9401807da3978628b4
+DIST ArpON-3.0-ng.tar.gz 8795979 BLAKE2B 
81b1fe9a426b5b0960911cbbac984482aeea15a957fac72a10e7dd9a45a609da90ca14163957cc008541be4cfaf426f07fa9c64ac4dff933f568b20284c5211d
 SHA512 
e6338018d65f3f8300958e168a9eb6f6be85cba21ae0aee4b03e9838a29a06afbf2448c2f104367aa18389cc549e4489bcf8dad384ad46eadf2884a0908238af

diff --git a/net-analyzer/arpon/arpon-3.0.ebuild 
b/net-analyzer/arpon/arpon-3.0.ebuild
new file mode 100644
index 00000000000..6d1866670e8
--- /dev/null
+++ b/net-analyzer/arpon/arpon-3.0.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit cmake
+
+DESCRIPTION="ArpON (Arp handler inspectiON) is a portable Arp handler"
+
+MY_PN="ArpON"
+MY_P="${MY_PN}-${PV}"
+HOMEPAGE="http://arpon.sourceforge.net/";
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}-ng.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+       dev-libs/libdnet
+       net-libs/libnet:1.1
+       net-libs/libpcap
+"
+RDEPEND="
+       ${DEPEND}
+"
+PATCHES=(
+       "${FILESDIR}"/${PN}-3.0-CFLAGS.patch
+       "${FILESDIR}"/${PN}-3.0-gentoo.patch
+)
+DOCS=( AUTHOR CHANGELOG README THANKS )
+S="${WORKDIR}"/${MY_P}-ng
+
+src_install() {
+       cmake_src_install
+       newinitd "${FILESDIR}"/${PN}.initd-3 ${PN}
+       newconfd "${FILESDIR}"/${PN}.confd-3 ${PN}
+
+       rm -r "${ED}"/var/{log,run} || die
+       mv "${ED}"/usr/share/doc/{${PN},${PF}} || die
+}

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 00000000000..7cc917b305c
--- /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 00000000000..1deda181acf
--- /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 00000000000..9508cb644dd
--- /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 00000000000..0fad4cebb3b
--- /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 $?
+}

Reply via email to