blob: 92131425a1f1ec6982bea0475451df3c680045cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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
|