]> git.pld-linux.org Git - packages/highway.git/blame - highway.spec
add tests bcond
[packages/highway.git] / highway.spec
CommitLineData
a15f1265
JB
1#
2# Conditional build:
3%bcond_without apidocs # API documentation
8390db53 4%bcond_without tests # don't build tests
a15f1265
JB
5#
6Summary: Efficient and performance-portable SIMD
7Summary(pl.UTF-8): Wydajne i przenośne operacje SIMD
8Name: highway
27467171
JB
9Version: 0.16.0
10Release: 1
a15f1265
JB
11License: Apache v2.0
12Group: Libraries
13#Source0Download: https://github.com/google/highway/releases
14Source0: 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 17Patch0: %{name}-rdtscp.patch
a15f1265
JB
18URL: https://github.com/google/highway
19BuildRequires: cmake >= 3.10
8390db53 20%{?with_tests:BuildRequires: gtest-devel}
a15f1265
JB
21BuildRequires: libstdc++-devel >= 6:4.7
22BuildRequires: rpm-build >= 4.6
8390db53 23BuildRequires: rpmbuild(macros) >= 1.742
a15f1265
JB
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26%description
27Highway is a C++ library for SIMD (Single Instruction, Multiple Data),
28i.e. applying the same operation to multiple 'lanes' using a single
29CPU instruction.
30
31%description -l pl.UTF-8
32Highway to biblioteka C++ do operacji SIMD (Single Instruction,
33Multiple Data), czyli wykonywania tej samej operacji na wielu "pasach"
34przy użyciu pojedynczej instrukcji procesora.
35
36%package devel
27467171
JB
37Summary: Header files for Highway library
38Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Highway
a15f1265 39Group: Development/Libraries
27467171 40Requires: %{name} = %{version}-%{release}
a15f1265
JB
41
42%description devel
27467171 43Header files for Highway library.
a15f1265
JB
44
45%description devel -l pl.UTF-8
27467171
JB
46Pliki nagłówkowe biblioteki Highway.
47
48%package test
49Summary: Highway test helper library
50Summary(pl.UTF-8): Biblioteka pomocnicza testów z użyciem biblioteki Highway
51Group: Libraries
52Requires: %{name} = %{version}-%{release}
53
54%description test
55Highway test helper library.
56
57%description test -l pl.UTF-8
58Biblioteka pomocnicza testów z użyciem biblioteki Highway.
59
60%package test-devel
61Summary: Header files for Highway test library
62Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Highway test
63Group: Development/Libraries
64Requires: %{name}-devel = %{version}-%{release}
65Requires: %{name}-test = %{version}-%{release}
66Requires: gtest-devel
67
68%description test-devel
69Header files for Highway test library.
70
71%description test-devel -l pl.UTF-8
72Pliki nagłówkowe biblioteki Highway test.
a15f1265
JB
73
74%package apidocs
75Summary: API documentation for Highway library
76Summary(pl.UTF-8): Dokumentacja API biblioteki Highway
77Group: Documentation
78BuildArch: noarch
79
80%description apidocs
81API documentation for Highway library.
82
83%description apidocs -l pl.UTF-8
84Dokumentacja API biblioteki Highway.
85
86%prep
87%setup -q
72d60b38 88%patch0 -p1
a15f1265
JB
89
90%build
91install -d build
92cd 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
102rm -rf $RPM_BUILD_ROOT
103
104%{__make} -C build install \
105 DESTDIR=$RPM_BUILD_ROOT
106
107%clean
108rm -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
This page took 0.206081 seconds and 4 git commands to generate.