File ntpperf.spec of Package ntpperf
#
# spec file for package ntpperf
#
# Copyright (c) 2022, Martin Hauke <mardnh@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: ntpperf
Version: 0~git20220714
Release: 0
Summary: A tool for measuring performance of NTP servers and PTP masters
License: GPL-2.0-only
Group: Productivity/Networking/Other
URL: https://github.com/mlichvar/ntpperf
#Git-Clone: https://github.com/mlichvar/ntpperf.git
Source: %{name}-%{version}.tar.xz
BuildRequires: libpcap-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(gnutls)
%description
ntpperf simulates NTP clients or PTP slaves sending requests at an increasing
rate and prints how many responses were received and lost. If the computer
running ntpperf has an accurate clock and the network delay to the server/master
is constant and known (e.g. there is a direct connection), it can also show
how does the accuracy of the transmit timestamp change with increasing rate of
requests.
ntpperf generates and processes raw Ethernet frames using libpcap. Requests from
the simulated clients/slaves have source addresses from a specified private
IPv4 network. The server/master and/or network needs to be configured to route
the responses to the computer running ntpperf, which should drop them (ideally
in the raw table of iptables to minimize the time wasted in the networking stack).
Network Time Security (NTS) support using the gnutls library can be enabled by
setting the NTPPERF_NTS environment variable for the build.
%prep
%setup -q
%build
%make_build NTPPERF_NTS=1
%install
install -D -m0755 ntpperf %{buildroot}/%{_bindir}/ntpperf
%files
%license COPYING
%doc README.adoc
%{_bindir}/ntpperf
%changelog