net-analyzer/ntopng: add 5.6

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James 2023-02-03 16:51:07 +00:00
parent 25646dfc75
commit 005b3a68af
No known key found for this signature in database
GPG Key ID: 738409F520DF9190
2 changed files with 98 additions and 0 deletions

View File

@ -1,2 +1,3 @@
DIST ntopng-5.2.1.tar.gz 60280025 BLAKE2B e7885a1ec9e5d37ee06def83a83c62f41acf87d939d18c33c8d114fe0bed0c973a6146f26fd92343aa7c7e7484970c3e95c33fe76468fe382809daddeed6541b SHA512 01cdf21deac61a3b11e7d0e6b662c911123241332e812bb676cb8c5c003fe1d50a4c61231f9c327d467e89dd1345fc1bdbab5d2599fe04b04a8fe12654c01bdd
DIST ntopng-5.4.tar.gz 42662921 BLAKE2B 67a44291671821a94ed0a849467e85030e57fff07b49e61c299f3c09efcad1a7dac5b835f4fc51a2554f7e7d7ae60ae0bd135adba7afa71e505a40d4e9243462 SHA512 3a7d84f64127779780c580c198dfc90bc0a4957e9fb68493babb5381d9127451c506a06d134a488d869840e2b10e7d87a09ec590fd3a5d782e426cab640632cb
DIST ntopng-5.6.tar.gz 46318113 BLAKE2B 48702b55c239edca46d6cdecb846ac358c9a829a261eee128444bd994b967c962577a419466f139a2aefdd3a51485d2bb17bf39b8f35a9a31322c40c07203a5d SHA512 c4ab79f98b2dc99218cd0c7ac0ed7275d23e7a161de742632f3ec7a538ea4948ba906d40e7fd2ba36fb4bd9be86ecc69f5df65e7f81607e6da489863947b2da5

View File

@ -0,0 +1,97 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools toolchain-funcs
DESCRIPTION="Network traffic analyzer with web interface"
HOMEPAGE="https://www.ntop.org/"
SRC_URI="https://github.com/ntop/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
DEPEND="dev-db/mysql-connector-c:=
dev-db/sqlite:3
dev-libs/hiredis:=
dev-libs/json-c:=
dev-libs/libmaxminddb
dev-libs/libsodium:=
dev-libs/openssl:=
net-analyzer/rrdtool
net-libs/libpcap
>=net-libs/nDPI-4.6:=
<net-libs/nDPI-4.8:=
>=net-libs/zeromq-3:=
net-misc/curl
sys-libs/libcap
sys-libs/zlib"
RDEPEND="${DEPEND}
acct-user/ntopng
acct-group/ntopng
dev-db/redis"
BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}"/${PN}-5.2.1-mysqltool.patch
"${FILESDIR}"/${PN}-5.4-ndpi-linking.patch
)
src_prepare() {
default
# Follows upstream's autogen.sh
sed \
-e "s/@VERSION@/${PV}.$(date +%y%m%d)/g" \
-e "s/@SHORT_VERSION@/${PV}/g" \
-e "s/@GIT_DATE@/$(date)/g" \
-e "s/@GIT_RELEASE@/${PV}.$(date +%y%m%d)/g" \
-e "s/@GIT_BRANCH@//g" < "${S}/configure.ac.in" \
> "${S}/configure.ac" || die
eautoreconf
}
src_configure() {
tc-export PKG_CONFIG
# configure.ac.in at least has some bashisms(?) which get lost(?)
# in conversion to configure.ac (like [ -> nothing?) so just force
# bash for now. It's still not quite right but at least upstream will be
# testing with it. TODO: fix this!
CONFIG_SHELL="${BROOT}/bin/bash" econf --with-ndpi-includes="${ESYSROOT}"/usr/include/ndpi
}
src_compile() {
emake \
CC="$(tc-getCC)" \
MYCFLAGS="${CFLAGS}" \
MYLDFLAGS="${LDFLAGS}"
}
src_install() {
SHARE_NTOPNG_DIR="${EPREFIX}/usr/share/${PN}"
insinto "${SHARE_NTOPNG_DIR}"
doins -r httpdocs
doins -r scripts
insinto "${SHARE_NTOPNG_DIR}/third-party"
doins -r third-party/i18n.lua-master
doins -r third-party/lua-resty-template-master
exeinto /usr/bin
doexe "${PN}"
doman "${PN}.8"
newinitd "${FILESDIR}"/ntopng.init.d ntopng
newconfd "${FILESDIR}"/ntopng.conf.d ntopng
keepdir /var/lib/ntopng
fowners ntopng /var/lib/ntopng
}
pkg_postinst() {
elog "ntopng default credentials are user='admin' password='admin'"
}