%global majorver 42 %global releasever 42.0.0 %global desc %{expand: \ The Compute Library is a collection of low-level machine learning functions optimized for Arm Cortex-A, Arm Neoverse and Arm Mali GPUs architectures. The library provides superior performance to other open source alternatives and immediate support for new Arm technologies e.g. SVE2.} Name: ComputeLibrary Version: 24.09 Release: %autorelease Summary: ARM compute library License: MIT URL: https://github.com/arm-software/ComputeLibrary Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: gcc-c++ BuildRequires: python3-scons BuildRequires: ocl-icd-devel # Upstream supports only aarch64 and x86_64 ExclusiveArch: x86_64 aarch64 x86_64 %description %{desc} %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel %{desc} %prep %autosetup # remove .bazel files find . -name *.bazel -exec rm -f '{}' \; %build scons %{?_smp_mflags} os=linux \ build=native \ install_dir=buildroot \ set_soname=1 \ opencl=1 \ validation_tests=0 \ examples=0 \ %ifarch aarch64 neon=1 arch=armv8a \ %else neon=0 arch=x86_64 \ %endif Werror=0 extra_cxx_flags="%{optflags}" extra_link_flags="%{build_ldflags}" %install mkdir -p %{buildroot}%{_libdir} %{buildroot}%{_includedir} mv build/buildroot/include/* %{buildroot}%{_includedir} ln -s build/buildroot/lib/libarm_compute.so.%{releasever} build/buildroot/lib/libarm_compute.so.%{majorver} ln -s build/buildroot/lib/libbarm_compute.so.%{releasever} build/buildroot/lib/libarm_compute.so ln -s build/buildroot/lib/libarm_compute_graph.so.%{releasever} build/buildroot/lib/libarm_compute_graph.so.%{majorver} ln -s build/buildroot/lib/libarm_compute_graph.so.%{releasever} build/buildroot/lib/libarm_compute_graph.so mv build/buildroot/lib/libarm_compute.so* %{buildroot}%{_libdir} mv build/buildroot/lib/libarm_compute_graph.so* %{buildroot}%{_libdir} %files %license LICENSE %doc README.md %{_libdir}/libarm_compute.so.%{releasever} %{_libdir}/libarm_compute.so.%{majorver} %{_libdir}/libarm_compute_graph.so.%{releasever} %{_libdir}/libarm_compute_graph.so.%{majorver} %files devel %license include/half/LICENSE.txt %{_includedir}/* %{_libdir}/libarm_compute.so %{_libdir}/libarm_compute_graph.so %changelog %autochangelog