%global githubuser ntop # %%global gitver f7e7ef2f30620e604b3ecaeec1c166ad36da59a9 # %%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 https://github.com/%{githubuser}/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz %global setuppath %{name}-%{version} %endif Name: nDPI Version: 3.4 Release: 1%{?gitshort:.git%{gitshort}}%{?dist} Summary: Open source deep packet inspection License: LGPLv3 URL: https://github.com/%{githubuser}/%{name} Source0: %{srcurl} Patch0: nDPI-fix-hardcoded-path.patch BuildRequires: gcc-c++ BuildRequires: automake BuildRequires: libtool BuildRequires: json-c-devel BuildRequires: libpcap-devel %description nDPI is a ntop-maintained superset of the popular OpenDPI library. Released under the GPL license, its goal is to extend the original library by adding new protocols that are otherwise available only on the paid version of OpenDPI. In addition to Unix platforms, we also support Windows, in order to provide you a cross-platform DPI experience. Furthermore, we have modified nDPI do be more suitable for traffic monitoring applications, by disabling specific features that slow down the DPI engine while being them un-necessary for network traffic monitoring. nDPI is used by both ntop and nProbe for adding application-layer detection of protocols, regardless of the port being used. This means that it is possible to both detect known protocols on non-standard ports (e.g. detect http non ports other than 80), and also the opposite (e.g. detect Skype traffic on port 80). This is because nowadays the concept of port=application no longer holds. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %package static Summary: Static library files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description static The %{name}-static package contains static library files for applications that use %{name}. %prep %autosetup -n %{setuppath} -p1 %build sed -i '/^\.\/configure/d' autogen.sh ./autogen.sh %configure --with-pic %make_build %install rm -rf $RPM_BUILD_ROOT %make_install find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' # WTF? rm -rf $RPM_BUILD_ROOT%{_sbindir}/ndpi/ %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %license COPYING %doc CHANGELOG.md README.md README.nDPI README.protocols %doc doc/nDPI_QuickStartGuide.pdf %doc example/categories.txt example/protos.txt %{_bindir}/ndpiReader %{_datadir}/ndpi %{_libdir}/libndpi.so.* %files devel %license COPYING %doc CHANGELOG.md README.md README.nDPI README.protocols %doc doc/nDPI_QuickStartGuide.pdf %{_includedir}/ndpi %{_libdir}/libndpi.so %{_libdir}/pkgconfig/libndpi.pc %files static %license COPYING %{_libdir}/libndpi.a %changelog * Thu Oct 29 2020 Felix Kaechele - 3.4-1 - update to 3.4 * Mon Jun 22 2020 Felix Kaechele - 3.2-1 - update to 3.2 * Fri Jan 03 2020 Felix Kaechele - 3.0-1 - update to 3.0 * Mon Apr 15 2019 Felix Kaechele - 2.8-1 - update to 2.8 * Mon Nov 05 2018 Felix Kaechele - 2.5-0.1.gitf7e7ef2 - update to latest git commit * Tue Jul 10 2018 Felix Kaechele - 2.3.0-0.1.gitf942cef - initial package