From ba5d8356d99564f3f1af9c2e9ddd85b849abf50f 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 | 71 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 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..fcafc5e --- /dev/null +++ b/red hat/tsn-testbench.spec @@ -0,0 +1,71 @@ +# Copyright (C) 2024 Red Hat +# Author Pablo Iranzo Gómez +# 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/%{myrepo} %{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