ntopng/ntopng.spec

131 lines
3.6 KiB
RPMSpec

Name: ntopng
Version: 6.2
Release: 1mamba
Epoch: 1
Summary: A web-based network traffic monitoring application
Group: Network/Monitoring
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/ntop/nDPI
Source: https://github.com/ntop/ntopng.git/%{version}/ntopng-%{version}.tar.bz2
Source1: ntopng.sysusers.conf
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libatomic-devel
BuildRequires: libcap-devel
BuildRequires: libcurl-devel
BuildRequires: libexpat-devel
BuildRequires: libgcc
BuildRequires: libgpg-error-devel
BuildRequires: libhiredis-devel
BuildRequires: libjson-c-devel
BuildRequires: libmariadb-devel
BuildRequires: libmaxminddb-devel
BuildRequires: libnetsnmp-devel
BuildRequires: libnl1-devel
BuildRequires: libopenldap-devel
BuildRequires: libopenssl-devel
BuildRequires: libpcap-devel
BuildRequires: librrd-devel
BuildRequires: libsodium-devel
BuildRequires: libsqlite-devel
BuildRequires: libstdc++6-devel
BuildRequires: libwrap-devel
BuildRequires: libz-devel
BuildRequires: libzeromq-devel
BuildRequires: libzstd-devel
## AUTOBUILDREQ-END
BuildRequires: libnetsnmp-devel >= 5.9
BuildRequires: libndpi-devel
BuildRequires: rrdtool-devel >= 1.7.2
Requires: libGeoIP-tools
Provides: ntop
Obsoletes: ntop <= 5.0.1
%description
ntopng® is a web-based network traffic monitoring application released under GPLv3.
It is the new incarnation of the original ntop written in 1998, and now revamped in terms of performance, usability, and features.
%debug_package
%prep
%setup -q
#-D -T
#:<< _EOF
./autogen.sh --noconfig
%build
%configure \
--with-ndpi-includes=%{_includedir}/ndpi \
--with-ndpi-static-lib=%{_libdir} \
LDFLAGS="-L%{_libdir} -lgpg-error"
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall \
MAN_DIR=%{buildroot}%{_mandir}
install -d -m0755 %{buildroot}%{_sysconfdir}
cp -r packages/etc/ntopng %{buildroot}%{_sysconfdir}/
install -D -m0644 packages/etc/sudoers.d/ntopng %{buildroot}%{_sysconfdir}/sudoers.d/ntopng
install -D -m0644 packages/usr/bin/ntopctl %{buildroot}%{_bindir}/ntopctl
install -D -m0644 packages/etc/systemd/system/ntopng.service %{buildroot}%{_unitdir}/ntopng.service
install -D -m0644 packages/etc/systemd/system/ntopng@.service %{buildroot}%{_unitdir}/ntopng@.service
install -D -m0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/ntopng.conf
install -d -m0700 %{buildroot}/var/lib/ntopng
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%pre
%sysusers_create_package ntopng %{SOURCE1}
:
%post
%systemd_post ntopng
:
%preun
%systemd_preun ntopng
:
%postun
%systemd_postun ntopng
:
%files
%defattr(-,root,root)
%dir %{_sysconfdir}/ntopng
%config(noreplace) %{_sysconfdir}/ntopng/nedge.conf
%config(noreplace) %{_sysconfdir}/ntopng/ntopng.conf
%dir %{_sysconfdir}/ntopng/ntopng.conf.d
%{_sysconfdir}/ntopng/ntopng.conf.d/README
%{_sysconfdir}/ntopng/ntopng.conf.nprobe.sample
%{_sysconfdir}/sudoers.d/ntopng
%{_bindir}/ntopng
%{_bindir}/ntopctl
%{_unitdir}/ntopng.service
%{_unitdir}/ntopng@.service
%{_sysusersdir}/ntopng.conf
%dir %{_datadir}/ntopng
%{_datadir}/ntopng/*
%dir %attr(700,ntopng,ntopng) /var/lib/ntopng
%{_mandir}/man8/ntopng.8*
%doc COPYING
%changelog
* Wed Aug 14 2024 Automatic Build System <autodist@openmamba.org> 6.2-1mamba
- automatic version update by autodist
* Sun Feb 04 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 6.0-1mamba
- update to 6.0
* Mon Dec 14 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 4.2-1mamba
- package created