dev-cpp/pangomm: stable 2.42.1 for hppa, bug #717144
[gentoo.git] / net-analyzer / pmacct / pmacct-999999.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 inherit autotools flag-o-matic git-r3 toolchain-funcs
6
7 DESCRIPTION="A network tool to gather IP traffic information"
8 HOMEPAGE="http://www.pmacct.net/"
9 EGIT_REPO_URI="https://github.com/pmacct/pmacct/"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS=""
14 IUSE="
15         +bgp-bins +bmp-bins geoip geoipv2 jansson kafka +l2 mongodb mysql
16         ndpi nflog plabel postgres rabbitmq sqlite +st-bins +traffic-bins zmq
17 "
18 REQUIRED_USE="
19         ?? ( geoip geoipv2 )
20         kafka? ( jansson )
21         rabbitmq? ( jansson )
22 "
23
24 RDEPEND="
25         net-libs/libpcap
26         geoip? ( dev-libs/geoip )
27         geoipv2? ( dev-libs/libmaxminddb )
28         jansson? ( dev-libs/jansson )
29         kafka? ( dev-libs/librdkafka )
30         mongodb? (
31                 >=dev-libs/mongo-c-driver-0.8.1-r1
32                 <dev-libs/mongo-c-driver-0.98
33         )
34         mysql? ( dev-db/mysql-connector-c:0= )
35         ndpi? ( >=net-libs/nDPI-3.0:= )
36         nflog? ( net-libs/libnetfilter_log )
37         postgres? ( dev-db/postgresql:* )
38         rabbitmq? ( net-libs/rabbitmq-c )
39         sqlite? ( =dev-db/sqlite-3* )
40         zmq? ( >=net-libs/zeromq-4.2.0:= )
41 "
42 DEPEND="
43         ${RDEPEND}
44         virtual/pkgconfig
45 "
46
47 DOCS=(
48         CONFIG-KEYS ChangeLog FAQS QUICKSTART UPGRADE
49         docs/INTERNALS docs/PLUGINS docs/SIGNALS
50 )
51
52 src_prepare() {
53         default
54         sed -i -e 's|-Werror||g' configure.ac || die
55         eautoreconf
56 }
57
58 src_configure() {
59         tc-export CC AR RANLIB
60         append-cflags -fcommon
61
62         econf \
63                 $(use_enable bgp-bins) \
64                 $(use_enable bmp-bins) \
65                 $(use_enable geoip) \
66                 $(use_enable geoipv2) \
67                 $(use_enable jansson) \
68                 $(use_enable kafka) \
69                 $(use_enable l2) \
70                 $(use_enable plabel) \
71                 $(use_enable mongodb) \
72                 $(use_enable mysql) \
73                 $(use_enable ndpi) \
74                 $(use_enable nflog) \
75                 $(use_enable postgres pgsql) \
76                 $(use_enable rabbitmq) \
77                 $(use_enable sqlite sqlite3) \
78                 $(use_enable st-bins) \
79                 $(use_enable traffic-bins) \
80                 $(use_enable zmq) \
81                 --disable-debug
82 }
83
84 src_install() {
85         default
86
87         for dirname in examples sql telemetry; do
88                 docinto ${dirname}
89                 dodoc -r ${dirname}/*
90         done
91
92         newinitd "${FILESDIR}"/pmacctd-init.d pmacctd
93         newconfd "${FILESDIR}"/pmacctd-conf.d pmacctd
94
95         insinto /etc/pmacctd
96         newins examples/pmacctd-imt.conf.example pmacctd.conf
97 }