]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without apidocs # API documentation | |
4 | %bcond_without tests # don't build tests | |
5 | # | |
6 | Summary: Efficient and performance-portable SIMD | |
7 | Summary(pl.UTF-8): Wydajne i przenośne operacje SIMD | |
8 | Name: highway | |
9 | Version: 1.0.3 | |
10 | Release: 1 | |
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 | |
15 | # Source0-md5: d591cf12d8d1f9f237a015ffc691b7c2 | |
16 | URL: https://github.com/google/highway | |
17 | BuildRequires: cmake >= 3.10 | |
18 | %{?with_tests:BuildRequires: gtest-devel} | |
19 | BuildRequires: libstdc++-devel >= 6:4.7 | |
20 | BuildRequires: rpm-build >= 4.6 | |
21 | BuildRequires: rpmbuild(macros) >= 1.742 | |
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 | |
35 | Summary: Header files for Highway library | |
36 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Highway | |
37 | Group: Development/Libraries | |
38 | Requires: %{name} = %{version}-%{release} | |
39 | ||
40 | %description devel | |
41 | Header files for Highway library. | |
42 | ||
43 | %description devel -l pl.UTF-8 | |
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. | |
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 .. \ | |
91 | %{cmake_on_off tests BUILD_TESTING} \ | |
92 | -DCMAKE_INSTALL_INCLUDEDIR=include \ | |
93 | -DCMAKE_INSTALL_LIBDIR=%{_lib} \ | |
94 | -DHWY_SYSTEM_GTEST=ON | |
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 | ||
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 | |
114 | %defattr(644,root,root,755) | |
115 | %doc README.md | |
116 | %attr(755,root,root) %{_libdir}/libhwy.so.*.*.* | |
117 | %attr(755,root,root) %ghost %{_libdir}/libhwy.so.1 | |
118 | %attr(755,root,root) %{_libdir}/libhwy_contrib.so.*.*.* | |
119 | %attr(755,root,root) %ghost %{_libdir}/libhwy_contrib.so.1 | |
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 | |
129 | %{_pkgconfigdir}/libhwy.pc | |
130 | %{_pkgconfigdir}/libhwy-contrib.pc | |
131 | ||
132 | %files test | |
133 | %defattr(644,root,root,755) | |
134 | %attr(755,root,root) %{_libdir}/libhwy_test.so.*.*.* | |
135 | %attr(755,root,root) %ghost %{_libdir}/libhwy_test.so.1 | |
136 | ||
137 | %files test-devel | |
138 | %defattr(644,root,root,755) | |
139 | %attr(755,root,root) %{_libdir}/libhwy_test.so | |
140 | %{_includedir}/hwy/tests | |
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 |