Name: D-FOT Version: v1.0.1 Release: 1 Summary: %{name} is a dynamic feedback-directed optimization tool for openEuler. License: Mulan PSL v2 URL: https://gitee.com/openeuler/%{name} Source0: %{name}-%{version}.tar.gz BuildRequires: cmake make gcc-c++ boost-devel log4cplus-devel numactl-devel BuildRequires: git Requires: oeAware-manager llvm-bolt ExclusiveArch: aarch64 %global libkperf_name libkperf %global libkperf_tagver v1.2.1 %global libkperf_source https://gitee.com/openeuler/libkperf.git %description %{name} is a dynamic feedback-directed optimization tool for openEuler. %prep %autosetup -n %{name}-%{version} mkdir thirdparty && cd thirdparty git clone --recurse-submodules %{libkperf_source} cd %{libkperf_name} git checkout %{libkperf_tagver} cd .. mv %{libkperf_name} %{libkperf_name}-%{libkperf_tagver} cd .. %build # build libkperf.so cd thirdparty/%{libkperf_name}-%{libkperf_tagver} sh build.sh cd ../../ # build libdfot.so mkdir build && cd build cmake .. \ -DLIB_KPERF_LIBPATH=%{_builddir}/%{name}-%{version}/thirdparty/%{libkperf_name}-%{libkperf_tagver}/output/lib \ -DLIB_KPERF_INCPATH=%{_builddir}/%{name}-%{version}/thirdparty/%{libkperf_name}-%{libkperf_tagver}/output/include \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_SKIP_RPATH=TRUE make %install mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/oeAware-plugin/ install -b -m740 ./build/libdfot.so ${RPM_BUILD_ROOT}%{_libdir}/oeAware-plugin/ mkdir -p ${RPM_BUILD_ROOT}/etc/dfot install -D -m 0640 ./configs/dfot.ini ${RPM_BUILD_ROOT}/etc/dfot/ %files %defattr (-, root, root) %attr(0640,root,root) /etc/dfot/dfot.ini %attr(0440,root,root) %{_libdir}/oeAware-plugin/libdfot.so %changelog * Wed Nov 27 2024 rfwang07 - v1.0.1-1 - ID:NA - SUG:NA - DESC: init D-FOT