%global forgeurl https://github.com/Emanem/nettop
# upstream does not publish releases and does not use tags
%global commit   689d6557196e9fcc92cffba82e00fac0386419e5
%forgemeta

Name:           nettop
Version:        0.5
Release:        1
Summary:        Utility to show network traffic
License:        GPL-3.0-or-later
URL:            %{forgeurl}
Source:         %{forgesource}
BuildRequires:  gcc-c++
BuildRequires:  make
BuildRequires:  libpcap-devel
BuildRequires:  ncurses-devel


%description
Utility to show network traffic (both TCP and UDP v4 and v6) split by process
and remote host.

%prep
%forgesetup -v


%build
%make_build


%install
mkdir -p %{buildroot}%{_bindir}
install --preserve-timestamps nettop %{buildroot}%{_bindir}


%files
%{_bindir}/nettop
%doc README.md
%license LICENSE

%changelog
* Sun May 12 2024 Felix Schwarz <fschwarz@fedoraproject.org> - 0.5-1
- initial packaging