File pktgen-dpdk.spec of Package pktgen-dpdk

#
# spec file for package pktgen-dpdk
#
# Copyright (c) 2026 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same as for the original package itself.
#

Name:           pktgen-dpdk
Version:        26.02.4
Release:        0
Summary:        Traffic generator powered by DPDK
License:        BSD-3-Clause
Group:          Productivity/Networking/Diagnostic
URL:            https://github.com/pktgen/Pktgen-DPDK
Source:         https://github.com/pktgen/Pktgen-DPDK/archive/refs/tags/pktgen-%{version}.tar.gz
Patch1:         0001-Fix-multiline-comment.patch
Patch2:         0002-Fix-compiliation-with-lua-5.5.patch
Patch3:         0001-Fix-terminal-setting-revert-after-exit.patch
Patch4:         0001-Fix-comparison-of-different-signedness-error.patch
Patch5:         0001-Install-Pktgen.lua-and-add-to-default-lua-path.patch
Patch6:         0001-Exit-if-luascript-failed.patch
BuildRequires:  gcc
BuildRequires:  meson >= 0.47.1
BuildRequires:  ninja
BuildRequires:  pkgconfig
BuildRequires:  dpdk-devel-static
BuildRequires:  libbsd-devel
BuildRequires:  libpcap-devel
BuildRequires:  libnuma-devel
BuildRequires:  lua-devel
BuildRequires:  python3-pyelftools

%description
Pktgen is a multi‑port, multi‑core traffic generator built on
top of DPDK. It targets realistic, repeatable performance and
functional packet tests while remaining fully controllable
via an interactive console, Lua scripts, or a remote TCP socket.

%prep
%autosetup -n Pktgen-DPDK-pktgen-%{version} -p1

%build
%ifarch x86_64
%if 0%{?suse_version} == 1699 || 0%{?suse_version} < 1600
%define meson_args -Dc_args='-march=x86-64'
%endif
%endif
%meson %{?meson_args}
%meson_build

%install
%meson_install

%files
%license LICENSE
%doc README.md
%{_bindir}/pktgen

%changelog
openSUSE Build Service is sponsored by