]>
Commit | Line | Data |
---|---|---|
a15f1265 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # API documentation | |
4 | # | |
5 | Summary: Efficient and performance-portable SIMD | |
6 | Summary(pl.UTF-8): Wydajne i przenośne operacje SIMD | |
7 | Name: highway | |
27467171 JB |
8 | Version: 0.16.0 |
9 | Release: 1 | |
a15f1265 JB |
10 | License: Apache v2.0 |
11 | Group: Libraries | |
12 | #Source0Download: https://github.com/google/highway/releases | |
13 | Source0: https://github.com/google/highway/archive/%{version}/%{name}-%{version}.tar.gz | |
27467171 JB |
14 | # Source0-md5: 2d95ad96b3fda6cf7d918e801e89516e |
15 | # related to https://github.com/google/highway/commit/4a57d62e1d87d8c80bbea34fa0e2d27bc8f6b885.patch | |
72d60b38 | 16 | Patch0: %{name}-rdtscp.patch |
a15f1265 JB |
17 | URL: https://github.com/google/highway |
18 | BuildRequires: cmake >= 3.10 | |
8564459d | 19 | BuildRequires: gtest-devel |
a15f1265 JB |
20 | BuildRequires: libstdc++-devel >= 6:4.7 |
21 | BuildRequires: rpm-build >= 4.6 | |
22 | BuildRequires: rpmbuild(macros) >= 1.605 | |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %description | |
26 | Highway is a C++ library for SIMD (Single Instruction, Multiple Data), | |
27 | i.e. applying the same operation to multiple 'lanes' using a single | |
28 | CPU instruction. | |
29 | ||
30 | %description -l pl.UTF-8 | |
31 | Highway to biblioteka C++ do operacji SIMD (Single Instruction, | |
32 | Multiple Data), czyli wykonywania tej samej operacji na wielu "pasach" | |
33 | przy użyciu pojedynczej instrukcji procesora. | |
34 | ||
35 | %package devel | |
27467171 JB |
36 | Summary: Header files for Highway library |
37 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Highway | |
a15f1265 | 38 | Group: Development/Libraries |
27467171 | 39 | Requires: %{name} = %{version}-%{release} |
a15f1265 JB |
40 | |
41 | %description devel | |
27467171 | 42 | Header files for Highway library. |
a15f1265 JB |
43 | |
44 | %description devel -l pl.UTF-8 | |
27467171 JB |
45 | Pliki nagłówkowe biblioteki Highway. |
46 | ||
47 | %package test | |
48 | Summary: Highway test helper library | |
49 | Summary(pl.UTF-8): Biblioteka pomocnicza testów z użyciem biblioteki Highway | |
50 | Group: Libraries | |
51 | Requires: %{name} = %{version}-%{release} | |
52 | ||
53 | %description test | |
54 | Highway test helper library. | |
55 | ||
56 | %description test -l pl.UTF-8 | |
57 | Biblioteka pomocnicza testów z użyciem biblioteki Highway. | |
58 | ||
59 | %package test-devel | |
60 | Summary: Header files for Highway test library | |
61 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Highway test | |
62 | Group: Development/Libraries | |
63 | Requires: %{name}-devel = %{version}-%{release} | |
64 | Requires: %{name}-test = %{version}-%{release} | |
65 | Requires: gtest-devel | |
66 | ||
67 | %description test-devel | |
68 | Header files for Highway test library. | |
69 | ||
70 | %description test-devel -l pl.UTF-8 | |
71 | Pliki nagłówkowe biblioteki Highway test. | |
a15f1265 JB |
72 | |
73 | %package apidocs | |
74 | Summary: API documentation for Highway library | |
75 | Summary(pl.UTF-8): Dokumentacja API biblioteki Highway | |
76 | Group: Documentation | |
77 | BuildArch: noarch | |
78 | ||
79 | %description apidocs | |
80 | API documentation for Highway library. | |
81 | ||
82 | %description apidocs -l pl.UTF-8 | |
83 | Dokumentacja API biblioteki Highway. | |
84 | ||
85 | %prep | |
86 | %setup -q | |
72d60b38 | 87 | %patch0 -p1 |
a15f1265 JB |
88 | |
89 | %build | |
90 | install -d build | |
91 | cd build | |
92 | %cmake .. \ | |
93 | -DCMAKE_INSTALL_INCLUDEDIR=include \ | |
8564459d JB |
94 | -DCMAKE_INSTALL_LIBDIR=%{_lib} \ |
95 | -DHWY_SYSTEM_GTEST=ON | |
a15f1265 JB |
96 | |
97 | %{__make} | |
98 | ||
99 | %install | |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | ||
102 | %{__make} -C build install \ | |
103 | DESTDIR=$RPM_BUILD_ROOT | |
104 | ||
105 | %clean | |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | ||
27467171 JB |
108 | %post -p /sbin/ldconfig |
109 | %postun -p /sbin/ldconfig | |
110 | ||
111 | %post test -p /sbin/ldconfig | |
112 | %postun test -p /sbin/ldconfig | |
113 | ||
114 | %files | |
a15f1265 JB |
115 | %defattr(644,root,root,755) |
116 | %doc README.md | |
27467171 JB |
117 | %attr(755,root,root) %{_libdir}/libhwy.so.*.*.* |
118 | %attr(755,root,root) %ghost %{_libdir}/libhwy.so.0 | |
119 | %attr(755,root,root) %{_libdir}/libhwy_contrib.so.*.*.* | |
120 | %attr(755,root,root) %ghost %{_libdir}/libhwy_contrib.so.0 | |
121 | ||
122 | %files devel | |
123 | %defattr(644,root,root,755) | |
124 | %attr(755,root,root) %{_libdir}/libhwy.so | |
125 | %attr(755,root,root) %{_libdir}/libhwy_contrib.so | |
126 | %dir %{_includedir}/hwy | |
127 | %{_includedir}/hwy/contrib | |
128 | %{_includedir}/hwy/ops | |
129 | %{_includedir}/hwy/*.h | |
a15f1265 JB |
130 | %{_pkgconfigdir}/libhwy.pc |
131 | %{_pkgconfigdir}/libhwy-contrib.pc | |
27467171 JB |
132 | |
133 | %files test | |
134 | %defattr(644,root,root,755) | |
135 | %attr(755,root,root) %{_libdir}/libhwy_test.so.*.*.* | |
136 | %attr(755,root,root) %ghost %{_libdir}/libhwy_test.so.0 | |
137 | ||
138 | %files test-devel | |
139 | %defattr(644,root,root,755) | |
140 | %attr(755,root,root) %{_libdir}/libhwy_test.so | |
141 | %{_includedir}/hwy/tests | |
a15f1265 JB |
142 | %{_pkgconfigdir}/libhwy-test.pc |
143 | ||
144 | %if %{with apidocs} | |
145 | %files apidocs | |
146 | %defattr(644,root,root,755) | |
147 | %doc g3doc/*.{md,pdf} | |
148 | %endif |