]> git.pld-linux.org Git - packages/snappy.git/blob - snappy.spec
- updated to 1.1.10
[packages/snappy.git] / snappy.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # unit tests
4 %bcond_without  static_libs     # static library
5
6 Summary:        Snappy - fast compression/decompression library
7 Summary(pl.UTF-8):      Snappy - biblioteka do szybkiej kompresji i dekompresji
8 Name:           snappy
9 Version:        1.1.10
10 Release:        1
11 License:        BSD
12 Group:          Libraries
13 #Source0Download: https://github.com/google/snappy/releases
14 Source0:        https://github.com/google/snappy/archive/%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5:  70153395ebe6d72febe2cf2e40026a44
16 Source1:        %{name}.pc.in
17 Patch0:         %{name}-gtest.patch
18 URL:            http://google.github.io/snappy/
19 BuildRequires:  cmake >= 3.1
20 BuildRequires:  libstdc++-devel >= 6:5
21 BuildRequires:  pkgconfig
22 %if %{with tests}
23 BuildRequires:  gtest-devel
24 BuildRequires:  lzo-devel >= 2
25 BuildRequires:  zlib-devel
26 %endif
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 Snappy is a compression/decompression library. It does not aim for
31 maximum compression, or compatibility with any other compression
32 library; instead, it aims for very high speeds and reasonable
33 compression. For instance, compared to the fastest mode of zlib,
34 Snappy is an order of magnitude faster for most inputs, but the
35 resulting compressed files are anywhere from 20% to 100% bigger.
36
37 Snappy has the following properties:
38 - Fast: Compression speeds at 250 MB/sec and beyond, with no
39   assembler code.
40 - Stable: Over the last few years, Snappy has compressed and
41   decompressed petabytes of data in Google's production environment.
42   The Snappy bitstream format is stable and will not change between
43   versions.
44 - Robust: The Snappy decompressor is designed not to crash in the face
45   of corrupted or malicious input.
46 - Free and open source software: Snappy is licensed under the Apache
47   license, version 2.0.
48
49 Snappy has previously been called "Zippy" in some Google presentations
50 and the like.
51
52 %description -l pl.UTF-8
53 Snappy to biblioteka kompresująca i dekompresująca. Jej celem nie jest
54 maksymalna kompresja ani kompatybilność z żadną istniejącą biblioteką;
55 celem natomiast jest bardzo duża szybkość przy rozsądnej kompresji. Na
56 przykład, w porównaniu do najszybszego trybu zliba, Snappy jest rząd
57 wielkości szybszy dla większości danych, ale pliki wynikowe są większe
58 o 20 do 100%.
59
60 Biblioteka Snappy ma następujące cechy:
61 - jest szybka: potrafi przetwarzać 250 MB/s bez kodu w asemblerze
62 - jest stabilna: przez ostatnie kilka lat była używana do kompresji i
63   dekompresji petabajtów danych w środowisku produkcyjnym Google'a;
64   format strumienia Snappy jest stabilny i nie zmieni się między
65   wersjami
66 - jest trwała: dekompresor Snappy został tak zaprojektowany, aby nie
67   wykładać się na uszkodzonych lub błędnych danych wejściowych
68 - jest oprogramowaniem wolnodostępnym i z otwartymi źródłami, na
69   licencji Apache w wersji 2.0.
70
71 Snappy wcześniej (np. na różnych prezentacjach Google'a) był nazywany
72 "Zippy".
73
74 %package devel
75 Summary:        Header files for Snappy library
76 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki Snappy
77 Group:          Development/Libraries
78 Requires:       %{name} = %{version}-%{release}
79 Requires:       libstdc++-devel
80
81 %description devel
82 Header files for Snappy library.
83
84 %description devel -l pl.UTF-8
85 Pliki nagłówkowe biblioteki Snappy.
86
87 %package static
88 Summary:        Static Snappy library
89 Summary(pl.UTF-8):      Statyczna biblioteka Snappy
90 Group:          Development/Libraries
91 Requires:       %{name}-devel = %{version}-%{release}
92
93 %description static
94 Static Snappy library.
95
96 %description static -l pl.UTF-8
97 Statyczna biblioteka Snappy.
98
99 %prep
100 %setup -q
101 %patch0 -p1
102
103 %build
104 %if %{with static_libs}
105 install -d build-static
106 cd build-static
107 %cmake .. \
108         -DBUILD_SHARED_LIBS=OFF \
109         -DCMAKE_CXX_STANDARD=14 \
110         -DSNAPPY_BUILD_BENCHMARKS=OFF \
111         %{!?with_tests:-DSNAPPY_BUILD_TESTS=OFF}
112
113 %{__make}
114 cd ..
115 %endif
116
117 install -d build
118 cd build
119 %cmake .. \
120         -DCMAKE_CXX_STANDARD=14 \
121         -DSNAPPY_BUILD_BENCHMARKS=OFF \
122         %{!?with_tests:-DSNAPPY_BUILD_TESTS=OFF}
123
124 %{__make}
125
126 %{?with_tests:ctest}
127
128 %install
129 rm -rf $RPM_BUILD_ROOT
130
131 %if %{with static_libs}
132 # static first so that packaged cmake config files refer to shared library
133 %{__make} -C build-static install \
134         DESTDIR=$RPM_BUILD_ROOT
135 %endif
136
137 %{__make} -C build install \
138         DESTDIR=$RPM_BUILD_ROOT
139
140 # ugh, they removed autotools support together with .pc file :/
141 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
142 sed -e 's,@prefix@,%{_prefix},g;s,@libdir@,%{_libdir},g;s,@version@,%{version},g' \
143         %{SOURCE1} > $RPM_BUILD_ROOT%{_pkgconfigdir}/snappy.pc
144
145 %clean
146 rm -rf $RPM_BUILD_ROOT
147
148 %post   -p /sbin/ldconfig
149 %postun -p /sbin/ldconfig
150
151 %files
152 %defattr(644,root,root,755)
153 %doc AUTHORS COPYING NEWS README.md
154 %attr(755,root,root) %{_libdir}/libsnappy.so.*.*.*
155 %attr(755,root,root) %ghost %{_libdir}/libsnappy.so.1
156
157 %files devel
158 %defattr(644,root,root,755)
159 %attr(755,root,root) %{_libdir}/libsnappy.so
160 %{_includedir}/snappy*.h
161 %{_pkgconfigdir}/snappy.pc
162 %{_libdir}/cmake/Snappy
163
164 %if %{with static_libs}
165 %files static
166 %defattr(644,root,root,755)
167 %{_libdir}/libsnappy.a
168 %endif
This page took 0.061366 seconds and 3 git commands to generate.