Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/ntopng/
Date: Mon, 03 Jan 2022 11:23:19
Message-Id: 1641208881.39868efcc6779ea5e5272c3434e4a59f0bae9aa1.sam@gentoo
1 commit: 39868efcc6779ea5e5272c3434e4a59f0bae9aa1
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 3 11:20:05 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 3 11:21:21 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39868efc
7
8 net-analyzer/ntopng: add 5.0
9
10 As with nDPI, aware of the ar-directly and other similar bugs,
11 but am trying to address this first upstream & go from there.
12
13 Bug: https://bugs.gentoo.org/799782
14 Bug: https://bugs.gentoo.org/830403
15 Signed-off-by: Sam James <sam <AT> gentoo.org>
16
17 net-analyzer/ntopng/Manifest | 1 +
18 net-analyzer/ntopng/ntopng-5.0.ebuild | 92 +++++++++++++++++++++++++++++++++++
19 2 files changed, 93 insertions(+)
20
21 diff --git a/net-analyzer/ntopng/Manifest b/net-analyzer/ntopng/Manifest
22 index 29da3cb09be7..9a94093e2365 100644
23 --- a/net-analyzer/ntopng/Manifest
24 +++ b/net-analyzer/ntopng/Manifest
25 @@ -1 +1,2 @@
26 DIST ntopng-4.2.tar.gz 57554819 BLAKE2B a9eaf7ea670dbd9c830696a4b017330e25a82307852a0a85d95ddbb4e32a3123d43eda1b686c359da1fef77e601cd3791dcdf257141e2e1d3ed7974b92edaac8 SHA512 e89ec3f35644ae8bc570d9802ecfadbf0067145e23a589df2032e8781e9c954f4166d3abb650ddafc65e4fbad656730ee1abf9c5273d3e09f8173d423436b8ff
27 +DIST ntopng-5.0.tar.gz 57935381 BLAKE2B 420bda10ecc264d6baea0714367e8c475e72480ab1a114251c6712535ad1415288154623aa3ef780a5bab55bec684ddd7c0582997654f8fbb96ec08e17cb099f SHA512 e157430d9c98871d0136d2f51af6c7fed3a95fa21f8d3a9447ee69ac2aaee3752b6eddfd584715e3ee36234fd0fdcf865b761b0ec1a08727f6d988bc115d21e6
28
29 diff --git a/net-analyzer/ntopng/ntopng-5.0.ebuild b/net-analyzer/ntopng/ntopng-5.0.ebuild
30 new file mode 100644
31 index 000000000000..e879c8456307
32 --- /dev/null
33 +++ b/net-analyzer/ntopng/ntopng-5.0.ebuild
34 @@ -0,0 +1,92 @@
35 +# Copyright 1999-2022 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=8
39 +
40 +inherit autotools toolchain-funcs
41 +
42 +DESCRIPTION="Network traffic analyzer with web interface"
43 +HOMEPAGE="https://www.ntop.org/"
44 +SRC_URI="https://github.com/ntop/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
45 +
46 +LICENSE="GPL-3"
47 +SLOT="0"
48 +KEYWORDS="~amd64 ~x86"
49 +
50 +DEPEND="dev-db/mysql-connector-c:=
51 + dev-db/sqlite:3
52 + dev-libs/hiredis:=
53 + dev-libs/json-c:=
54 + dev-libs/libmaxminddb
55 + dev-libs/libsodium:=
56 + dev-libs/openssl:=
57 + net-analyzer/rrdtool
58 + net-libs/libpcap
59 + >=net-libs/nDPI-3.0:=
60 + >=net-libs/zeromq-3:=
61 + net-misc/curl
62 + sys-libs/libcap
63 + sys-libs/zlib"
64 +RDEPEND="${DEPEND}
65 + acct-user/ntopng
66 + acct-group/ntopng
67 + dev-db/redis"
68 +BDEPEND="virtual/pkgconfig"
69 +
70 +PATCHES=(
71 + "${FILESDIR}"/${PN}-4.2-mysqltool.patch
72 + "${FILESDIR}"/${PN}-4.2-parallel-make.patch
73 + "${FILESDIR}"/${PN}-4.0-ndpi-includes.patch
74 +)
75 +
76 +src_prepare() {
77 + default
78 +
79 + # Follows upstream's autogen.sh
80 + sed \
81 + -e "s/@VERSION@/${PV}.$(date +%y%m%d)/g" \
82 + -e "s/@SHORT_VERSION@/${PV}/g" \
83 + -e "s/@GIT_DATE@/$(date)/g" \
84 + -e "s/@GIT_RELEASE@/${PV}.$(date +%y%m%d)/g" \
85 + -e "s/@GIT_BRANCH@//g" < "${S}/configure.seed" \
86 + > "${S}/configure.ac" || die
87 +
88 + eautoreconf
89 +}
90 +
91 +src_configure() {
92 + tc-export PKG_CONFIG
93 + default
94 +}
95 +
96 +src_compile() {
97 + emake \
98 + CC="$(tc-getCC)" \
99 + MYCFLAGS="${CFLAGS}" \
100 + MYLDFLAGS="${LDFLAGS}"
101 +}
102 +
103 +src_install() {
104 + SHARE_NTOPNG_DIR="${EPREFIX}/usr/share/${PN}"
105 + insinto "${SHARE_NTOPNG_DIR}"
106 + doins -r httpdocs
107 + doins -r scripts
108 +
109 + insinto "${SHARE_NTOPNG_DIR}/third-party"
110 + doins -r third-party/i18n.lua-master
111 + doins -r third-party/lua-resty-template-master
112 +
113 + exeinto /usr/bin
114 + doexe "${PN}"
115 + doman "${PN}.8"
116 +
117 + newinitd "${FILESDIR}"/ntopng.init.d ntopng
118 + newconfd "${FILESDIR}"/ntopng.conf.d ntopng
119 +
120 + keepdir /var/lib/ntopng
121 + fowners ntopng /var/lib/ntopng
122 +}
123 +
124 +pkg_postinst() {
125 + elog "ntopng default credentials are user='admin' password='admin'"
126 +}