commit 5443cb588dcb60b036a0261eb1df9c3617490de8047fe9db8b0d7538336466d2 Author: Christian Goll Date: Mon Jul 22 13:07:51 2024 +0000 I'd like to submit some ai packages to factory, can I join your devel project? OBS-URL: https://build.opensuse.org/package/show/science:machinelearning/cpuinfo?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..3134dd5 --- /dev/null +++ b/_service @@ -0,0 +1,14 @@ + + + https://github.com/pytorch/cpuinfo + git + 0.0 + ca678952a9a8eaa6de112d154e8e104b22f9ab3f + + + + *.tar + xz + + + diff --git a/cpuinfo-0.0.obscpio b/cpuinfo-0.0.obscpio new file mode 100644 index 0000000..ae94cc1 --- /dev/null +++ b/cpuinfo-0.0.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d3bfb86d965f706279bf35ff575cf090145ed029c689e2b1086cabd68dda1f62 +size 20823565 diff --git a/cpuinfo.changes b/cpuinfo.changes new file mode 100644 index 0000000..356603a --- /dev/null +++ b/cpuinfo.changes @@ -0,0 +1,6 @@ +------------------------------------------------------------------- +Fri Jul 19 11:14:42 UTC 2024 - Adrian Schröter + +- initial package. + We don't have any version yet upstream, so using version and soname 0 + diff --git a/cpuinfo.obsinfo b/cpuinfo.obsinfo new file mode 100644 index 0000000..8cf5f07 --- /dev/null +++ b/cpuinfo.obsinfo @@ -0,0 +1,4 @@ +name: cpuinfo +version: 0.0 +mtime: 1720582619 +commit: ca678952a9a8eaa6de112d154e8e104b22f9ab3f diff --git a/cpuinfo.spec b/cpuinfo.spec new file mode 100644 index 0000000..f00c7bd --- /dev/null +++ b/cpuinfo.spec @@ -0,0 +1,88 @@ +# +# spec file for package cpuinfo +# +# Copyright (c) 2024 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.0 +Release: 0 +Summary: CPU INFOrmation tools +License: BSD-2-Clause +URL: https://github.com/pytorch/cpuinfo +Source: %name-%version.tar.xz +Patch1: soname.patch +BuildRequires: cmake + +%description +CPU INFOrmation library (x86/x86-64/ARM/ARM64) of pytorch project. + +%define lname libcpuinfo0 +%package -n %lname +Summary: CPU INFOrmation library +%description -n %lname +CPU INFOrmation library (x86/x86-64/ARM/ARM64) of pytorch project. + +%package -n libcpuinfo-devel +Summary: CPU INFOrmation library development files +Requires: %lname + +%description -n libcpuinfo-devel +CPU INFOrmation library (x86/x86-64/ARM/ARM64) of pytorch project. + +Development files, headers and cmake + +%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 +mkdir -p %buildroot/usr/share/cmake +mv %buildroot/usr/share/{,cmake/}cpuinfo + +%post -n %lname -p /sbin/ldconfig +%postun -n %lname -p /sbin/ldconfig + +%files +%license LICENSE +%doc README.md +%_bindir/cache-info +%_bindir/cpu-info +%_bindir/isa-info +%ifarch x86_64 +%_bindir/cpuid-dump +%endif + +%files -n %lname +%_libdir/libcpuinfo.so.* + +%files -n libcpuinfo-devel +%_includedir/cpuinfo.h +%_libdir/libcpuinfo.so +%_libdir/pkgconfig/libcpuinfo.pc +%_datadir/cmake/cpuinfo + +%changelog + diff --git a/soname.patch b/soname.patch new file mode 100644 index 0000000..cd2a3f1 --- /dev/null +++ b/soname.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4634a22..87178a9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -259,6 +259,7 @@ ELSEIF(CPUINFO_LIBRARY_TYPE STREQUAL "static") + ELSE() + MESSAGE(FATAL_ERROR "Unsupported library type ${CPUINFO_LIBRARY_TYPE}") + ENDIF() ++set_target_properties(cpuinfo PROPERTIES VERSION 0.0.0 SOVERSION 0) + ADD_LIBRARY(cpuinfo_internals STATIC ${CPUINFO_SRCS}) + CPUINFO_TARGET_ENABLE_C99(cpuinfo) + CPUINFO_TARGET_ENABLE_C99(cpuinfo_internals)