address comments
This commit is contained in:
parent
f3219fedb3
commit
ac0b2a91da
78
libpfm.spec
78
libpfm.spec
@ -1,12 +1,5 @@
|
|||||||
%bcond_without python
|
|
||||||
%if %{with python}
|
|
||||||
%define python_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))")
|
%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)")
|
%define python_prefix %(python3 -c "import sys; print (sys.prefix)")
|
||||||
%{?filter_setup:
|
|
||||||
%filter_provides_in %{python3_sitearch}/perfmon/.*\.so$
|
|
||||||
%filter_setup
|
|
||||||
}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Name: libpfm
|
Name: libpfm
|
||||||
Version: 4.10.1
|
Version: 4.10.1
|
||||||
@ -17,71 +10,40 @@ URL: http://perfmon2.sourceforge.net/
|
|||||||
|
|
||||||
Source0: http://sourceforge.net/projects/perfmon2/files/libpfm4/%{name}-%{version}.tar.gz
|
Source0: http://sourceforge.net/projects/perfmon2/files/libpfm4/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
# PATCH-FIX、python version
|
Patch1: 0001-libpfm-python3-setup.patch
|
||||||
Patch2: 0001-libpfm-python3-setup.patch
|
BuildRequires: python3 python3-devel python3-setuptools swig gcc
|
||||||
|
|
||||||
BuildRequires: gcc
|
|
||||||
%if %{with python}
|
|
||||||
BuildRequires: python3 python3-devel python3-setuptools swig
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This is a user library called libpfm4 to help setup performance
|
This is a user library called libpfm4 to help setup performance
|
||||||
events for use with the perf_events Linux kernel interface.
|
events for use with the perf_events Linux kernel interface.
|
||||||
|
|
||||||
%package devel
|
|
||||||
Summary: Development library to encode performance events for perf_events based tools
|
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
||||||
|
|
||||||
%description devel
|
%package devel
|
||||||
Development library and header files to create performance monitoring
|
Summary: Library to provide perf_events in linux
|
||||||
applications for the perf_events interface.
|
%description devel
|
||||||
|
Library package used for development for perf_events interface.
|
||||||
|
|
||||||
|
%package -n python3-libpfm
|
||||||
|
Provides: %{name}-python = %{version}-%{release}
|
||||||
|
Obsoletes: %{name}-python < %{version}-%{release}
|
||||||
|
Summary: Python bindings for libpfm
|
||||||
|
|
||||||
|
%description -n python3-libpfm
|
||||||
|
Python bindings for libpfm4 used for perf_events
|
||||||
|
|
||||||
%package_help
|
%package_help
|
||||||
|
|
||||||
%if %{with python}
|
|
||||||
%package -n python3-libpfm
|
|
||||||
%{?python_provide:%python_provide python3-libpfm}
|
|
||||||
# Remove before F30
|
|
||||||
Provides: %{name}-python = %{version}-%{release}
|
|
||||||
Provides: %{name}-python%{?_isa} = %{version}-%{release}
|
|
||||||
Obsoletes: %{name}-python < %{version}-%{release}
|
|
||||||
Summary: Python bindings for libpfm and perf_event_open system call
|
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
||||||
|
|
||||||
%description -n python3-libpfm
|
|
||||||
Python bindings for libpfm4 and perf_event_open system call.
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -p1
|
||||||
%patch2 -p1 -b .python3
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if %{with python}
|
%make_build CONFIG_PFMLIB_NOPYTHON=n
|
||||||
%global python_config CONFIG_PFMLIB_NOPYTHON=n
|
|
||||||
%else
|
|
||||||
%global python_config CONFIG_PFMLIB_NOPYTHON=y
|
|
||||||
%endif
|
|
||||||
make %{python_config} %{?_smp_mflags} \
|
|
||||||
OPTIM="%{optflags}" LDFLAGS="%{build_ldflags}"
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%if %{with python}
|
make PREFIX=$RPM_BUILD_ROOT%{_prefix} LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
|
||||||
%global python_config CONFIG_PFMLIB_NOPYTHON=n PYTHON_PREFIX=$RPM_BUILD_ROOT/%{python_prefix}
|
CONFIG_PFMLIB_NOPYTHON=n PYTHON_PREFIX=$RPM_BUILD_ROOT/%{python_prefix} LDCONFIG=/bin/true install
|
||||||
%else
|
|
||||||
%global python_config CONFIG_PFMLIB_NOPYTHON=y
|
|
||||||
%endif
|
|
||||||
|
|
||||||
make \
|
|
||||||
PREFIX=$RPM_BUILD_ROOT%{_prefix} \
|
|
||||||
LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
|
|
||||||
%{python_config} \
|
|
||||||
LDCONFIG=/bin/true \
|
|
||||||
install
|
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
%postun -p /sbin/ldconfig
|
%postun -p /sbin/ldconfig
|
||||||
@ -95,10 +57,8 @@ make \
|
|||||||
%{_libdir}/lib*.so
|
%{_libdir}/lib*.so
|
||||||
%{_libdir}/lib*.a
|
%{_libdir}/lib*.a
|
||||||
|
|
||||||
%if %{with python}
|
|
||||||
%files -n python3-libpfm
|
%files -n python3-libpfm
|
||||||
%{python3_sitearch}/*
|
%{python3_sitearch}/*
|
||||||
%endif
|
|
||||||
|
|
||||||
%files help
|
%files help
|
||||||
%{_mandir}/man3/*
|
%{_mandir}/man3/*
|
||||||
@ -106,5 +66,5 @@ make \
|
|||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|
||||||
* Sat Nov 30 2019 openEuler Buildteam <buildteam@openeuler.org> - 4.10.1-6
|
* Sun Dec 1 2019 jiaxiya <jiaxiyajiaxiya@168.com> - 4.10.1-6
|
||||||
- Package init
|
- Package init
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user