diff --git a/kernel-tools.spec b/kernel-tools.spec index 5dda185..5735a2f 100644 --- a/kernel-tools.spec +++ b/kernel-tools.spec @@ -8,7 +8,7 @@ # and/or a kernel built from an rc or git snapshot, released_kernel should # be 0. %global released_kernel 0 -%global baserelease 1 +%global baserelease 2 %global fedora_build %{baserelease} # base_sublevel is the kernel version we're starting with and patching @@ -188,6 +188,19 @@ License: GPLv2 This package includes libraries and header files needed for development of applications which use bpf library from kernel source. +%package -n libperf +Summary: The perf library from kernel source +License: GPLv2 +%description -n libperf +This package contains the kernel source perf library. + +%package -n libperf-devel +Summary: Developement files for the perf library from kernel source +License: GPLv2 +%description -n libperf-devel +This package includes libraries and header files needed for development +of applications which use perf library from kernel source. + %prep %setup -q -n kernel-%{kversion}%{?dist} -c @@ -273,6 +286,9 @@ popd pushd tools/lib/bpf %{tools_make} V=1 popd +pushd tools/lib/perf +make V=1 +popd # Build the docs pushd tools/kvm/kvm_stat/ @@ -361,6 +377,9 @@ popd pushd tools/lib/bpf %{tools_make} DESTDIR=%{buildroot} prefix=%{_prefix} libdir=%{_libdir} V=1 install install_headers popd +pushd tools/lib/perf +make DESTDIR=%{buildroot} prefix=%{_prefix} libdir=%{_libdir} V=1 install install_headers +popd ### ### scripts @@ -469,7 +488,36 @@ popd %{_includedir}/bpf/xsk.h %license linux-%{kversion}/COPYING +%files -n libperf +%{_libdir}/libperf.so.0 +%{_libdir}/libperf.so.0.0.1 +%license linux-%{kversion}/COPYING + +%files -n libperf-devel +%{_libdir}/libperf.a +%{_libdir}/libperf.so +%{_libdir}/pkgconfig/libperf.pc +%{_includedir}/perf/core.h +%{_includedir}/perf/cpumap.h +%{_includedir}/perf/event.h +%{_includedir}/perf/evlist.h +%{_includedir}/perf/evsel.h +%{_includedir}/perf/mmap.h +%{_includedir}/perf/threadmap.h +%{_mandir}/man3/libperf.3.gz +%{_mandir}/man7/libperf-counting.7.gz +%{_mandir}/man7/libperf-sampling.7.gz +%{_docdir}/libperf/examples/sampling.c +%{_docdir}/libperf/examples/counting.c +%{_docdir}/libperf/html/libperf.html +%{_docdir}/libperf/html/libperf-counting.html +%{_docdir}/libperf/html/libperf-sampling.html +%license linux-%{kversion}/COPYING + %changelog +* Tue Apr 14 2020 Michael Petlan - 5.6.0-0.rc7.git0.2 +- Add libperf, libperf-devel and libperf-debuginfo packages + * Wed Apr 08 2020 Justin Forbes - Remove manual perf-debuginfo left from kernel (rhbz 1822110)