SHA256
1
0
forked from pool/bpftool

Accepting request 761910 from home:lnussel:branches:Base:System

- use optflags for building
- build and install man pages

OBS-URL: https://build.opensuse.org/request/show/761910
OBS-URL: https://build.opensuse.org/package/show/Base:System/bpftool?expand=0&rev=3
This commit is contained in:
Michał Rostecki 2020-01-08 16:38:38 +00:00 committed by Git OBS Bridge
parent 7c02a690d0
commit 70b08c1325
2 changed files with 15 additions and 7 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jan 8 16:28:37 UTC 2020 - Ludwig Nussel <lnussel@suse.de>
- use optflags for building
- build and install man pages
-------------------------------------------------------------------
Thu May 9 14:41:11 UTC 2019 - Michal Rostecki <mrostecki@opensuse.org>

View File

@ -1,7 +1,7 @@
#
# spec file for package bpftool
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@ -21,11 +21,12 @@ Name: bpftool
Version: %{version}
Release: 0
Summary: Tool for inspection and manipulation of BPF programs and maps
License: GPL-2.0
License: GPL-2.0-only
Group: Development/Tools/Other
Url: http://www.kernel.org/
BuildRequires: libelf-devel
BuildRequires: docutils
BuildRequires: kernel-source
BuildRequires: libelf-devel
%description
bpftool allows for inspection and simple modification of BPF objects (programs
@ -34,19 +35,20 @@ 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 .
sed -i -e 's/CFLAGS += -O2/CFLAGS = $(RPM_OPT_FLAGS)/' Makefile
%build
cd tools/bpf/bpftool
%make_build feature-reallocarray=1
%make_build V=1 feature-reallocarray=1 all doc
%install
cd tools/bpf/bpftool
make install DESTDIR=%{buildroot} prefix=/usr
make install doc-install DESTDIR=%{buildroot} prefix=%{_prefix} mandir=%{_mandir}
%files
%license GPL-2.0
%{_sbindir}/bpftool
%{_datadir}/bash-completion/completions/bpftool
%{_mandir}/man?/*.gz
%changelog