diff options
author | CoprDistGit <infra@openeuler.org> | 2025-01-14 07:53:57 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2025-01-14 07:53:57 +0000 |
commit | 1bf1e59cec68cc5f0a8e366f598cd5d5f84684b1 (patch) | |
tree | 3dae33ac499baea2a34bb85439155b9fc9718521 /google-cpu_features.spec | |
parent | 2d9df3009a7d61447075899721e148b89cc25cf8 (diff) |
automatic import of google-cpu_featuresopeneuler24.09
Diffstat (limited to 'google-cpu_features.spec')
-rw-r--r-- | google-cpu_features.spec | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/google-cpu_features.spec b/google-cpu_features.spec new file mode 100644 index 0000000..9213142 --- /dev/null +++ b/google-cpu_features.spec @@ -0,0 +1,68 @@ +# Modified from https://src.fedoraproject.org/rpms/google-cpu_features/blob/rawhide/f/google-cpu_features.spec + +# Unsupported +# https://github.com/google/cpu_features#support +# https://bugzilla.redhat.com/show_bug.cgi?id=1997167 +ExcludeArch: s390x + +Name: google-cpu_features +Version: 0.9.0 +Release: 1 +Summary: A cross-platform C library to retrieve CPU features at runtime +# Automatically converted from old format: ASL 2.0 - review is highly recommended. +License: Apache-2.0 +URL: https://github.com/google/cpu_features +Source0: https://github.com/google/cpu_features/archive/v%{version}/cpu_features-%{version}.tar.gz + +Patch0: google-cpu_features-unbundle_gtest.patch +Patch1: google-cpu_features-create_soname.patch + +BuildRequires: cmake +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: gmock-devel +BuildRequires: gtest-devel +BuildRequires: make + +%description +A cross-platform C library to retrieve CPU features at runtime. + +%package devel +Summary: %{name} headers and development-related files +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +%{name} headers and development-related files, CMake config files. + +%prep +%autosetup -n cpu_features-%{version} -p1 + +%build +cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \ + -DCPUFEATURES_VERSION_MAJOR:STRING=0 \ + -DCPUFEATURES_VERSION:STRING=0.7 \ + -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ + -DBUILD_PIC:BOOL=ON -DBUILD_TESTING:BOOL=ON +cmake --build . + +%install +DESTDIR="%{buildroot}" cmake --install . + +%files +%license LICENSE +%doc README.md CONTRIBUTING.md +%{_bindir}/list_cpu_features +%{_libdir}/libcpu_features.so.0.7 +%{_libdir}/libcpu_features.so.0 + +%files devel +%{_libdir}/libcpu_features.so +%{_includedir}/cpu_features/ +%{_libdir}/cmake/CpuFeatures/ + +%changelog +* Thu Nov 21 2024 Suyun <ziyu.oerv@isrc.iscas.ac.cn> - 0.9.0-1 +- Init package at 0.2.25 |