libbpf1: initial build

This commit is contained in:
Raven 2024-04-11 13:08:32 +06:00
parent 75cac800e6
commit d63459d7e4

56
libbpf1/libbpf.spec Normal file
View File

@ -0,0 +1,56 @@
Name: libbpf1
Version: 1.4.0
Release: 1%{?dist}
Summary: Libbpf library
License: LGPLv2 or BSD
Source0: https://github.com/libbpf/libbpf/archive/v%{version}/libbpf-%{version}.tar.gz
BuildRequires: gcc elfutils-libelf-devel elfutils-devel python3 kernel-headers
BuildRequires: make
%description
Library for loading eBPF programs and reading and manipulating eBPF
objects from user-space
%package devel
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release}
Requires: kernel-headers
Requires: zlib
Conflicts: libbpf-devel
%description devel
The %{name}-devel package contains libraries header files for
developing applications that use %{name}
%package static
Summary: Static library for libbpf development
Requires: %{name}-devel = %{version}-%{release}
Conflicts: libbpf-static
%description static
The %{name}-static package contains static library for
developing applications that use %{name}
%prep
%autosetup -n libbpf-%{version}
%build
%make_build -C src
%install
%make_install -C src
%files
%{_libdir}/libbpf.so.%{version}
%{_libdir}/libbpf.so.1
%files devel
%{_libdir}/libbpf.so
%{_includedir}/bpf/
%{_libdir}/pkgconfig/libbpf.pc
%files static
%{_libdir}/libbpf.a