Accepting request 741294 from home:mrostecki
Initial release OBS-URL: https://build.opensuse.org/request/show/741294 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libbpf?expand=0&rev=1
This commit is contained in:
commit
678c0dae57
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
47
0001-makefile-Fix-install-target.patch
Normal file
47
0001-makefile-Fix-install-target.patch
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
From dc3d79cff48b9a2034e8b0378bca221b57f4e300 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michal Rostecki <mrostecki@opensuse.org>
|
||||||
|
Date: Tue, 1 Oct 2019 13:09:00 +0200
|
||||||
|
Subject: [PATCH] makefile: Fix install target
|
||||||
|
|
||||||
|
Before this change, the install target was failing with the following
|
||||||
|
error:
|
||||||
|
|
||||||
|
make: Entering directory '/home/mrostecki/repos/libbpf/src'
|
||||||
|
if [ ! -d '/usr/include/bpf' ]; then install -d -m 755 '/usr/include/bpf'; fi; install bpf.h libbpf.h btf.h xsk.h libbpf_util.h -m 644 '/usr/include/bpf'
|
||||||
|
if [ ! -d '/usr/lib64/pkgconfig' ]; then install -d -m 755 '/usr/lib64/pkgconfig'; fi; install ./libbpf.pc -m 644 '/usr/lib64/pkgconfig'
|
||||||
|
if [ ! -d '/usr/lib64' ]; then install -d -m 755 '/usr/lib64'; fi; cp -fpR '/usr/lib64'
|
||||||
|
cp: missing destination file operand after '/usr/lib64'
|
||||||
|
Try 'cp --help' for more information.
|
||||||
|
make: *** [Makefile:119: install] Error 1
|
||||||
|
make: Leaving directory '/home/mrostecki/repos/libbpf/src'
|
||||||
|
|
||||||
|
That error occured due to usage of non-existing variable $(LIBS). After
|
||||||
|
this change, $(SHARED_LIBS) and $(STATIC_LIBS) are used instead, which
|
||||||
|
fixes the behavior of the install target.
|
||||||
|
|
||||||
|
Fixes: 8b2782a1f250 ("makefile: support libbpf symbol versioning in shared library mode")
|
||||||
|
Signed-off-by: Michal Rostecki <mrostecki@opensuse.org>
|
||||||
|
---
|
||||||
|
src/Makefile | 6 +++++-
|
||||||
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/Makefile b/src/Makefile
|
||||||
|
index 57510ca..28a470f 100644
|
||||||
|
--- a/src/Makefile
|
||||||
|
+++ b/src/Makefile
|
||||||
|
@@ -116,7 +116,11 @@ define do_s_install
|
||||||
|
endef
|
||||||
|
|
||||||
|
install: all install_headers install_pkgconfig
|
||||||
|
- $(call do_s_install,$(LIBS),$(LIBDIR))
|
||||||
|
+ifndef BUILD_STATIC_ONLY
|
||||||
|
+ $(call do_s_install,$(SHARED_LIBS) $(STATIC_LIBS),$(LIBDIR))
|
||||||
|
+else
|
||||||
|
+ ${call do_s_install,$(STATIC_LIBS),$(LIBDIR))
|
||||||
|
+endif
|
||||||
|
|
||||||
|
install_headers:
|
||||||
|
$(call do_install,$(HEADERS),$(INCLUDEDIR)/bpf,644)
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
16
_service
Normal file
16
_service
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<services>
|
||||||
|
<service mode="disabled" name="obs_scm">
|
||||||
|
<param name="url">https://github.com/libbpf/libbpf</param>
|
||||||
|
<param name="scm">git</param>
|
||||||
|
<param name="filename">libbpf</param>
|
||||||
|
<param name="versionformat">@PARENT_TAG@</param>
|
||||||
|
<param name="versionrewrite-pattern">v(.*)</param>
|
||||||
|
<param name="revision">v0.0.5</param>
|
||||||
|
</service>
|
||||||
|
<service mode="buildtime" name="tar" />
|
||||||
|
<service mode="buildtime" name="recompress">
|
||||||
|
<param name="file">*.tar</param>
|
||||||
|
<param name="compression">xz</param>
|
||||||
|
</service>
|
||||||
|
<service mode="disabled" name="set_version" />
|
||||||
|
</services>
|
3
libbpf-0.0.5.obscpio
Normal file
3
libbpf-0.0.5.obscpio
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:a757f3cdff12dc0b2d7b1ef3e44a4796a5aa9905c50b383525d9867633952828
|
||||||
|
size 632332
|
4
libbpf.changes
Normal file
4
libbpf.changes
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Oct 1 09:15:18 UTC 2019 - Michał Rostecki <mrostecki@opensuse.org>
|
||||||
|
|
||||||
|
- Initial release
|
5
libbpf.obsinfo
Normal file
5
libbpf.obsinfo
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
name: libbpf
|
||||||
|
version: 0.0.5
|
||||||
|
mtime: 1569904962
|
||||||
|
commit: 8b2782a1f250f58aafe38b2cd718aa3dc8ad58ed
|
||||||
|
|
74
libbpf.spec
Normal file
74
libbpf.spec
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
#
|
||||||
|
# spec file for package libbpf
|
||||||
|
#
|
||||||
|
# Copyright (c) 2019 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
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define sover_major 0
|
||||||
|
%define libname libbpf%{sover_major}
|
||||||
|
|
||||||
|
Name: libbpf
|
||||||
|
Version: 0.0.5
|
||||||
|
Release: 0
|
||||||
|
Summary: C library for managing eBPF programs and maps
|
||||||
|
License: LGPL-2.1
|
||||||
|
Group: Development/Languages/C and C++
|
||||||
|
Url: https://github.com/libbpf/libbpf
|
||||||
|
Source: %{name}-%{version}.tar.xz
|
||||||
|
Patch0: 0001-makefile-Fix-install-target.patch
|
||||||
|
BuildRequires: libelf-devel
|
||||||
|
|
||||||
|
%description
|
||||||
|
libbpf is a C library which provides API for managing eBPF programs and maps.
|
||||||
|
|
||||||
|
%package -n %{libname}
|
||||||
|
Summary: C library for managing eBPF programs and maps
|
||||||
|
Group: System/Libraries
|
||||||
|
|
||||||
|
%description -n %{libname}
|
||||||
|
libbpf is a C library which provides API for managing eBPF programs and maps.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Development files for libbpf
|
||||||
|
Group: Development/Libraries/C and C++
|
||||||
|
Requires: %{libname} = %{version}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
libbpf is a C library which provides API for managing eBPF programs and maps.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%make_build -C src/
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install -C src/
|
||||||
|
rm -f %{buildroot}%{_libdir}/%{name}.a
|
||||||
|
|
||||||
|
%post -n %{libname} -p /sbin/ldconfig
|
||||||
|
%postun -n %{libname} -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%files -n %{libname}
|
||||||
|
%{_libdir}/%{name}.so.%{sover_major}*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%{_includedir}/bpf
|
||||||
|
%{_libdir}/%{name}.so
|
||||||
|
%{_libdir}/pkgconfig/%{name}.pc
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
|
Loading…
Reference in New Issue
Block a user