Skip to content

Commit

Permalink
RPM Specfile addition for intial RPM building process
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Iranzo Gómez <[email protected]>
  • Loading branch information
iranzo committed Sep 23, 2024
1 parent 42b2283 commit f1c83ff
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions red hat/tsn-testbench.spec
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
- first packaging

0 comments on commit f1c83ff

Please sign in to comment.