%global githubuser pmacct %global gitver 1f347193c11a2004d993868c6faaf9718acc0d6e %global gitshort %(r=%{gitver}; echo ${r:0:7}) %if 0%{?gitver:1} %global srcurl https://github.com/%{githubuser}/%{name}/archive/%{gitver}.tar.gz#/%{name}-%{gitver}.tar.gz %global setuppath %{name}-%{gitver} %else %global srcurl http://www.pmacct.net/pmacct-%{version}.tar.gz %global setuppath %{name}-%{version} %endif Name: pmacct Version: 1.7.6 Release: 0.2%{?gitver:.git%{gitshort}}%{?dist} Summary: Accounting and aggregation toolsuite for IPv4 and IPv6 License: GPLv2+ URL: http://www.pmacct.net/ Source0: %{srcurl} Source1: nfacctd.service Source2: nfacctd Source3: pmacctd.service Source4: pmacctd Source5: pmbgpd.service Source6: pmbgpd Source7: pmbmpd.service Source8: pmbmpd Source9: pmtelemetryd.service Source10: pmtelemetryd Source11: sfacctd.service Source12: sfacctd Source13: uacctd.service Source14: uacctd BuildRequires: gcc BuildRequires: libtool BuildRequires: libpcap-devel BuildRequires: mariadb-connector-c-devel BuildRequires: postgresql-devel BuildRequires: mongo-c-driver-devel BuildRequires: sqlite-devel BuildRequires: librabbitmq-devel BuildRequires: zeromq-devel >= 4.2.0 BuildRequires: librdkafka-devel BuildRequires: hiredis-devel BuildRequires: GeoIP-devel BuildRequires: libmaxminddb-devel BuildRequires: jansson-devel BuildRequires: avro-c-devel BuildRequires: libnetfilter_log-devel BuildRequires: nDPI-devel BuildRequires: systemd %{?systemd_requires} %description pmacct is a small set of passive network monitoring tools to measure, account, classify and aggregate IPv4 and IPv6 traffic; a pluggable and flexible architecture allows to store the collected traffic data into memory tables or SQL (MySQL, SQLite, PostgreSQL) databases. pmacct supports fully customizable historical data breakdown, flow sampling, filtering and tagging, recovery actions, and triggers. Libpcap, sFlow v2/v4/v5 and NetFlow v1/v5/v7/v8/v9 are supported, both unicast and multicast. Also, a client program makes it easy to export data to tools like RRDtool, GNUPlot, Net-SNMP, MRTG, and Cacti. %prep %autosetup -n %{setuppath} -p1 %build ./autogen.sh %configure \ --enable-plabel \ --enable-mysql \ --enable-pgsql \ --enable-sqlite3 \ --enable-rabbitmq \ --enable-zmq \ --enable-kafka \ --enable-redis \ --enable-geoipv2 \ --enable-jansson \ --enable-avro \ --enable-nflog \ --enable-ndpi %make_build V=1 %install rm -rf $RPM_BUILD_ROOT %make_install # install sample configuration files install -Dp examples/nfacctd-sql.conf.example %{buildroot}/%{_sysconfdir}/%{name}/nfacctd.conf install -Dp examples/pmacctd-sql.conf.example %{buildroot}/%{_sysconfdir}/%{name}/pmacctd.conf # install systemd units install -d %{buildroot}/%{_unitdir} %{buildroot}/%{_sysconfdir}/sysconfig install %{S:1} %{S:3} %{S:5} %{S:7} %{S:9} %{S:11} %{S:13} %{buildroot}/%{_unitdir} install %{S:2} %{S:4} %{S:6} %{S:8} %{S:10} %{S:12} %{S:14} %{buildroot}/%{_sysconfdir}/sysconfig # we already install docs and sample in %%doc rm -rf %{buildroot}/%{_datadir}/%{name} # What are these even doing there? rm %{buildroot}/%{_libdir}/%{name}/examples/custom/libcustom.la rm %{buildroot}/%{_libdir}/%{name}/examples/lg/pmbgp %post %systemd_post nfacctd.service %systemd_post pmacctd.service %systemd_post pmbgpd.service %systemd_post pmbmpd.service %systemd_post pmtelemetryd.service %systemd_post sfacctd.service %systemd_post uacctd.service %preun %systemd_preun nfacctd.service %systemd_preun pmacctd.service %systemd_preun pmbgpd.service %systemd_preun pmbmpd.service %systemd_preun pmtelemetryd.service %systemd_preun sfacctd.service %systemd_preun uacctd.service %postun %systemd_postun_with_restart nfacctd.service %systemd_postun_with_restart pmacctd.service %systemd_postun_with_restart pmbgpd.service %systemd_postun_with_restart pmbmpd.service %systemd_postun_with_restart pmtelemetryd.service %systemd_postun_with_restart sfacctd.service %systemd_postun_with_restart uacctd.service %files %license COPYING %doc docs examples sql %doc AUTHORS ChangeLog CONFIG-KEYS FAQS INSTALL QUICKSTART UPGRADE %config(noreplace) %{_sysconfdir}/pmacct/nfacctd.conf %config(noreplace) %{_sysconfdir}/pmacct/pmacctd.conf %config(noreplace) %{_sysconfdir}/sysconfig/nfacctd %config(noreplace) %{_sysconfdir}/sysconfig/pmacctd %config(noreplace) %{_sysconfdir}/sysconfig/pmbgpd %config(noreplace) %{_sysconfdir}/sysconfig/pmbmpd %config(noreplace) %{_sysconfdir}/sysconfig/pmtelemetryd %config(noreplace) %{_sysconfdir}/sysconfig/sfacctd %config(noreplace) %{_sysconfdir}/sysconfig/uacctd %{_bindir}/pmacct %{_sbindir}/nfacctd %{_sbindir}/pmacctd %{_sbindir}/pmbgpd %{_sbindir}/pmbmpd %{_sbindir}/pmtelemetryd %{_sbindir}/sfacctd %{_sbindir}/uacctd %{_unitdir}/nfacctd.service %{_unitdir}/pmacctd.service %{_unitdir}/pmbgpd.service %{_unitdir}/pmbmpd.service %{_unitdir}/pmtelemetryd.service %{_unitdir}/sfacctd.service %{_unitdir}/uacctd.service %changelog * Thu Oct 29 2020 Felix Kaechele - 1.7.6-0.2.git1f34719 - update to latest git snapshot * Mon Jun 22 2020 Felix Kaechele - 1.7.6-0.1.git6d59560 - update to latest git snapshot * Mon Feb 10 2020 Felix Kaechele - 1.7.4p1-1 - update to 1.7.4p1 * Fri Jan 03 2020 Felix Kaechele - 1.7.4-1 - update to 1.7.4 * Sun May 19 2019 Felix Kaechele - 1.7.3-1 - update to 1.7.3 * Mon Apr 15 2019 Felix Kaechele - 1.7.3-0.1.git3995a21 - update to latest git commit to enable nDPI support * Tue Dec 04 2018 Felix Kaechele - 1.7.2-1 - update to 1.7.2 * Tue Jul 10 2018 Felix Kaechele - 1.7.1-2 - add nDPI support * Thu Jun 14 2018 Felix Kaechele - initial package