From f1c83ff40b34470478395b77995258bbc77c49cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Iranzo=20G=C3=B3mez?= Date: Thu, 12 Sep 2024 14:58:26 +0200 Subject: [PATCH] RPM Specfile addition for intial RPM building process MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pablo Iranzo Gómez --- red hat/tsn-testbench.spec | 69 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 red hat/tsn-testbench.spec diff --git a/red hat/tsn-testbench.spec b/red hat/tsn-testbench.spec new file mode 100644 index 0000000..08acd79 --- /dev/null +++ b/red hat/tsn-testbench.spec @@ -0,0 +1,69 @@ +# SPDX-License-Identifier: BSD-2-Clause + +Name: TSN-Testbench +Version: %{version} +Release: 1%{?dist} +Summary: Time-Sensitive Networks Testbench is a set of tools for validating the networks with different protocols +License: BSD-2 +%undefine _disable_source_fetch +URL: https://github.com/Linutronix/TSN-Testbench +Source0: https://github.com/%{myrepo}/archive/refs/tags/%{version}.tar.gz + + +BuildRequires: clang +BuildRequires: cmake +BuildRequires: libxdp-devel +BuildRequires: libyaml-devel +BuildRequires: llvm +BuildRequires: mosquitto-devel +BuildRequires: openssl-devel +BuildRequires: python3-sphinx +BuildRequires: python3-sphinx_rtd_theme +BuildRequires: texinfo + +%description +The TSN 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. + +%prep +cd %{_topdir}/BUILD +rm -rf %{name}-%{version} +git clone https://github.com/Linutronix/TSN-Testbench %{name}-%{version} +cd %{name}-%{version} +git checkout v%{version} + +%build +cd %{_topdir}/BUILD/%{name}-%{version} +cmake -DCMAKE_BUILD_TYPE=Release +make DESTDIR=${RPM_BUILD_ROOT} install + +# Build documentation +make -C Documentation man + +%install + +mkdir -p %{buildroot}/usr/bin/ +install -m 755 /usr/local/bin/reference %{buildroot}/usr/bin/reference +install -m 755 /usr/local/bin/mirror %{buildroot}/usr/bin/mirror + + +mkdir -p $RPM_BUILD_ROOT/usr/share/man/man8 +install -m 644 %{_topdir}/BUILD/%{name}-%{version}/Documentation/_build/man/linuxtsntestbench.1 $RPM_BUILD_ROOT/usr/share/man/man8/%{name}.1 + +mkdir -p %{buildroot}/usr/local/testbench/ebpf/ +install -m 755 -d /usr/local/share/testbench/ebpf/ +cp -a /usr/local/share/testbench/ebpf/* %{buildroot}/usr/local/testbench/ebpf/ + +mkdir -p %{buildroot}/usr/local/testbench/tests/ +install -m 755 -d /usr/local/share/testbench/tests/ +cp -a /usr/local/share/testbench/tests/* %{buildroot}/usr/local/testbench/tests/ + +%files +/usr/share/man/man8/%{name}.1.gz +/usr/bin/reference +/usr/bin/mirror +/usr/local/testbench/tests/ +/usr/local/testbench/ebpf/ + +%changelog +* Wed Sep 11 2024 Pablo Iranzo Gómez +- first packaging