diff --git a/D-FOT-v1.0.1.tar.gz b/D-FOT-v1.0.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..5f60da1f323be37105aecebd82d458d03b032940 Binary files /dev/null and b/D-FOT-v1.0.1.tar.gz differ diff --git a/D-FOT.spec b/D-FOT.spec new file mode 100644 index 0000000000000000000000000000000000000000..669f6a0540b3c5fcc4a22ce5c7f1ae1626eb2ae6 --- /dev/null +++ b/D-FOT.spec @@ -0,0 +1,65 @@ +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 +