net-libs/rpcsvc-proto: arm stable wrt bug #725002
[gentoo.git] / net-libs / nDPI / nDPI-3.0-r1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 inherit autotools multilib
6
7 DESCRIPTION="Open Source Deep Packet Inspection Software Toolkit"
8 HOMEPAGE="https://www.ntop.org/"
9 SRC_URI="https://github.com/ntop/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
10
11 LICENSE="GPL-3"
12 SLOT="0/$(ver_cut 1)"
13 KEYWORDS="~amd64 ~x86"
14 IUSE="static-libs"
15
16 DEPEND="
17         dev-libs/json-c:=
18         net-libs/libpcap
19 "
20 RDEPEND="
21         ${DEPEND}
22 "
23
24 src_prepare() {
25         sed \
26                 -e "s/@NDPI_MAJOR@/$(ver_cut 1)/g" \
27                 -e "s/@NDPI_MINOR@/$(ver_cut 2)/g" \
28                 -e "s/@NDPI_PATCH@/$(ver_cut 3)/g" \
29                 -e "s/@NDPI_VERSION_SHORT@/${PV}/g" \
30                 < "${S}/configure.seed" \
31                 > "${S}/configure.ac" || die
32
33         sed -i \
34                 -e "s%^libdir\s*=\s*\${prefix}/lib\s*$%libdir     = \${prefix}/$(get_libdir)%" \
35                 src/lib/Makefile.in || die
36
37         default
38         eautoreconf
39 }
40
41 src_install() {
42         default
43         if ! use static-libs; then
44                 rm "${D}"/usr/$(get_libdir)/lib${PN,,}.a || die
45         fi
46 }