## START: Set by rpmautospec ## (rpmautospec version 0.7.2) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec Name: portsentry %global forgeurl https://github.com/portsentry/portsentry %global version0 2.0.2 %forgemeta Version: %forgeversion Release: %autorelease Summary: Tool to detect and respond to port scans Summary(sv): Verktyg för att upptäcka och svara på portskanningar License: BSD-2-Clause URL: https://portsentry.xyz/ Source0: %forgesource Source1: fail2ban-jail.conf BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: libpcap-devel BuildRequires: pandoc BuildRequires: systemd-rpm-macros Requires: logrotate %description Portsentry monitors network traffic in order to detect port scans in real-time. It can identify several types of scans, including TCP, SYN, FIN, XMAS, and NULL scans and UDP probing. %description -l sv Portsentry övervakar nätverkstrafik för att upptäcka portskanningar i realtid. Den kan identifiera flera olika typer av skanningar, inklusive TCP-, SYN-, FIN-, XMAS- och NULL-skanningar samt UDP-avkänning. %prep %forgeautosetup -p1 %build # Why isn't CMAKE_INSTALL_SYSCONFDIR predefined by the macro? # CMAKE_INSTALL_LIBDIR defaults to lib64, but is used for systemd # definitions which should go to lib. Is there a more correct way to # change this? %cmake -D CMAKE_BUILD_TYPE=Release -D BUILD_TESTS=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -D CMAKE_INSTALL_SYSCONFDIR=%_sysconfdir -D CMAKE_INSTALL_LIBDIR=lib %cmake_build %install %cmake_install # The license file is installed in the documentation directory by # default, but we want it in the separate license directory. rm %buildroot%_pkgdocdir/LICENSE # Install fail2ban configurations install -d %buildroot%_sysconfdir/fail2ban/filter.d install -m 644 fail2ban/%name.conf %buildroot%_sysconfdir/fail2ban/filter.d/%{name}2.conf install -d %buildroot%_sysconfdir/fail2ban/jail.d install -m 644 %{SOURCE1} %buildroot%_sysconfdir/fail2ban/jail.d/%{name}2.conf %check %ctest %post %systemd_post %name.service %preun %systemd_preun %name.service %postun %systemd_postun_with_restart %name.service %files %license LICENSE %_mandir/man8/* %doc %_pkgdocdir %_unitdir/%name.service %dir %_sysconfdir/%name %config(noreplace) %_sysconfdir/%name/* %_bindir/%name %config(noreplace) %_sysconfdir/fail2ban/*/* %config(noreplace) %_sysconfdir/logrotate.d/%name %changelog ## START: Generated by rpmautospec * Wed Jul 02 2025 Göran Uddeborg - 2.0.2-1 - Upgrade to version 2.0.2 * Tue Jun 17 2025 Göran Uddeborg - 2.0.1^git3c0b5a3-1 - Initial packaging put up for review ## END: Generated by rpmautospec