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