Name: bpftool Version: 7.4.0 Release: 1%{?dist} Summary: Inspection and simple manipulation of eBPF programs and maps %global libname libbpf %global sources %{name}-%{libname}-v%{version}-sources License: GPL-2.0-only OR BSD-2-Clause URL: https://github.com/libbpf/bpftool Source: https://github.com/libbpf/bpftool/releases/download/v%{version}/%{sources}.tar.gz Patch: https://github.com/libbpf/bpftool/commit/b3d4318ba85588928403b93e0cc87d6586a3db57.patch BuildRequires: gcc make BuildRequires: binutils-devel elfutils-libelf-devel libcap-devel llvm-devel clang BuildRequires: python3-docutils BuildRequires: kernel-devel %description This package contains the bpftool, which allows inspection and simple manipulation of eBPF programs and maps. %prep %autosetup -p1 -n %{sources} %build # We need to use vmlinux.h from kernel-devel rather than the one from the running system %define kernel_version %(rpm -q --qf "%%{VERSION}-%%{RELEASE}.%%{ARCH}" kernel-devel) %make_build -C src/ EXTRA_CFLAGS="%{build_cflags}" EXTRA_LDFLAGS="%{build_ldflags}" VMLINUX_H="/usr/src/kernels/%{kernel_version}/vmlinux.h" %install %make_install -C src/ prefix=%{_prefix} bash_compdir=%{_sysconfdir}/bash_completion.d/ mandir=%{_mandir} doc-install %files %{_sbindir}/bpftool %{_sysconfdir}/bash_completion.d/bpftool %{_mandir}/man8/bpftool-cgroup.8.gz %{_mandir}/man8/bpftool-gen.8.gz %{_mandir}/man8/bpftool-iter.8.gz %{_mandir}/man8/bpftool-link.8.gz %{_mandir}/man8/bpftool-map.8.gz %{_mandir}/man8/bpftool-prog.8.gz %{_mandir}/man8/bpftool-perf.8.gz %{_mandir}/man8/bpftool.8.gz %{_mandir}/man8/bpftool-net.8.gz %{_mandir}/man8/bpftool-feature.8.gz %{_mandir}/man8/bpftool-btf.8.gz %{_mandir}/man8/bpftool-struct_ops.8.gz %changelog * Mon Aug 26 2024 Viktor Malik - 7.4.0-1 - Create the package