2 # - add bindings for java
3 # - tests fail: 2 of 5 tests failed
7 %bcond_without python # Python bindings
8 %bcond_with tests # build with tests
10 Summary: Protocol Buffers - Google's data interchange format
11 Summary(pl.UTF-8): Protocol Buffers - format wymiany danych Google
17 Source0: http://protobuf.googlecode.com/files/%{name}-%{version}.tar.bz2
18 # Source0-md5: ed436802019c9e1f40cc750eaf78f318
19 Source1: ftdetect-proto.vim
20 Patch0: system-gtest.patch
21 URL: http://code.google.com/p/protobuf/
22 BuildRequires: autoconf
23 BuildRequires: automake
24 %{?with_tests:BuildRequires: gtest-devel}
25 BuildRequires: libstdc++-devel
26 BuildRequires: pkgconfig
27 BuildRequires: rpmbuild(macros) >= 1.219
28 BuildRequires: zlib-devel
30 BuildRequires: python-setuptools
31 BuildRequires: rpm-pythonprov
33 Requires: %{name}-libs = %{version}-%{release}
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 %define _vimdatadir %{_datadir}/vim
39 Protocol Buffers are a way of encoding structured data in an efficient
40 yet extensible format. Google uses Protocol Buffers for almost all of
41 its internal RPC protocols and file formats.
43 Protocol buffers are a flexible, efficient, automated mechanism for
44 serializing structured data – think XML, but smaller, faster, and
45 simpler. You define how you want your data to be structured once, then
46 you can use special generated source code to easily write and read
47 your structured data to and from a variety of data streams and using a
48 variety of languages. You can even update your data structure without
49 breaking deployed programs that are compiled against the "old" format.
51 This package contains Protocol Buffers compiler for all programming
54 %description -l pl.UTF-8
55 Bufory protokołowe to elastyczny, wydajny i zautomatyzowany sposób
56 serializacji danych strukturalnych - podobny do XML-a, ale mniejszy,
57 szybszy i prostszy. Definiuje się raz, jaką strukturę mają mieć dane,
58 a następnie używa specjalnie wygenerowanego kodu źródłowego do łatwego
59 zapisu i odczytu danych strukturalnych do i z różnych strumieni
60 danych, z poziomu różnych języków. Można nawet uaktualniać strukturę
61 danych bez psucia programów skompilowanych w oparciu o "stary" format.
63 Google używa buforów protokołowych (Protocol Buffers) do prawie
64 wszystkich wewnętrznych protokołów RPC i formatów plików.
67 Summary: protobuf libraries
68 Summary(pl.UTF-8): Biblioteki protobuf
74 %description libs -l pl.UTF-8
78 Summary: Protocol Buffers LITE_RUNTIME libraries
79 Group: Development/Libraries
82 Protocol Buffers built with optimize_for = LITE_RUNTIME.
84 The "optimize_for = LITE_RUNTIME" option causes the compiler to
85 generate code which only depends libprotobuf-lite, which is much
86 smaller than libprotobuf but lacks descriptors, reflection, and some
90 Summary: Protocol Buffers C++ headers and libraries
91 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek protobuf
92 Group: Development/Libraries
93 Requires: %{name} = %{version}-%{release}
94 Requires: %{name}-libs = %{version}-%{release}
95 Requires: libstdc++-devel
98 This package contains Protocol Buffers compiler for all languages and
99 C++ headers and libraries
101 %description devel -l pl.UTF-8
102 Pliki nagłówkowe bibliotek protobuf.
105 Summary: Static development files for protobuf
106 Summary(pl.UTF-8): Statyczne biblioteki protobuf
107 Group: Development/Libraries
108 Requires: %{name}-devel = %{version}-%{release}
111 Static libraries for Protocol Buffers
113 %description static -l pl.UTF-8
114 Statyczne biblioteki protobuf.
116 %package -n python-protobuf
117 Summary: Python bindings for Google Protocol Buffers
118 Group: Development/Languages
119 # does not use C++ library at this time
120 Conflicts: %{name} < %{version}
121 Conflicts: %{name} > %{version}
123 %description -n python-protobuf
124 This package contains Python libraries for Google Protocol Buffers
126 %package -n vim-syntax-protobuf
127 Summary: Vim syntax highlighting for Google Protocol Buffers descriptions
128 Group: Development/Libraries
129 Requires: vim-rt >= 4:7.2.170
131 %description -n vim-syntax-protobuf
132 This package contains syntax highlighting for Google Protocol Buffers
133 descriptions in Vim editor
149 %{__python} setup.py build
150 %{__sed} -i -e 1d build/lib/google/protobuf/descriptor_pb2.py
159 rm -rf $RPM_BUILD_ROOT
160 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
164 INSTALL="install -p" \
166 DESTDIR=$RPM_BUILD_ROOT
168 install -d $RPM_BUILD_ROOT%{_vimdatadir}/{syntax,ftdetect}
169 cp -p editors/proto.vim $RPM_BUILD_ROOT%{_vimdatadir}/syntax/proto.vim
170 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_vimdatadir}/ftdetect/proto.vim
174 %{__python} setup.py install \
175 --root=$RPM_BUILD_ROOT \
176 --single-version-externally-managed \
182 cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
185 rm -rf $RPM_BUILD_ROOT
187 %post -p /sbin/ldconfig
188 %postun -p /sbin/ldconfig
190 %post libs -p /sbin/ldconfig
191 %postun libs -p /sbin/ldconfig
193 %post lite -p /sbin/ldconfig
194 %postun lite -p /sbin/ldconfig
197 %defattr(644,root,root,755)
198 %doc CHANGES.txt CONTRIBUTORS.txt README.txt
199 %attr(755,root,root) %{_bindir}/protoc
200 %attr(755,root,root) %{_libdir}/libprotoc.so.*.*.*
201 %attr(755,root,root) %ghost %{_libdir}/libprotoc.so.7
204 %defattr(644,root,root,755)
205 %attr(755,root,root) %{_libdir}/libprotobuf.so.*.*.*
206 %attr(755,root,root) %ghost %{_libdir}/libprotobuf.so.7
209 %defattr(644,root,root,755)
210 %attr(755,root,root) %{_libdir}/libprotobuf-lite.so.*.*.*
211 %attr(755,root,root) %ghost %{_libdir}/libprotobuf-lite.so.7
214 %defattr(644,root,root,755)
215 %attr(755,root,root) %{_libdir}/libprotobuf-lite.so
216 %attr(755,root,root) %{_libdir}/libprotobuf.so
217 %attr(755,root,root) %{_libdir}/libprotoc.so
218 %{_libdir}/libprotobuf-lite.la
219 %{_libdir}/libprotobuf.la
220 %{_libdir}/libprotoc.la
221 %{_includedir}/google
222 %{_examplesdir}/%{name}-%{version}
223 %{_pkgconfigdir}/protobuf-lite.pc
224 %{_pkgconfigdir}/protobuf.pc
227 %defattr(644,root,root,755)
228 %{_libdir}/libprotobuf-lite.a
229 %{_libdir}/libprotobuf.a
230 %{_libdir}/libprotoc.a
233 %files -n python-protobuf
234 %defattr(644,root,root,755)
235 %doc python/README.txt
236 %dir %{py_sitescriptdir}/google
237 %{py_sitescriptdir}/google/protobuf
238 %{py_sitescriptdir}/protobuf-%{version}-py*.egg-info
239 %{py_sitescriptdir}/protobuf-%{version}-py*-nspkg.pth
242 %files -n vim-syntax-protobuf
243 %defattr(644,root,root,755)
244 %{_datadir}/vim/ftdetect/proto.vim
245 %{_datadir}/vim/syntax/proto.vim