2019-05-15 08:13:33 +02:00
|
|
|
#
|
|
|
|
# spec file for package bpftool
|
|
|
|
#
|
2020-01-08 17:38:38 +01:00
|
|
|
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
|
2019-05-15 08:13:33 +02:00
|
|
|
#
|
|
|
|
# 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 license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2020-01-08 17:38:38 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2019-05-15 08:13:33 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: bpftool
|
|
|
|
%define version %(rpm -q --qf '%%{VERSION}' kernel-source)
|
|
|
|
Version: %{version}
|
|
|
|
Release: 0
|
|
|
|
Summary: Tool for inspection and manipulation of BPF programs and maps
|
2020-01-08 17:38:38 +01:00
|
|
|
License: GPL-2.0-only
|
2019-05-15 08:13:33 +02:00
|
|
|
Group: Development/Tools/Other
|
|
|
|
Url: http://www.kernel.org/
|
2020-01-08 17:38:38 +01:00
|
|
|
BuildRequires: docutils
|
2019-05-15 08:13:33 +02:00
|
|
|
BuildRequires: kernel-source
|
2020-01-08 17:38:38 +01:00
|
|
|
BuildRequires: libelf-devel
|
2019-05-15 08:13:33 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
bpftool allows for inspection and simple modification of BPF objects (programs
|
|
|
|
and maps) on the system.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
(cd /usr/src/linux ; tar -cf - COPYING CREDITS README tools include scripts Kbuild Makefile arch/*/{include,lib,Makefile} kernel/bpf lib) | tar -xf -
|
|
|
|
cp /usr/src/linux/LICENSES/preferred/GPL-2.0 .
|
2020-01-08 17:38:38 +01:00
|
|
|
sed -i -e 's/CFLAGS += -O2/CFLAGS = $(RPM_OPT_FLAGS)/' Makefile
|
2019-05-15 08:13:33 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
cd tools/bpf/bpftool
|
2020-01-08 17:38:38 +01:00
|
|
|
%make_build V=1 feature-reallocarray=1 all doc
|
2019-05-15 08:13:33 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
cd tools/bpf/bpftool
|
2020-01-08 17:38:38 +01:00
|
|
|
make install doc-install DESTDIR=%{buildroot} prefix=%{_prefix} mandir=%{_mandir}
|
2019-05-15 08:13:33 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%license GPL-2.0
|
|
|
|
%{_sbindir}/bpftool
|
|
|
|
%{_datadir}/bash-completion/completions/bpftool
|
2020-01-08 17:38:38 +01:00
|
|
|
%{_mandir}/man?/*.gz
|
2019-05-15 08:13:33 +02:00
|
|
|
|
|
|
|
%changelog
|