# # spec file for package cpuinfo # # Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: cpuinfo Version: 0~git1739936485.b73ae6c Release: 2.1 Summary: Tools for obtaining CPU information License: BSD-2-Clause URL: https://github.com/pytorch/cpuinfo Source: %name-%version.tar.xz Patch1: soname.patch BuildRequires: cmake ExcludeArch: s390x ppc64le %description cpuinfo is a library to detect essential for performance optimization information about host CPU. %define lname libcpuinfo-suse0 %package -n %lname Summary: CPU information library %description -n %lname cpuinfo is a library to detect essential for performance optimization information about host CPU. It offers detection of SoC and information about cores, cache, toplogy and supported instruction sets. %package devel Summary: Headers for the cpuinfo library Requires: %lname = %version-%release %description devel cpuinfo is a library to detect essential for performance optimization information about host CPU. This subpackage contains development files like headers and cmake scripts. %prep %autosetup -p1 %build # tests need extra packages, which are considered to be downloaded during build # needs a second step to add these ... %cmake .. \ -DCPUINFO_LIBRARY_TYPE=shared \ -DUSE_SYSTEM_LIBS=ON \ -DCPUINFO_BUILD_UNIT_TESTS=OFF \ -DCPUINFO_BUILD_MOCK_TESTS=OFF \ -DCPUINFO_BUILD_BENCHMARKS=OFF %install %cmake_install # second part of soname.patch (cmake does not support libtool-style -release option) mv %buildroot/%_libdir/libcpuinfo-suse.so %buildroot/%_libdir/libcpuinfo.so %ldconfig_scriptlets -n %lname %files %license LICENSE %doc README.md %_bindir/cache-info %_bindir/cpu-info %_bindir/isa-info %ifarch %ix86 x86_64 %_bindir/cpuid-dump %endif %files -n %lname %_libdir/libcpuinfo-*.so.* %files devel %_includedir/cpuinfo.h %_libdir/libcpuinfo.so %_libdir/pkgconfig/libcpuinfo.pc %_datadir/cpuinfo/ %changelog * Mon May 5 2025 Hector Oron Martinez - Exclude ppc64le from builds boo#1242297 * Sun Feb 23 2025 Jan Engelhardt - Update to snapshot b73ae6ce38d * Add a API to check SVE Length support on ARM CPU. (#255) * Add detection for `sme` and `sme2` on `aarch64`. * Detect AMD Zen 5 microarchitecture * Update cpuinfo to support AVX10.2 ISA detection - Ditch the build-time move of /usr/share/cpuinfo to /usr/share/cmake, as this breaks e.g. SVT-AV1 3.x. - Rework soname.patch so the package actually follows SLPP. * Wed Jan 8 2025 Sarah Kriesch - ExcludeArch s390x because it is not supported by IBM boo#1235402 * Thu Jul 25 2024 Jan Engelhardt - Update descriptions - Use normal SRPM name base for devel subpackage and require devel subpackage to have a matching library package - Ship unpackaged cpuid-dump on i586 * Fri Jul 19 2024 Adrian Schröter - initial package. We don't have any version yet upstream, so using version and soname 0