| 1 |
# Copyright (C) 2024,2025 Red Hat |
| 2 |
# Author Pablo Iranzo Gómez <[email protected]> |
| 3 |
# SPDX-License-Identifier: BSD-2-Clause |
| 4 |
|
| 5 |
Name: RTC-Testbench |
| 6 |
Version: %{version} |
| 7 |
Release: 1%{?dist} |
| 8 |
Summary: Time-Sensitive Networks Testbench is a set of tools for validating the networks with different protocols |
| 9 |
License: BSD-2 |
| 10 |
%undefine _disable_source_fetch |
| 11 |
URL: https://github.com/Linutronix/RTC-Testbench |
| 12 |
Source0: https://github.com/%{myrepo}/archive/refs/tags/%{version}.tar.gz |
| 13 |
|
| 14 |
|
| 15 |
BuildRequires: clang |
| 16 |
BuildRequires: cmake |
| 17 |
BuildRequires: libxdp-devel |
| 18 |
BuildRequires: libyaml-devel |
| 19 |
BuildRequires: llvm |
| 20 |
BuildRequires: mosquitto-devel |
| 21 |
BuildRequires: openssl-devel |
| 22 |
BuildRequires: python3-sphinx |
| 23 |
BuildRequires: python3-sphinx_rtd_theme |
| 24 |
BuildRequires: texinfo |
| 25 |
|
| 26 |
%description |
| 27 |
The RTC Testbench is a real-time and non-real-time traffic validation tool for converged TSN networks. PROFINET as well as OPC/UA PubSub and other configurable protocols are supported. |
| 28 |
|
| 29 |
%prep |
| 30 |
cd %{_topdir}/BUILD |
| 31 |
rm -rf %{name}-%{version} |
| 32 |
git clone https://github.com/%{myrepo} %{name}-%{version} |
| 33 |
cd %{name}-%{version} |
| 34 |
git checkout %{version} |
| 35 |
|
| 36 |
%build |
| 37 |
cd %{_topdir}/BUILD/%{name}-%{version} |
| 38 |
cmake -DCMAKE_BUILD_TYPE=Release |
| 39 |
make DESTDIR=${RPM_BUILD_ROOT} install |
| 40 |
|
| 41 |
# Build documentation |
| 42 |
make -C Documentation man |
| 43 |
|
| 44 |
%install |
| 45 |
|
| 46 |
mkdir -p %{buildroot}/usr/bin/ |
| 47 |
install -m 755 /usr/local/bin/reference %{buildroot}/usr/bin/reference |
| 48 |
install -m 755 /usr/local/bin/mirror %{buildroot}/usr/bin/mirror |
| 49 |
|
| 50 |
|
| 51 |
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man8 |
| 52 |
install -m 644 %{_topdir}/BUILD/%{name}-%{version}/Documentation/_build/man/linuxrealtimecommunicationtestbench.1 $RPM_BUILD_ROOT/usr/share/man/man8/%{name}.1 |
| 53 |
|
| 54 |
mkdir -p %{buildroot}/usr/local/testbench/ebpf/ |
| 55 |
install -m 755 -d /usr/local/share/testbench/ebpf/ |
| 56 |
cp -a /usr/local/share/testbench/ebpf/* %{buildroot}/usr/local/testbench/ebpf/ |
| 57 |
|
| 58 |
mkdir -p %{buildroot}/usr/local/testbench/tests/ |
| 59 |
install -m 755 -d /usr/local/share/testbench/tests/ |
| 60 |
cp -a /usr/local/share/testbench/tests/* %{buildroot}/usr/local/testbench/tests/ |
| 61 |
|
| 62 |
%files |
| 63 |
/usr/share/man/man8/%{name}.1.gz |
| 64 |
/usr/bin/reference |
| 65 |
/usr/bin/mirror |
| 66 |
/usr/local/testbench/tests/ |
| 67 |
/usr/local/testbench/ebpf/ |
| 68 |
|
| 69 |
%changelog |
| 70 |
* Wed Sep 11 2024 Pablo Iranzo Gómez <[email protected]> |
| 71 |
- first packaging |