2019-12-03 14:12:10 +08:00
|
|
|
%define python_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))")
|
|
|
|
|
%define python_prefix %(python3 -c "import sys; print (sys.prefix)")
|
|
|
|
|
|
|
|
|
|
Name: libpfm
|
|
|
|
|
Version: 4.10.1
|
2020-03-18 17:35:28 +08:00
|
|
|
Release: 7
|
2019-12-03 14:12:10 +08:00
|
|
|
Summary: A user library help setup performance events for use with the perf_events Linux kernel interface.
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: http://perfmon2.sourceforge.net/
|
|
|
|
|
|
|
|
|
|
Source0: http://sourceforge.net/projects/perfmon2/files/libpfm4/%{name}-%{version}.tar.gz
|
|
|
|
|
|
2020-03-18 15:57:32 +08:00
|
|
|
Patch0001: 0001-libpfm-python3-setup.patch
|
|
|
|
|
Patch0002: 0002-libpfm-lib-Makefile.patch
|
2019-12-07 00:33:37 +08:00
|
|
|
BuildRequires: python3 python3-devel python3-setuptools swig gcc
|
2019-12-03 14:12:10 +08:00
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
This is a user library called libpfm4 to help setup performance
|
|
|
|
|
events for use with the perf_events Linux kernel interface.
|
|
|
|
|
|
|
|
|
|
|
2019-12-07 00:33:37 +08:00
|
|
|
%package devel
|
2019-12-09 14:43:16 +08:00
|
|
|
Provides: %{name}-static = %{version}-%{release}
|
|
|
|
|
Obsoletes: %{name}-static <= %{version}-%{release}
|
2019-12-07 00:33:37 +08:00
|
|
|
Summary: Library to provide perf_events in linux
|
|
|
|
|
%description devel
|
|
|
|
|
Library package used for development for perf_events interface.
|
2019-12-03 14:12:10 +08:00
|
|
|
|
|
|
|
|
%package -n python3-libpfm
|
2019-12-07 00:33:37 +08:00
|
|
|
Provides: %{name}-python = %{version}-%{release}
|
|
|
|
|
Obsoletes: %{name}-python < %{version}-%{release}
|
|
|
|
|
Summary: Python bindings for libpfm
|
2019-12-03 14:12:10 +08:00
|
|
|
|
|
|
|
|
%description -n python3-libpfm
|
2019-12-07 00:33:37 +08:00
|
|
|
Python bindings for libpfm4 used for perf_events
|
|
|
|
|
|
|
|
|
|
%package_help
|
2019-12-03 14:12:10 +08:00
|
|
|
|
|
|
|
|
%prep
|
2019-12-07 00:33:37 +08:00
|
|
|
%autosetup -p1
|
2019-12-03 14:12:10 +08:00
|
|
|
|
|
|
|
|
%build
|
2019-12-07 00:33:37 +08:00
|
|
|
%make_build CONFIG_PFMLIB_NOPYTHON=n
|
2019-12-03 14:12:10 +08:00
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
2019-12-07 00:33:37 +08:00
|
|
|
make PREFIX=$RPM_BUILD_ROOT%{_prefix} LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
|
|
|
|
|
CONFIG_PFMLIB_NOPYTHON=n PYTHON_PREFIX=$RPM_BUILD_ROOT/%{python_prefix} LDCONFIG=/bin/true install
|
2019-12-03 14:12:10 +08:00
|
|
|
|
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%doc README
|
|
|
|
|
%{_libdir}/lib*.so.*
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%{_includedir}/*
|
|
|
|
|
%{_libdir}/lib*.so
|
|
|
|
|
%{_libdir}/lib*.a
|
|
|
|
|
|
|
|
|
|
%files -n python3-libpfm
|
|
|
|
|
%{python3_sitearch}/*
|
|
|
|
|
|
|
|
|
|
%files help
|
|
|
|
|
%{_mandir}/man3/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2020-03-18 17:35:28 +08:00
|
|
|
* Wed Mar 18 2020 yinzhenling <yinzhenling2@huawei.com> - 4.10.1-7
|
|
|
|
|
- add make option
|
2019-12-03 14:12:10 +08:00
|
|
|
|
2019-12-07 00:33:37 +08:00
|
|
|
* Sun Dec 1 2019 jiaxiya <jiaxiyajiaxiya@168.com> - 4.10.1-6
|
2019-12-03 14:12:10 +08:00
|
|
|
- Package init
|