1 |
commit: fbb974e265054c64a553d3bd5e0a9700710b2a1b |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 27 11:03:41 2020 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 27 11:40:24 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fbb974e2 |
7 |
|
8 |
net-analyzer/arpon: Version 3.0 |
9 |
|
10 |
Package-Manager: Portage-3.0.8, Repoman-3.0.1 |
11 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
12 |
|
13 |
net-analyzer/arpon/Manifest | 1 + |
14 |
net-analyzer/arpon/arpon-3.0.ebuild | 40 +++++++ |
15 |
net-analyzer/arpon/files/arpon-3.0-CFLAGS.patch | 17 +++ |
16 |
net-analyzer/arpon/files/arpon-3.0-gentoo.patch | 146 ++++++++++++++++++++++++ |
17 |
net-analyzer/arpon/files/arpon.confd-3 | 4 + |
18 |
net-analyzer/arpon/files/arpon.initd-3 | 21 ++++ |
19 |
6 files changed, 229 insertions(+) |
20 |
|
21 |
diff --git a/net-analyzer/arpon/Manifest b/net-analyzer/arpon/Manifest |
22 |
index 1ff3b41863a..032e98bce0d 100644 |
23 |
--- a/net-analyzer/arpon/Manifest |
24 |
+++ b/net-analyzer/arpon/Manifest |
25 |
@@ -1 +1,2 @@ |
26 |
DIST ArpON-2.7.2.tar.gz 2780607 BLAKE2B 58d7a0db475658d90112441508d4c4d9babd601533a6ab9a22b24f07e037b6f3debcbe0f3c1f09a87b7e0cdf9217a38f52b85431db023d12b0f1ee58765e0bfb SHA512 7518f8f8920817725c9b3e0a6420190dcc101b1c0c7cd9eec50870b3f893fe2322eddc90cb71e9c3c35326b4e1730aa02797ca51775caa9401807da3978628b4 |
27 |
+DIST ArpON-3.0-ng.tar.gz 8795979 BLAKE2B 81b1fe9a426b5b0960911cbbac984482aeea15a957fac72a10e7dd9a45a609da90ca14163957cc008541be4cfaf426f07fa9c64ac4dff933f568b20284c5211d SHA512 e6338018d65f3f8300958e168a9eb6f6be85cba21ae0aee4b03e9838a29a06afbf2448c2f104367aa18389cc549e4489bcf8dad384ad46eadf2884a0908238af |
28 |
|
29 |
diff --git a/net-analyzer/arpon/arpon-3.0.ebuild b/net-analyzer/arpon/arpon-3.0.ebuild |
30 |
new file mode 100644 |
31 |
index 00000000000..6d1866670e8 |
32 |
--- /dev/null |
33 |
+++ b/net-analyzer/arpon/arpon-3.0.ebuild |
34 |
@@ -0,0 +1,40 @@ |
35 |
+# Copyright 1999-2020 Gentoo Authors |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+ |
38 |
+EAPI=7 |
39 |
+inherit cmake |
40 |
+ |
41 |
+DESCRIPTION="ArpON (Arp handler inspectiON) is a portable Arp handler" |
42 |
+ |
43 |
+MY_PN="ArpON" |
44 |
+MY_P="${MY_PN}-${PV}" |
45 |
+HOMEPAGE="http://arpon.sourceforge.net/" |
46 |
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}-ng.tar.gz" |
47 |
+ |
48 |
+LICENSE="BSD-2" |
49 |
+SLOT="0" |
50 |
+KEYWORDS="~amd64 ~x86" |
51 |
+ |
52 |
+DEPEND=" |
53 |
+ dev-libs/libdnet |
54 |
+ net-libs/libnet:1.1 |
55 |
+ net-libs/libpcap |
56 |
+" |
57 |
+RDEPEND=" |
58 |
+ ${DEPEND} |
59 |
+" |
60 |
+PATCHES=( |
61 |
+ "${FILESDIR}"/${PN}-3.0-CFLAGS.patch |
62 |
+ "${FILESDIR}"/${PN}-3.0-gentoo.patch |
63 |
+) |
64 |
+DOCS=( AUTHOR CHANGELOG README THANKS ) |
65 |
+S="${WORKDIR}"/${MY_P}-ng |
66 |
+ |
67 |
+src_install() { |
68 |
+ cmake_src_install |
69 |
+ newinitd "${FILESDIR}"/${PN}.initd-3 ${PN} |
70 |
+ newconfd "${FILESDIR}"/${PN}.confd-3 ${PN} |
71 |
+ |
72 |
+ rm -r "${ED}"/var/{log,run} || die |
73 |
+ mv "${ED}"/usr/share/doc/{${PN},${PF}} || die |
74 |
+} |
75 |
|
76 |
diff --git a/net-analyzer/arpon/files/arpon-3.0-CFLAGS.patch b/net-analyzer/arpon/files/arpon-3.0-CFLAGS.patch |
77 |
new file mode 100644 |
78 |
index 00000000000..7cc917b305c |
79 |
--- /dev/null |
80 |
+++ b/net-analyzer/arpon/files/arpon-3.0-CFLAGS.patch |
81 |
@@ -0,0 +1,17 @@ |
82 |
+--- a/CMakeLists.txt |
83 |
++++ b/CMakeLists.txt |
84 |
+@@ -88,12 +88,12 @@ |
85 |
+ message(STATUS "Build type: Debug") |
86 |
+ |
87 |
+ set(CMAKE_BUILD_TYPE "Debug") |
88 |
+- 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") |
89 |
++ 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") |
90 |
+ else(cmake_build_type_tolower STREQUAL "debug") |
91 |
+ message(STATUS "Build type: Release") |
92 |
+ |
93 |
+ set(CMAKE_BUILD_TYPE "Release") |
94 |
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wextra -O3 -DNDEBUG") |
95 |
++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -DNDEBUG") |
96 |
+ endif(cmake_build_type_tolower STREQUAL "debug") |
97 |
+ |
98 |
+ find_package(Headers) |
99 |
|
100 |
diff --git a/net-analyzer/arpon/files/arpon-3.0-gentoo.patch b/net-analyzer/arpon/files/arpon-3.0-gentoo.patch |
101 |
new file mode 100644 |
102 |
index 00000000000..1deda181acf |
103 |
--- /dev/null |
104 |
+++ b/net-analyzer/arpon/files/arpon-3.0-gentoo.patch |
105 |
@@ -0,0 +1,146 @@ |
106 |
+--- a/doc/CMakeLists.txt |
107 |
++++ b/doc/CMakeLists.txt |
108 |
+@@ -31,7 +31,7 @@ |
109 |
+ |
110 |
+ set(arpon_doc_src "${CMAKE_SOURCE_DIR}/doc/arpon") |
111 |
+ |
112 |
+-if(${CMAKE_INSTALL_PREFIX} STREQUAL "/") |
113 |
++if(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr") |
114 |
+ install(DIRECTORY ${arpon_doc_src} |
115 |
+ DESTINATION /usr/share/doc |
116 |
+ FILE_PERMISSIONS OWNER_READ GROUP_READ WORLD_READ |
117 |
+@@ -41,7 +41,7 @@ |
118 |
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc |
119 |
+ FILE_PERMISSIONS OWNER_READ GROUP_READ WORLD_READ |
120 |
+ COMPONENT Doc) |
121 |
+-endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/") |
122 |
++endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr") |
123 |
+ |
124 |
+ # |
125 |
+ # EOF |
126 |
+--- a/log/CMakeLists.txt |
127 |
++++ b/log/CMakeLists.txt |
128 |
+@@ -31,7 +31,7 @@ |
129 |
+ |
130 |
+ set(arpon_log_src "${CMAKE_SOURCE_DIR}/log/arpon.log") |
131 |
+ |
132 |
+-if(${CMAKE_INSTALL_PREFIX} STREQUAL "/") |
133 |
++if(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr") |
134 |
+ install(FILES ${arpon_log_src} |
135 |
+ DESTINATION /var/log |
136 |
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ |
137 |
+@@ -41,7 +41,7 @@ |
138 |
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/log |
139 |
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ |
140 |
+ COMPONENT Log) |
141 |
+-endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/") |
142 |
++endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr") |
143 |
+ |
144 |
+ # |
145 |
+ # EOF |
146 |
+--- a/etc/CMakeLists.txt |
147 |
++++ b/etc/CMakeLists.txt |
148 |
+@@ -31,7 +31,7 @@ |
149 |
+ |
150 |
+ set(arpon_etc_src "${CMAKE_SOURCE_DIR}/etc/arpon.conf") |
151 |
+ |
152 |
+-if(${CMAKE_INSTALL_PREFIX} STREQUAL "/") |
153 |
++if(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr") |
154 |
+ install(FILES ${arpon_etc_src} |
155 |
+ DESTINATION /etc |
156 |
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ |
157 |
+@@ -41,7 +41,7 @@ |
158 |
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/etc |
159 |
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ |
160 |
+ COMPONENT Etc) |
161 |
+-endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/") |
162 |
++endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr") |
163 |
+ |
164 |
+ # |
165 |
+ # EOF |
166 |
+--- a/run/CMakeLists.txt |
167 |
++++ b/run/CMakeLists.txt |
168 |
+@@ -31,7 +31,7 @@ |
169 |
+ |
170 |
+ set(arpon_run_src "${CMAKE_SOURCE_DIR}/run/arpon.pid") |
171 |
+ |
172 |
+-if(${CMAKE_INSTALL_PREFIX} STREQUAL "/") |
173 |
++if(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr") |
174 |
+ install(FILES ${arpon_run_src} |
175 |
+ DESTINATION /var/run |
176 |
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ |
177 |
+@@ -41,7 +41,7 @@ |
178 |
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/run |
179 |
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ |
180 |
+ COMPONENT Run) |
181 |
+-endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/") |
182 |
++endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr") |
183 |
+ |
184 |
+ # |
185 |
+ # EOF |
186 |
+--- a/man8/CMakeLists.txt |
187 |
++++ b/man8/CMakeLists.txt |
188 |
+@@ -31,7 +31,7 @@ |
189 |
+ |
190 |
+ set(arpon_man_src "${CMAKE_SOURCE_DIR}/man8/arpon.8") |
191 |
+ |
192 |
+-if(${CMAKE_INSTALL_PREFIX} STREQUAL "/") |
193 |
++if(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr") |
194 |
+ set(ARPON_DOC_FILE |
195 |
+ "/usr/share/doc/arpon/index.html") |
196 |
+ set(ARPON_ETC_FILE |
197 |
+@@ -49,7 +49,7 @@ |
198 |
+ "${CMAKE_INSTALL_PREFIX}/log/arpon.log") |
199 |
+ set(ARPON_PID_FILE |
200 |
+ "${CMAKE_INSTALL_PREFIX}/run/arpon.pid") |
201 |
+-endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/") |
202 |
++endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr") |
203 |
+ |
204 |
+ file(READ ${arpon_man_src} FILE_CONTENT) |
205 |
+ string(REGEX REPLACE "ARPON_DOC" "${ARPON_DOC_FILE}" |
206 |
+@@ -65,7 +65,7 @@ |
207 |
+ MODIFIED_FILE_CONTENT4 "${MODIFIED_FILE_CONTENT3}") |
208 |
+ file(WRITE ${PROJECT_BINARY_DIR}/man8/arpon.8 "${MODIFIED_FILE_CONTENT4}") |
209 |
+ |
210 |
+-if(${CMAKE_INSTALL_PREFIX} STREQUAL "/") |
211 |
++if(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr") |
212 |
+ install(FILES |
213 |
+ ${PROJECT_BINARY_DIR}/man8/arpon.8 DESTINATION /usr/share/man/man8 |
214 |
+ PERMISSIONS OWNER_READ GROUP_READ WORLD_READ |
215 |
+@@ -76,7 +76,7 @@ |
216 |
+ ${CMAKE_INSTALL_PREFIX}/share/man/man8 |
217 |
+ PERMISSIONS OWNER_READ GROUP_READ WORLD_READ |
218 |
+ COMPONENT Man) |
219 |
+-endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/") |
220 |
++endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr") |
221 |
+ |
222 |
+ # |
223 |
+ # EOF |
224 |
+--- a/src/CMakeLists.txt |
225 |
++++ b/src/CMakeLists.txt |
226 |
+@@ -29,13 +29,13 @@ |
227 |
+ # $ArpON: CMakeLists.txt,v 3.0-ng 01/29/2016 03:07:40 spikey Exp $ |
228 |
+ # |
229 |
+ |
230 |
+-if(${CMAKE_INSTALL_PREFIX} STREQUAL "/") |
231 |
+- set(ARPON_SBIN /sbin/arpon) |
232 |
++if(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr") |
233 |
++ set(ARPON_SBIN /usr/sbin/arpon) |
234 |
+ set(ARPON_DOC /usr/share/doc/arpon/index.html) |
235 |
+ set(ARPON_ETC /etc/arpon.conf) |
236 |
+ set(ARPON_LOG /var/log/arpon.log) |
237 |
+ set(ARPON_PID /var/run/arpon.pid) |
238 |
+- set(install_prefix /sbin) |
239 |
++ set(install_prefix /usr/sbin) |
240 |
+ else(${CMAKE_INSTALL_PREFIX} STREQUAL "/") |
241 |
+ set(ARPON_SBIN ${CMAKE_INSTALL_PREFIX}/sbin/arpon) |
242 |
+ set(ARPON_DOC ${CMAKE_INSTALL_PREFIX}/share/doc/arpon/index.html) |
243 |
+@@ -43,7 +43,7 @@ |
244 |
+ set(ARPON_LOG ${CMAKE_INSTALL_PREFIX}/log/arpon.log) |
245 |
+ set(ARPON_PID ${CMAKE_INSTALL_PREFIX}/run/arpon.pid) |
246 |
+ set(install_prefix ${CMAKE_INSTALL_PREFIX}/sbin) |
247 |
+-endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/") |
248 |
++endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr") |
249 |
+ |
250 |
+ configure_file( |
251 |
+ "${PROJECT_SOURCE_DIR}/src/config.h.in" |
252 |
|
253 |
diff --git a/net-analyzer/arpon/files/arpon.confd-3 b/net-analyzer/arpon/files/arpon.confd-3 |
254 |
new file mode 100644 |
255 |
index 00000000000..9508cb644dd |
256 |
--- /dev/null |
257 |
+++ b/net-analyzer/arpon/files/arpon.confd-3 |
258 |
@@ -0,0 +1,4 @@ |
259 |
+METHOD="--darpi" |
260 |
+IFACE="eth0" |
261 |
+ |
262 |
+ARPON_OPTS="${METHOD} --interface ${IFACE}" |
263 |
|
264 |
diff --git a/net-analyzer/arpon/files/arpon.initd-3 b/net-analyzer/arpon/files/arpon.initd-3 |
265 |
new file mode 100644 |
266 |
index 00000000000..0fad4cebb3b |
267 |
--- /dev/null |
268 |
+++ b/net-analyzer/arpon/files/arpon.initd-3 |
269 |
@@ -0,0 +1,21 @@ |
270 |
+#!/sbin/openrc-run |
271 |
+# Distributed under the terms of the GNU General Public License v2 |
272 |
+ |
273 |
+depend() { |
274 |
+ need net |
275 |
+} |
276 |
+ |
277 |
+start() { |
278 |
+ checkpath -f /var/log/arpon.log |
279 |
+ checkpath -f /var/run/arpon.pid |
280 |
+ ebegin "Starting arpon" |
281 |
+ start-stop-daemon --start --background --make-pidfile --pidfile "/var/run/arpon.pid" \ |
282 |
+ --exec /usr/sbin/arpon -- ${ARPON_OPTS} >/dev/null 2>&1 |
283 |
+ eend $? |
284 |
+} |
285 |
+ |
286 |
+stop() { |
287 |
+ ebegin "Stopping arpon" |
288 |
+ start-stop-daemon --stop --pidfile "/var/run/arpon.pid" |
289 |
+ eend $? |
290 |
+} |