This commit is contained in:
William Cohen 2021-01-22 13:30:29 -05:00
parent 035bc07c0b
commit fab1ad1b12

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
@ -42,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}
@ -49,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
@ -94,6 +98,10 @@ make \
LDCONFIG=/bin/true \
install
%if !%{with_static}
rm $RPM_BUILD_ROOT%{_libdir}/lib*.a
%endif
%ldconfig_scriptlets
%files
@ -105,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
@ -114,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.