%global _empty_manifest_terminate_build 0 Name: onnxruntime Version: 1.17.1 Release: 1 Summary: Open Source Neural Network Inference Engine License: MIT URL: https://github.com/microsoft/onnxruntime Source0: https://openi.pcl.ac.cn/JunJun-Liu/onnx-runtime/onnxruntime-1.17.1.tar.gz BuildRequires: gcc-c++ BuildRequires: python3-devel BuildRequires: cmake Requires: python3-numpy %description ONNX Runtime is a performance-focused inference engine for ONNX (Open Neural Network Exchange) models. These models can come from a variety of frameworks, such as TensorFlow, PyTorch, or Keras. ONNX Runtime provides an easy way to run models in a fast and efficient manner with minimal dependencies. %prep %autosetup -p1 -n %{name}-v%{version} %build export CFLAGS+=" -Wno-error=maybe-uninitialized -Wno-error=uninitialized -Wno-error=restrict -fPIC" export CXXFLAGS+=" -Wno-error=maybe-uninitialized -Wno-error=uninitialized -Wno-error=restrict -fPIC" mkdir build && cd build %cmake .. %make_build %install %make_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/doclist.lst . %files %doc *.md %license LICENSE %{_bindir}/* %{python3_sitearch}/* %changelog * Thu Feb 29 2024 JunjunLiu <172074482@qq.com> - 1.17.1-1 - Initial package version for ONNX Runtime 1.17.1