Blame SPECS/libpfm.spec

fb6194
%bcond_without python
fb6194
%if %{with python}
fb6194
%define python_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))")
fb6194
%define python_prefix %(python3 -c "import sys; print (sys.prefix)")
fb6194
%{?filter_setup:
fb6194
%filter_provides_in %{python_sitearch}/perfmon/.*\.so$
fb6194
%filter_setup
fb6194
}
fb6194
%endif
fb6194
fb6194
Name:		libpfm
fb6194
Version:	4.10.1
959ff9
Release:	3%{?dist}
fb6194
fb6194
Summary:	Library to encode performance events for use by perf tool
fb6194
fb6194
Group:		System Environment/Libraries
fb6194
License:	MIT
fb6194
URL:		http://perfmon2.sourceforge.net/
fb6194
Source0:	http://sourceforge.net/projects/perfmon2/files/libpfm4/%{name}-%{version}.tar.gz
fb6194
Patch2:		libpfm-python3-setup.patch
e6fbf9
Patch3:		libpfm-zseries.patch
959ff9
Patch4:		libpfm-tx2.patch
fb6194
fb6194
%if %{with python}
fb6194
BuildRequires:	python3
fb6194
BuildRequires:	python3-devel
fb6194
BuildRequires:	python3-setuptools
fb6194
BuildRequires:	swig
fb6194
%endif
fb6194
fb6194
%description
fb6194
fb6194
libpfm4 is a library to help encode events for use with operating system
fb6194
kernels performance monitoring interfaces. The current version provides support
fb6194
for the perf_events interface available in upstream Linux kernels since v2.6.31.
fb6194
fb6194
%package devel
fb6194
Summary:	Development library to encode performance events for perf_events based tools
fb6194
Group:		Development/Libraries
fb6194
Requires:	%{name}%{?_isa} = %{version}-%{release}
fb6194
fb6194
%description devel
fb6194
Development library and header files to create performance monitoring
fb6194
applications for the perf_events interface.
fb6194
fb6194
%package static
fb6194
Summary:	Static library to encode performance events for perf_events based tools
fb6194
Group:		Development/Libraries
fb6194
Requires:	%{name}%{?_isa} = %{version}-%{release}
fb6194
fb6194
%description static
fb6194
Static version of the libpfm library for performance monitoring
fb6194
applications for the perf_events interface.
fb6194
fb6194
%if %{with python}
fb6194
%package -n python3-libpfm
fb6194
%{?python_provide:%python_provide python3-libpfm}
fb6194
# Remove before F30
fb6194
Provides: %{name}-python = %{version}-%{release}
fb6194
Provides: %{name}-python%{?_isa} = %{version}-%{release}
fb6194
Obsoletes: %{name}-python < %{version}-%{release}
fb6194
Summary:	Python bindings for libpfm and perf_event_open system call
fb6194
Group:		Development/Languages
fb6194
Requires:	%{name}%{?_isa} = %{version}-%{release}
fb6194
fb6194
%description -n python3-libpfm
fb6194
Python bindings for libpfm4 and perf_event_open system call.
fb6194
%endif
fb6194
fb6194
%prep
fb6194
%setup -q
fb6194
%patch2 -p1 -b .python3
e6fbf9
%patch3 -p1 -b .zseries
959ff9
%patch4 -p1 -b .tx2
fb6194
fb6194
%build
fb6194
%if %{with python}
fb6194
%global python_config CONFIG_PFMLIB_NOPYTHON=n
fb6194
%else
fb6194
%global python_config CONFIG_PFMLIB_NOPYTHON=y
fb6194
%endif
fb6194
make %{python_config} %{?_smp_mflags} \
fb6194
     OPTIM="%{optflags}" LDFLAGS="%{build_ldflags}"
fb6194
fb6194
fb6194
%install
fb6194
rm -rf $RPM_BUILD_ROOT
fb6194
fb6194
%if %{with python}
fb6194
%global python_config CONFIG_PFMLIB_NOPYTHON=n PYTHON_PREFIX=$RPM_BUILD_ROOT/%{python_prefix}
fb6194
%else
fb6194
%global python_config CONFIG_PFMLIB_NOPYTHON=y
fb6194
%endif
fb6194
fb6194
make \
fb6194
    PREFIX=$RPM_BUILD_ROOT%{_prefix} \
fb6194
    LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
fb6194
    %{python_config} \
fb6194
    LDCONFIG=/bin/true \
fb6194
    install
fb6194
fb6194
%post -p /sbin/ldconfig
fb6194
%postun	-p /sbin/ldconfig
fb6194
fb6194
%files
fb6194
%doc README
fb6194
%{_libdir}/lib*.so.*
fb6194
fb6194
%files devel
fb6194
%{_includedir}/*
fb6194
%{_mandir}/man3/*
fb6194
%{_libdir}/lib*.so
fb6194
fb6194
%files static
fb6194
%{_libdir}/lib*.a
fb6194
fb6194
%if %{with python}
fb6194
%files -n python3-libpfm
fb6194
%{python_sitearch}/*
fb6194
%endif
fb6194
fb6194
%changelog
959ff9
* Wed May 27 2020 William Cohen <wcohen@redhat.com> - 4.10.1-3
959ff9
- Add Marvell TunderX2 UNC support. (RHBZ #1726070)
676389
e6fbf9
* Tue Oct 15 2019 William Cohen <wcohen@redhat.com> - 4.10.1-2
e6fbf9
- Add IBM zseries support. (RHBZ #1731019)
e6fbf9
fb6194
* Fri Jun 15 2018 William Cohen <wcohen@redhat.com> - 4.10.1-1
fb6194
- Rebase on libpfm-4.10.1.
fb6194
fb6194
* Tue Jun 12 2018 William Cohen <wcohen@redhat.com> - 4.10.0-2
fb6194
- Use upstream libpfm cavium patch.
fb6194
fb6194
* Fri Jun 8 2018 William Cohen <wcohen@redhat.com> - 4.10.0-1
fb6194
- Rebase on libpfm-4.10.0.
fb6194
- Use Python 3.
fb6194
fb6194
* Mon Feb 26 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.9.0-6
fb6194
- Pass in LDFLAGS for build.
fb6194
fb6194
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.9.0-5
fb6194
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
fb6194
fb6194
* Tue Jan 30 2018 William Cohen <wcohen@redhat.com> - 4.9.0-4
fb6194
- Address truncation issues.
fb6194
fb6194
* Tue Jan 30 2018 William Cohen <wcohen@redhat.com> - 4.9.0-3
fb6194
- Use the RPM build flags. (RHBZ #1540262)
fb6194
fb6194
* Tue Jan 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 4.9.0-2
fb6194
- Update Python 2 dependency declarations to new packaging standards
fb6194
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
fb6194
fb6194
* Thu Jan 4 2018 William Cohen <wcohen@redhat.com> - 4.9.0-1
fb6194
- Rebase on libpfm-4.9.0.
fb6194
fb6194
* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.8.0-8
fb6194
- Add Provides for the old name without %%_isa
fb6194
fb6194
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.8.0-7
fb6194
- Python 2 binary package renamed to python2-libpfm
fb6194
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
fb6194
fb6194
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.8.0-6
fb6194
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
fb6194
fb6194
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.8.0-5
fb6194
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
fb6194
fb6194
* Fri Jul 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 4.8.0-4
fb6194
- Rebuild due to bug in RPM (RHBZ #1468476)
fb6194
fb6194
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.8.0-3
fb6194
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
fb6194
fb6194
* Mon Nov 7 2016 William Cohen <wcohen@redhat.com> - 4.8.0-1
fb6194
- Rebase on libpfm-4.8.0.
fb6194
fb6194
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.7.0-2
fb6194
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
fb6194
fb6194
* Thu Feb 11 2016 William Cohen <wcohen@redhat.com> - 4.7.0-1
fb6194
- Rebase on libpfm-4.7.0.
fb6194
fb6194
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.0-4
fb6194
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
fb6194
fb6194
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.6.0-3
fb6194
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
fb6194
fb6194
* Thu Jun 4 2015 William Cohen <wcohen@redhat.com> - 4.6.0-2
fb6194
- Correct requires for subpackages.
fb6194
fb6194
* Thu Mar 5 2015 William Cohen <wcohen@redhat.com> - 4.6.0-1
fb6194
- Rebase on libpfm-4.6.0.
fb6194
fb6194
* Wed Feb 11 2015 William Cohen <wcohen@redhat.com> - 4.5.0-6
fb6194
- Bump version and rebuild.
fb6194
fb6194
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.5.0-5
fb6194
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
fb6194
fb6194
* Mon Jun 30 2014 Toshio Kuratomi <toshio@fedoraproject.org> - 4.5.0-4
fb6194
- Replace python-setuptools-devel BR with python-setuptools
fb6194
fb6194
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.5.0-3
fb6194
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
fb6194
fb6194
* Fri May 23 2014 William Cohen <wcohen@redhat.com> 4.5.0-2
fb6194
- Add cortex a53 support.
fb6194
fb6194
* Fri May 23 2014 William Cohen <wcohen@redhat.com> 4.5.0-1
fb6194
- Rebase on libpfm-4.5.0.
fb6194
fb6194
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.4.0-3
fb6194
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
fb6194
fb6194
* Fri Jul 19 2013 William Cohen <wcohen@redhat.com> 4.4.0-2
fb6194
- Add IBM power 8 support.
fb6194
fb6194
* Mon Jun 17 2013 William Cohen <wcohen@redhat.com> 4.4.0-1
fb6194
- Rebase on libpfm-4.4.0.
fb6194
fb6194
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.3.0-3
fb6194
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
fb6194
fb6194
* Tue Aug 28 2012 William Cohen <wcohen@redhat.com> 4.3.0-2
fb6194
- Turn off LDCONFIG and remove patch.
fb6194
fb6194
* Tue Aug 28 2012 William Cohen <wcohen@redhat.com> 4.3.0-1
fb6194
- Rebase on libpfm-4.3.0.
fb6194
fb6194
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.0-8
fb6194
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
fb6194
fb6194
* Fri Jun 8 2012 William Cohen <wcohen@redhat.com> 4.2.0-7
fb6194
- Eliminate swig error.
fb6194
fb6194
* Thu Jun 7 2012 William Cohen <wcohen@redhat.com> 4.2.0-6
fb6194
- Eliminate rpm_build_root macro in build section.
fb6194
- Correct location of shared library files.
fb6194
fb6194
* Thu Jun 7 2012 William Cohen <wcohen@redhat.com> 4.2.0-5
fb6194
- Use siginfo_t for some examples.
fb6194
fb6194
* Mon Jun 4 2012 William Cohen <wcohen@redhat.com> 4.2.0-4
fb6194
- Correct python files.
fb6194
fb6194
* Wed Mar 28 2012 William Cohen <wcohen@redhat.com> 4.2.0-3
fb6194
- Additional spec file fixup for rhbz804666.
fb6194
fb6194
* Wed Mar 14 2012 William Cohen <wcohen@redhat.com> 4.2.0-2
fb6194
- Some spec file fixup.
fb6194
fb6194
* Wed Jan 12 2011 Arun Sharma <asharma@fb.com> 4.2.0-0
fb6194
Initial revision