Skip to content

Commit 5e1e10c

Browse files
committed
Merge: [redhat] kernel.spec: create libperf subpackage
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/2172 [redhat] kernel.spec: create libperf subpackage Bugzilla: https://bugzilla.redhat.com/2174972 Upstream status: RHEL-only Signed-off-by: Michael Petlan <mpetlan@redhat.com> Approved-by: Tony Camuso <tcamuso@redhat.com> Approved-by: Jan Stancek <jstancek@redhat.com> Approved-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Jan Stancek <jstancek@redhat.com>
2 parents c03b37b + 74a47da commit 5e1e10c

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

redhat/kernel.spec.template

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,33 @@ This package provides debug information for the perf python bindings.
10651065
# the python_sitearch macro should already be defined from above
10661066
%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{python3_sitearch}/perf.*so(\.debug)?|XXX' -o python3-perf-debuginfo.list}
10671067

1068+
%package -n libperf
1069+
Summary: The perf library from kernel source
1070+
License: GPLv2
1071+
%description -n libperf
1072+
This package contains the kernel source perf library.
1073+
1074+
%package -n libperf-devel
1075+
Summary: Developement files for the perf library from kernel source
1076+
License: GPLv2
1077+
%description -n libperf-devel
1078+
This package includes libraries and header files needed for development
1079+
of applications which use perf library from kernel source.
1080+
1081+
%package -n libperf-debuginfo
1082+
Summary: Debug information for package libperf
1083+
Group: Development/Debug
1084+
Requires: %{name}-debuginfo-common-%{_target_cpu} = %{version}-%{release}
1085+
AutoReqProv: no
1086+
%description -n libperf-debuginfo
1087+
This package provides debug information for the libperf package.
1088+
1089+
# Note that this pattern only works right to match the .build-id
1090+
# symlinks because of the trailing nonmatching alternation and
1091+
# the leading .*, because of find-debuginfo.sh's buggy handling
1092+
# of matching the pattern against the symlinks file.
1093+
%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{_libdir}/libperf.so(\.debug)?|XXX' -o libperf-debuginfo.list}
1094+
10681095
# with_perf
10691096
%endif
10701097

@@ -2586,6 +2613,8 @@ InitBuildVars
25862613
# make sure check-headers.sh is executable
25872614
chmod +x tools/perf/check-headers.sh
25882615
%{perf_make} DESTDIR=$RPM_BUILD_ROOT all
2616+
# libperf
2617+
make -C tools/lib/perf V=1
25892618
%endif
25902619

25912620
%global tools_make \
@@ -2877,6 +2906,10 @@ mkdir -p %{buildroot}/%{_mandir}/man1
28772906
# LIBTRACEEVENT_DYNAMIC=1 above in perf_make macro). Those files should already
28782907
# ship with libtraceevent package.
28792908
rm -rf %{buildroot}%{_libdir}/traceevent
2909+
2910+
# libperf
2911+
make -C tools/lib/perf DESTDIR=%{buildroot} prefix=%{_prefix} libdir=%{_libdir} V=1 install
2912+
rm -f %{buildroot}%{_libdir}/libperf.a
28802913
%endif
28812914

28822915
%if %{with_tools}
@@ -3358,10 +3391,25 @@ fi
33583391
%files -n python3-perf
33593392
%{python3_sitearch}/*
33603393

3394+
%files -n libperf
3395+
%{_libdir}/libperf.so.0
3396+
%{_libdir}/libperf.so.0.0.1
3397+
3398+
%files -n libperf-devel
3399+
%{_libdir}/libperf.so
3400+
%{_libdir}/pkgconfig/libperf.pc
3401+
%{_includedir}/perf/
3402+
%{_mandir}/man3/libperf.*
3403+
%{_mandir}/man7/libperf-counting.*
3404+
%{_mandir}/man7/libperf-sampling.*
3405+
%{_docdir}/libperf/
3406+
33613407
%if %{with_debuginfo}
33623408
%files -f perf-debuginfo.list -n perf-debuginfo
33633409

33643410
%files -f python3-perf-debuginfo.list -n python3-perf-debuginfo
3411+
3412+
%files -f libperf-debuginfo.list -n libperf-debuginfo
33653413
%endif
33663414
# with_perf
33673415
%endif

0 commit comments

Comments
 (0)