SHA256
1
0
forked from pool/libbpf

Accepting request 961212 from devel:libraries:c_c++

OBS-URL: https://build.opensuse.org/request/show/961212
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libbpf?expand=0&rev=9
This commit is contained in:
Dominique Leuenberger 2022-03-14 18:35:09 +00:00 committed by Git OBS Bridge
commit 274dad0503
2 changed files with 25 additions and 2 deletions

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Thu Mar 10 18:28:17 UTC 2022 - Jeff Mahoney <jeffm@suse.com>
- Enable building and packaging of static library.
Explicitly enable fat LTO objects.
-------------------------------------------------------------------
Mon Mar 7 11:52:14 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
- Python is not used during build; remove it and help break
a cycle.
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Mar 4 10:18:54 UTC 2022 - Jan Engelhardt <jengelh@inai.de> Fri Mar 4 10:18:54 UTC 2022 - Jan Engelhardt <jengelh@inai.de>

View File

@ -28,7 +28,6 @@ Source: https://github.com/libbpf/libbpf/archive/v%{version}.tar.gz#/%{n
Source99: baselibs.conf Source99: baselibs.conf
BuildRequires: libelf-devel BuildRequires: libelf-devel
BuildRequires: linux-glibc-devel >= 4.5 BuildRequires: linux-glibc-devel >= 4.5
BuildRequires: python3
BuildRequires: zlib-devel BuildRequires: zlib-devel
%description %description
@ -48,17 +47,26 @@ Requires: linux-glibc-devel >= 5.16
%description devel %description devel
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.
%package devel-static
Summary: Static library for libbpf
Requires: %{libname} = %{version}
Requires: %{name}-devel = %{version}
Requires: linux-glibc-devel >= 5.16
%description devel-static
libbpf is a C library which provides API for managing eBPF programs and maps.
%prep %prep
%autosetup %autosetup
%build %build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
cd src cd src
%make_build V=1 CFLAGS="%{optflags}" %make_build V=1 CFLAGS="%{optflags}"
%install %install
cd src cd src
%make_install V=1 %make_install V=1
rm -f %{buildroot}%{_libdir}/%{name}.a
%post -n %{libname} -p /sbin/ldconfig %post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig
@ -73,4 +81,7 @@ rm -f %{buildroot}%{_libdir}/%{name}.a
%{_libdir}/%{name}.so %{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc %{_libdir}/pkgconfig/%{name}.pc
%files devel-static
%{_libdir}/%{name}.a
%changelog %changelog