Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/libpfm.git#fab1ad1b122671c5862842378860061bfa114e0d
This commit is contained in:
DistroBaker 2021-01-22 18:54:08 +00:00
parent 3a928783c0
commit 11014b3c8c
1 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,5 @@
# Default to no static libraries
%{!?with_static: %global with_static 0}
%bcond_without python
%if %{with python}
%define python_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))")
@ -10,7 +12,7 @@
Name: libpfm
Version: 4.11.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Library to encode performance events for use by perf tool
@ -19,6 +21,7 @@ URL: http://perfmon2.sourceforge.net/
Source0: http://sourceforge.net/projects/perfmon2/files/libpfm4/%{name}-%{version}.tar.gz
Patch2: libpfm-python3-setup.patch
BuildRequires: make
BuildRequires: gcc
%if %{with python}
BuildRequires: python3
@ -41,6 +44,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
Development library and header files to create performance monitoring
applications for the perf_events interface.
%if %{with_static}
%package static
Summary: Static library to encode performance events for perf_events based tools
Requires: %{name}%{?_isa} = %{version}-%{release}
@ -48,6 +52,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%description static
Static version of the libpfm library for performance monitoring
applications for the perf_events interface.
%endif
%if %{with python}
%package -n python3-libpfm
@ -93,6 +98,10 @@ make \
LDCONFIG=/bin/true \
install
%if !%{with_static}
rm $RPM_BUILD_ROOT%{_libdir}/lib*.a
%endif
%ldconfig_scriptlets
%files
@ -104,8 +113,10 @@ make \
%{_mandir}/man3/*
%{_libdir}/lib*.so
%if %{with_static}
%files static
%{_libdir}/lib*.a
%endif
%if %{with python}
%files -n python3-libpfm
@ -113,6 +124,9 @@ make \
%endif
%changelog
* Fri Jan 22 2021 William Cohen <wcohen@redhat.com> - 4.11.0-2
- By default disable generation of static libraries
* Tue Sep 08 2020 William Cohen <wcohen@redhat.com> - 4.11.0-1
- Rebase on libpfm-4.11.0.