Accepting request 772910 from home:mrostecki:branches:devel:libraries:c_c++
- Build libbpf from kernel sources, not from github sources, for consistency with bpftool package. OBS-URL: https://build.opensuse.org/request/show/772910 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libbpf?expand=0&rev=3
This commit is contained in:
parent
a53a02a589
commit
d17435cca4
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Feb 2 19:50:55 UTC 2020 - Michał Rostecki <mrostecki@opensuse.org>
|
||||||
|
|
||||||
|
- Build libbpf from kernel sources, not from github sources, for
|
||||||
|
consistency with bpftool package.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jan 7 14:36:44 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
Tue Jan 7 14:36:44 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
27
libbpf.spec
27
libbpf.spec
@ -19,13 +19,14 @@
|
|||||||
%define sover_major 0
|
%define sover_major 0
|
||||||
%define libname libbpf%{sover_major}
|
%define libname libbpf%{sover_major}
|
||||||
Name: libbpf
|
Name: libbpf
|
||||||
Version: 0.0.6
|
%define version %(rpm -q --qf '%%{VERSION}' kernel-source)
|
||||||
|
Version: %{version}
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: C library for managing eBPF programs and maps
|
Summary: C library for managing eBPF programs and maps
|
||||||
License: LGPL-2.1-only
|
License: LGPL-2.1-only
|
||||||
URL: https://github.com/libbpf/libbpf
|
URL: http://www.kernel.org/
|
||||||
Source: https://github.com/libbpf/libbpf/archive/v%{version}.tar.gz
|
|
||||||
BuildRequires: libelf-devel
|
BuildRequires: libelf-devel
|
||||||
|
BuildRequires: kernel-source
|
||||||
|
|
||||||
%description
|
%description
|
||||||
libbpf is a C library which provides API for managing eBPF programs and maps.
|
libbpf is a C library which provides API for managing eBPF programs and maps.
|
||||||
@ -44,13 +45,27 @@ Requires: %{libname} = %{version}
|
|||||||
libbpf is a C library which provides API for managing eBPF programs and maps.
|
libbpf is a C library which provides API for managing eBPF programs and maps.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
(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
|
%build
|
||||||
%make_build -C src/ CFLAGS="%{optflags}"
|
cd tools/lib/bpf
|
||||||
|
%if %{__isa_bits} == 64
|
||||||
|
%make_build CFLAGS="%{optflags}" LP64=1
|
||||||
|
%else
|
||||||
|
%make_build CFLAGS="%{optflags}"
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install -C src/
|
cd tools/lib/bpf
|
||||||
|
%if %{__isa_bits} == 64
|
||||||
|
%make_install prefix=/usr LP64=1
|
||||||
|
%else
|
||||||
|
%make_install prefix=/usr
|
||||||
|
%endif
|
||||||
|
make install_headers prefix=%{buildroot}/usr
|
||||||
|
|
||||||
rm -f %{buildroot}%{_libdir}/%{name}.a
|
rm -f %{buildroot}%{_libdir}/%{name}.a
|
||||||
|
|
||||||
%post -n %{libname} -p /sbin/ldconfig
|
%post -n %{libname} -p /sbin/ldconfig
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:dbed8304077699fd59b0271545ac5923a6e0581db4ef90d6124efa6fe9df84c1
|
|
||||||
size 213791
|
|
Loading…
x
Reference in New Issue
Block a user