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