bpftool/bpftool.spec
bitcoffee e2de425005 bpftool: init 7.2.0 package
init bpftool 7.2.0 package

Signed-off-by: bitcoffee <liuxin350@huawei.com>
2024-01-11 14:51:34 +08:00

43 lines
1.4 KiB
RPMSpec

Name: bpftool
Version: 7.2.0
Release: 1
Summary: Tool for inspection and manipulation of BPF programs and maps
License: GPL-2.0-only
URL: https://www.kernel.org/
BuildRequires: elfutils-devel libcap-devel binutils-devel clang python3-docutils llvm-devel
Source0: https://github.com/libbpf/bpftool/archive/refs/tags/%{name}-libbpf-v%{version}.tar.gz
Patch0: bpftool-use-a-local-copy-of-perf_event-to-fix-access.patch
Patch1: bpftool-define-a-local-bpf_perf_link-to-fix-accessin.patch
Patch2: bpftool-use-a-local-copy-of-bpf_link_type_perf_event.patch
Patch3: bpftool-use-a-local-bpf_perf_event_value-to-fix-acce.patch
%description
bpftool allows for inspection and simple modification of BPF objects (programs
and maps) on the system.
%prep
%autosetup -p1 -n %{name}-%{version}
%build
%make_build -C src V=1
%make_build -C docs V=1 man
%install
make -C src V=1 install DESTDIR=%{buildroot} prefix=%{_prefix} mandir=%{_mandir}
make -C docs V=1 install DESTDIR=%{buildroot} prefix=%{_prefix} mandir=%{_mandir}
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
mv %{buildroot}%{_datadir}/bash-completion/completions/bpftool %{buildroot}%{_sysconfdir}/bash_completion.d/bpftool
%files
%license LICENSE LICENSE.BSD-2-Clause LICENSE.GPL-2.0
%doc README.md
%{_sbindir}/bpftool
%{_mandir}/man?/*.gz
%{_sysconfdir}/bash_completion.d/bpftool
%changelog
* Sat Jan 20 2024 liuxin <liuxin350@huawei.com> - 7.2.0-1
- Init package