72 lines
2.3 KiB
RPMSpec
72 lines
2.3 KiB
RPMSpec
Name: libkperf
|
|
Version: 1.1
|
|
Release: 1
|
|
Summary: Accelerated perf acquisition and symbol resolution
|
|
License: Mulan PSL v2
|
|
URL: https://gitee.com/openeuler/libkperf
|
|
Source0: %{name}-%{version}.tar.gz
|
|
BuildRequires: gcc-c++ make cmake numactl-devel
|
|
ExclusiveArch: aarch64
|
|
%description
|
|
Implement a low overhead pmu collection library, providing abstract interfaces for counting, sampling and symbol resolve.
|
|
|
|
%package devel
|
|
Summary: Development package for building Applications that use libkperf
|
|
License: Mulan PSL v2
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description devel
|
|
Development package for libkperf library calls
|
|
|
|
%prep
|
|
%setup -q
|
|
wget https://gitee.com/openeuler/elfin-parser/repository/archive/v1.0-h1.tar.gz
|
|
tar -xvf v1.0-h1.tar.gz
|
|
cp -r elfin-parser-v1.0-h1/* third_party/elfin-parser/
|
|
|
|
%build
|
|
if [ -d %{buildroot} ];then
|
|
rm -rf %{buildroot}
|
|
fi
|
|
mkdir %{buildroot}
|
|
|
|
%install
|
|
./build.sh install_path=%{buildroot} build_type=DEBUG
|
|
if [ ! -d %{buildroot}/%{_libdir} ];then
|
|
mkdir -p %{buildroot}/%{_libdir}
|
|
fi
|
|
mv %{buildroot}/lib/libsym.so %{buildroot}/%{_libdir}/libsym.so.%{version}
|
|
mv %{buildroot}/lib/libkperf.so %{buildroot}/%{_libdir}/libkperf.so.%{version}
|
|
|
|
ln -s %{buildroot}/%{_libdir}/libsym.so.%{version} %{buildroot}/%{_libdir}/libsym.so
|
|
ln -s %{buildroot}/%{_libdir}/libkperf.so.%{version} %{buildroot}/%{_libdir}/libkperf.so
|
|
|
|
if [ ! -d %{buildroot}/%{_includedir}/libkperf ];then
|
|
mkdir -p %{buildroot}/%{_includedir}/libkperf
|
|
fi
|
|
mv %{buildroot}/include/symbol.h %{buildroot}/%{_includedir}/libkperf/
|
|
mv %{buildroot}/include/pmu.h %{buildroot}/%{_includedir}/libkperf/
|
|
mv %{buildroot}/include/pcerrc.h %{buildroot}/%{_includedir}/libkperf/
|
|
|
|
%check
|
|
|
|
%files
|
|
%license LICENSE
|
|
%{_libdir}/libkperf.so.%{version} %attr(755,root,root)
|
|
%{_libdir}/libsym.so.%{version} %attr(755,root,root)
|
|
|
|
%files devel
|
|
%license LICENSE
|
|
%{_libdir}/libkperf.so %attr(755,root,root)
|
|
%{_libdir}/libsym.so %attr(755,root,root)
|
|
%{_includedir}/libkperf/symbol.h %attr(644,root,root)
|
|
%{_includedir}/libkperf/pmu.h %attr(644,root,root)
|
|
%{_includedir}/libkperf/pcerrc.h %attr(644,root,root)
|
|
|
|
%files debuginfo
|
|
%{_libdir}/libkperf.so %attr(755,root,root)
|
|
%{_libdir}/libsym.so %attr(755,root,root)
|
|
|
|
%changelog
|
|
* Fri Aug 9 2024 echo <2220386943@qq.com> - 1.1-1
|
|
- Package init |