Blame SPECS/libbpf.spec

271209
# We build libbpf from RHEL kernel sources, that's why we use
271209
# directly kernel tar for RHEL kernel build.
271209
# We update libbpf's 'sources' file with proper hash that's
271209
# used as kernel tar.
271209
271209
# RHEL kernel version-release
271209
%define kver   4.18.0-167
271209
%define source linux-%{kver}.el8
271209
271209
Name:           libbpf
271209
Version:        0.0.4
271209
Release:        3%{?dist}
271209
Summary:        Libbpf library
271209
271209
License:        LGPLv2 or BSD
271209
Source0:        %{source}.tar.xz
271209
Patch0:         0001-fix-i686-compilation.patch
271209
BuildRequires:  gcc elfutils-libelf-devel elfutils-devel python3
271209
271209
%description
271209
A mirror of bpf-next linux tree bpf-next/tools/lib/bpf directory plus its
271209
supporting header files. The version of the package reflects the version of
271209
ABI.
271209
271209
%package devel
271209
Summary:        Development files for %{name}
271209
Requires:       %{name} = %{version}-%{release}
271209
Requires:       kernel-headers >= %{kver}
271209
271209
%description devel
271209
The %{name}-devel package contains libraries header files for
271209
developing applications that use %{name}
271209
271209
%package static
271209
Summary: Static library for libbpf development
271209
Requires: %{name}-devel = %{version}-%{release}
271209
271209
%description static
271209
The %{name}-static package contains static library for
271209
developing applications that use %{name}
271209
271209
%global libbpf_make \
271209
  make EXTRA_CFLAGS="${RPM_OPT_FLAGS}" EXTRA_LDFLAGS="%{__global_ldflags}" DESTDIR=%{buildroot} V=1
271209
271209
%prep
271209
%setup -n %{source}
271209
%patch0 -p1
271209
271209
%build
271209
pushd tools/lib/bpf
271209
%{libbpf_make}
271209
popd
271209
271209
%install
271209
pushd tools/lib/bpf
271209
%{libbpf_make} prefix=%{_prefix} install_lib install_headers
271209
popd
271209
271209
%files
271209
%{_libdir}/libbpf.so.%{version}
271209
%{_libdir}/libbpf.so.0
271209
271209
%files devel
271209
%{_libdir}/libbpf.so
271209
%{_includedir}/bpf
271209
271209
%files static
271209
%{_libdir}/libbpf.a
271209
271209
%changelog
271209
* Sun Dec 15 2019 Jiri Olsa <jolsa@redhat.com> - 0.0.4-3
271209
- new kernel version [1759154]
271209
271209
* Tue Dec 10 2019 Jiri Olsa <jolsa@redhat.com> - 0.0.4-2
271209
- new build for gating [1759154]
271209
271209
* Mon Nov 02 2019 Jiri Olsa <jolsa@redhat.com> - 0.0.4-1
271209
- version 0.0.4 [1759154]
271209
271209
* Mon Nov 02 2019 Jiri Olsa <jolsa@redhat.com> - 0.0.2-1
271209
- initial package [1759154]