# # 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