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