3 %bcond_without tests # unit testing
5 Summary: CRC32C library
6 Summary(pl.UTF-8): Biblioteka cyklicznego kodu nadmiarowego CRC32C
12 #Source0Download: https://github.com/google/crc32c/tags
13 Source0: https://github.com/google/crc32c/archive/%{version}/%{name}-%{version}.tar.gz
14 # Source0-md5: cc0338e6a60c38cab04a70a2c36cd9f2
15 Patch0: %{name}-system-libs.patch
16 URL: https://github.com/google/crc32c
17 BuildRequires: cmake >= 3.1
18 BuildRequires: libstdc++-devel >= 6:4.7
19 BuildRequires: sed >= 4.0
22 BuildRequires: glog-devel >= 0.6
23 BuildRequires: google-benchmark-devel
24 BuildRequires: gtest-devel
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 This project (originating in Google LevelDB key-value store) collects
30 a few CRC32C implementations under an umbrella that dispatches to a
31 suitable implementation based on the host computer's hardware
34 CRC32C is specified as the CRC that uses the iSCSI polynomial in RFC
35 3720. The polynomial was introduced by G. Castagnoli, S. Braeuer and
36 M. Herrmann. CRC32C is used in software such as Btrfs, ext4, Ceph and
39 %description -l pl.UTF-8
40 Ten projekt (wywodzący się z bazy klucz-wartość Google LevelDB) zbiera
41 kilka implementacji CRC32C w obudowaniu, które wybiera implementację
42 pasującą do możliwości sprzętowych komputera.
44 Algorytm CRC32C to cykliczny kod nadmiarowy, wykorzystujący wielomian
45 iSCSI określony w RFC 3720. Wielomian został wprowadzony przez G.
46 Castagnoliego, S. Braeuera i M. Herrmanna. Algorytm jest
47 wykorzystywany w takim oprogramowaniu, jak btrfs, ext4, ceph czy
51 Summary: Header files for crc32c library
52 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki crc32c
53 Group: Development/Libraries
54 Requires: %{name} = %{version}-%{release}
57 Header files for crc32c library.
59 %description devel -l pl.UTF-8
60 Pliki nagłówkowe biblioteki crc32c.
66 # crc32c_sse42_unittest is missing runtime detection of CPU capabilities
67 if ! grep -q '^flags .* sse4_2' /proc/cpuinfo ; then
68 %{__sed} -i -e 's/if HAVE_SSE42 /if 0 /' src/crc32c_sse42_unittest.cc
75 %{!?with_tests:-DCRC32C_BUILD_BENCHMARKS=OFF -DCRC32C_BUILD_TESTS=OFF}
84 rm -rf $RPM_BUILD_ROOT
86 %{__make} -C build install \
87 DESTDIR=$RPM_BUILD_ROOT
90 rm -rf $RPM_BUILD_ROOT
92 %post -p /sbin/ldconfig
93 %postun -p /sbin/ldconfig
96 %defattr(644,root,root,755)
97 %doc AUTHORS LICENSE README.md
98 %attr(755,root,root) %{_libdir}/libcrc32c.so.*.*.*
99 %attr(755,root,root) %ghost %{_libdir}/libcrc32c.so.1
102 %defattr(644,root,root,755)
103 %attr(755,root,root) %{_libdir}/libcrc32c.so
104 %{_includedir}/crc32c
105 %{_libdir}/cmake/Crc32c