# Generated by go2rpm 1.3 %bcond_without check # https://github.com/facebookincubator/ptp %global goipath github.com/facebookincubator/ptp %global commit 895384e0135aaae2f3754690c30c05719d5b33ee %gometa %global common_description %{expand: Collection of Facebook's PTP libraries.} %global golicenses LICENSE %global godocs CODE_OF_CONDUCT.md CONTRIBUTING.md\\\ PULL_REQUEST_TEMPLATE.md README.md ptp4u/README.md\\\ simpleclient/README.md Name: %{goname} Version: 0 Release: 0.1%{?dist} Summary: Facebook's PTP libraries # Upstream license specification: Apache-2.0 License: ASL 2.0 URL: %{gourl} Source0: %{gosource} BuildRequires: golang(github.com/davecgh/go-spew/spew) BuildRequires: golang(github.com/facebookincubator/ntp/protocol/ntpshm) BuildRequires: golang(github.com/fatih/color) BuildRequires: golang(github.com/google/gopacket) BuildRequires: golang(github.com/google/gopacket/layers) BuildRequires: golang(github.com/google/gopacket/pcapgo) BuildRequires: golang(github.com/sirupsen/logrus) BuildRequires: golang(github.com/spf13/cobra) BuildRequires: golang(github.com/vtolstov/go-ioctl) BuildRequires: golang(golang.org/x/sync/errgroup) BuildRequires: golang(golang.org/x/sys/unix) %if %{with check} # Tests BuildRequires: golang(github.com/golang/mock/gomock) BuildRequires: golang(github.com/stretchr/testify/assert) BuildRequires: golang(github.com/stretchr/testify/require) %endif %description %{common_description} %package -n pshark Summary: Simple tool to print PTP packets from pcap/pcapng captures %description -n pshark pshark is a simple tool to read pcap/pcapng captures and parse and print PTP packets from there. Allows to test our protocol parser implementation against arbitrary tcpdump capture. Also the code shows integration with GoPacket library. %package -n ptpcheck Summary: CLI to perform various PTP-related tasks %description -n ptpcheck CLI and library to perform various PTP-related tasks, including: - reporting stats taken from local PTP instance in JSON format - running basic unicast client to showcase or debug PTP protocol internals - running human-readable diagnostics for basic problems with PTP based on data from local PTP client (ptp4l) - comparing system time with PHC time - mapping PHC devices to network cards and vice versa %package -n ptp4u Summary: Scalable unicast PTP server %description -n ptp4u ptp4u is a scalable unicast PTP server. %gopkg %prep %goprep %build for cmd in pshark ptpcheck ptp4u simpleclient; do %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done %install %gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %if %{with check} %check %gocheck %endif %files -n pshark %license LICENSE %doc README.md %{_bindir}/pshark %files -n ptpcheck %license LICENSE %doc README.md %{_bindir}/ptpcheck %files -n ptp4u %license LICENSE %doc ptp4u/README.md %{_bindir}/ptp4u %{_bindir}/simpleclient %gopkgfiles %changelog * Fri Jun 18 2021 Davide Cavalca - 0-0.1.20210618git895384e - Initial package