%global pmacct_use_commit 1 %global pmacct_version 1.7.10 %global pmacct_commit 0313be4022c155b81d07b6a547f5a35eff4aea87 %global pmacct_prerelease git.20250812152301 %global libcdada_commit 722edce044d2223681218deb2608c519cb35c118 Name: pmacct Version: %{pmacct_version}%{?pmacct_prerelease:~%{pmacct_prerelease}} Release: 1%{?dist} Summary: pmacct is a small set of multi-purpose passive network monitoring tools [NetFlow IPFIX sFlow libpcap BGP BMP RPKI IGP Streaming Telemetry] License: GPL AND ISC Group: Networking/Utilities URL: https://github.com/pmacct/pmacct %if %{pmacct_use_commit} Source0: https://github.com/pmacct/pmacct/archive/%{pmacct_commit}.tar.gz %else Source0: https://github.com/pmacct/pmacct/archive/refs/tags/v%{version}.tar.gz %endif Source1: https://github.com/msune/libcdada/archive/%{libcdada_commit}.tar.gz Patch0: patch-disable-cdada-examples.patch %if !%{pmacct_use_commit} Patch1: patch-disable-configure-help-replace.patch %endif ExclusiveArch: x86_64 aarch64 BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: git BuildRequires: libtool BuildRequires: python3-rpm-macros BuildRequires: libpcap-devel BuildRequires: python3 BuildRequires: mysql-devel numactl-devel BuildRequires: libpq-devel BuildRequires: sqlite-devel BuildRequires: librabbitmq-devel BuildRequires: zeromq-devel BuildRequires: librdkafka-devel BuildRequires: hiredis-devel BuildRequires: libmaxminddb-devel BuildRequires: jansson-devel BuildRequires: libbpf-devel BuildRequires: libnetfilter_log-devel %description %{summary}. %prep %if %{pmacct_use_commit} %autosetup -N -n %{name}-%{pmacct_commit} echo %{pmacct_version}-%{pmacct_prerelease}.%{pmacct_commit} > VERSION %else %autosetup -N -n %{name}-%{version} echo %{pmacct_version}%{?pmacct_prerelease:-%{pmacct_prerelease}} > VERSION %endif patch --strip=1 --fuzz=3 < "%{PATCH0}" %if !%{pmacct_use_commit} patch --strip=1 --fuzz=3 < "%{PATCH1}" %endif pushd src/external_libs rm --recursive libcdada tar --extract --file "%{SOURCE1}" mv libcdada-%{libcdada_commit} libcdada popd ./autogen.sh %configure \ --disable-silent-rules \ --enable-mysql \ --enable-pgsql \ --enable-sqlite3 \ --enable-rabbitmq \ --enable-zmq \ --enable-kafka \ --enable-redis \ --enable-geoipv2 \ --enable-jansson \ --enable-ebpf \ --enable-nflog #The following flags require external libraries #--enable-mongodb #--enable-avro #--enable-serdes #--enable-ndpi #--enable-unyte-udp-notif #--enable-grpc-collector %build %make_build %install make install DESTDIR=%{buildroot} %py3_shebang_fix %{buildroot}%{_datadir}/pmacct/examples/*/*.py %files %license README.md %license COPYING %{_bindir}/* %{_datadir}/pmacct/** %{_libdir}/pmacct/** %if 0%{?fedora} <= 41 %{_sbindir}/* %endif %changelog %autochangelog