2 # - add bindings for java (maven build)
3 # - add bindings for javascript
4 # - add bindings for csharp
7 %bcond_without python2 # Python 2.x bindings
8 %bcond_without python3 # Python 3.x bindings
9 %bcond_without ruby # Ruby bindings
10 %bcond_without tests # perform "make check"
16 Summary: Protocol Buffers - Google's data interchange format
17 Summary(pl.UTF-8): Protocol Buffers - format wymiany danych Google
23 #Source0Download: https://github.com/google/protobuf/releases
24 Source0: https://github.com/google/protobuf/archive/v%{version}/%{name}-%{version}.tar.gz
25 # Source0-md5: 10644296984c7cbdd1e8436e88b069d2
26 Source1: ftdetect-proto.vim
27 Patch0: system-gtest.patch
28 URL: https://github.com/google/protobuf/
29 BuildRequires: autoconf >= 2.59
30 BuildRequires: automake >= 1:1.9
31 %{?with_tests:BuildRequires: gmock-devel}
32 %{?with_tests:BuildRequires: gtest-devel}
33 BuildRequires: libstdc++-devel
34 BuildRequires: libtool
35 BuildRequires: pkgconfig
37 BuildRequires: python-modules >= 1:2.6
38 BuildRequires: python-setuptools
41 BuildRequires: python3-modules >= 1:3.3
42 BuildRequires: python3-setuptools
44 %if %{with python2} || %{with python3}
45 BuildRequires: rpm-pythonprov
47 BuildRequires: rpmbuild(macros) >= 1.714
49 BuildRequires: ruby-devel
50 BuildRequires: ruby-rake
51 BuildRequires: ruby-rake-compiler
53 BuildRequires: zlib-devel >= 1.2.0.4
54 Requires: %{name}-libs = %{version}-%{release}
55 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57 %define _vimdatadir %{_datadir}/vim
59 # triggers bogus "overflow in constant expression" errors with gcc 4.9 .. 5.4
60 %define filterout -fwrapv
63 Protocol Buffers are a way of encoding structured data in an efficient
64 yet extensible format. Google uses Protocol Buffers for almost all of
65 its internal RPC protocols and file formats.
67 Protocol buffers are a flexible, efficient, automated mechanism for
68 serializing structured data - think XML, but smaller, faster, and
69 simpler. You define how you want your data to be structured once, then
70 you can use special generated source code to easily write and read
71 your structured data to and from a variety of data streams and using a
72 variety of languages. You can even update your data structure without
73 breaking deployed programs that are compiled against the "old" format.
75 This package contains Protocol Buffers compiler for all programming
78 %description -l pl.UTF-8
79 Bufory protokołowe (Protocol Buffers) to sposób kodowania danych
80 strukturalnych w wydajny i rozszerzalny sposób. Google używa buforów
81 protokołowych do prawie wszystkich wewnętrznych protokołów RPC i
84 Bufory protokołowe to elastyczny, wydajny i zautomatyzowany sposób
85 serializacji danych strukturalnych - podobny do XML-a, ale mniejszy,
86 szybszy i prostszy. Definiuje się raz, jaką strukturę mają mieć dane,
87 a następnie używa specjalnie wygenerowanego kodu źródłowego do łatwego
88 zapisu i odczytu danych strukturalnych do i z różnych strumieni
89 danych, z poziomu różnych języków. Można nawet uaktualniać strukturę
90 danych bez psucia programów skompilowanych w oparciu o "stary" format.
92 Ten pakiet zawiera kompilator buforów protokołowych dla wszystkich
93 języków programowania.
96 Summary: Protocol Buffers library
97 Summary(pl.UTF-8): Biblioteka buforów protokołowych (Protocol Buffers)
99 Requires: zlib >= 1.2.0.4
102 Protocol Buffers library.
104 %description libs -l pl.UTF-8
105 Biblioteka buforów protokołowych (Protocol Buffers).
108 Summary: Protocol Buffers LITE_RUNTIME library
109 Summary(pl.UTF-8): Biblioteka LITE_RUNTIME buforów protokołowych (Protocol Buffers)
113 Protocol Buffers library for programs built with optimize_for =
116 The "optimize_for = LITE_RUNTIME" option causes the compiler to
117 generate code which only depends libprotobuf-lite, which is much
118 smaller than libprotobuf but lacks descriptors, reflection, and some
121 %description lite -l pl.UTF-8
122 Biblioteka buforów protokołowych (Protocol Buffers) zbudowana dla
123 programów z opcją optimize_for = LITE_RUNTIME.
125 Opcja ta powoduje, że kompilator generuje kod, który wymaga tylko
126 biblioteki libprotobuf-lite, która jest mniejsza niż libprotobuf, ale
127 nie ma niektórych elementów, takich jak deskryptory czy refleksje.
130 Summary: Header files for Protocol Buffers libraries
131 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek buforów protokołowych (Protocol Buffers)
132 Group: Development/Libraries
133 Requires: %{name} = %{version}-%{release}
134 Requires: %{name}-libs = %{version}-%{release}
135 Requires: %{name}-lite = %{version}-%{release}
136 Requires: libstdc++-devel
139 Header files for Protocol Buffers libraries.
141 %description devel -l pl.UTF-8
142 Pliki nagłówkowe bibliotek buforów protokołowych (Protocol Buffers).
145 Summary: Static Protocol Buffers libraries
146 Summary(pl.UTF-8): Statyczne biblioteki buforów protokołowych (Protocol Buffers)
147 Group: Development/Libraries
148 Requires: %{name}-devel = %{version}-%{release}
151 Static Protocol Buffers libraries.
153 %description static -l pl.UTF-8
154 Statyczne biblioteki buforów protokołowych (Protocol Buffers).
156 %package -n python-protobuf
157 Summary: Python 2 bindings for Protocol Buffers
158 Summary(pl.UTF-8): Wiązania Pythona 2 do buforów protokołowych (Protocol Buffers)
159 Group: Development/Languages/Python
160 Requires: python-modules >= 1:2.6
161 # does not use C++ library at this time
163 %description -n python-protobuf
164 Python 2 bindings for Protocol Buffers.
166 %description -n python-protobuf -l pl.UTF-8
167 Wiązania Pythona 2 do buforów protokołowych (Protocol Buffers).
169 %package -n python3-protobuf
170 Summary: Python 3 bindings for Protocol Buffers
171 Summary(pl.UTF-8): Wiązania Pythona 3 do buforów protokołowych (Protocol Buffers)
172 Group: Development/Languages/Python
173 Requires: python3-modules >= 1:3.3
174 # does not use C++ library at this time
176 %description -n python3-protobuf
177 Python 3 bindings for Protocol Buffers.
179 %description -n python3-protobuf -l pl.UTF-8
180 Wiązania Pythona 3 do buforów protokołowych (Protocol Buffers).
182 %package -n ruby-google-protobuf
183 Summary: Ruby bindings for Google Protocol Buffers
184 Summary(pl.UTF-8): Wiązania języka Ruby do biblioteki Google Protocol Buffers
185 Group: Development/Languages
188 %description -n ruby-google-protobuf
189 Ruby bindings for Google Protocol Buffers.
191 %description -n ruby-google-protobuf -l pl.UTF-8
192 Wiązania języka Ruby do biblioteki Google Protocol Buffers.
194 %package -n vim-syntax-protobuf
195 Summary: Vim syntax highlighting for Protocol Buffers descriptions
196 Summary(pl.UTF-8): Podświetlanie składni Vima dla opisów buforów protokołowych (Protocol Buffers)
197 Group: Development/Libraries
198 Requires: vim-rt >= 4:7.2.170
200 %description -n vim-syntax-protobuf
201 This package contains syntax highlighting for Protocol Buffers
202 descriptions in Vim editor.
204 %description -n vim-syntax-protobuf -l pl.UTF-8
205 Ten pakiet zawiera pliki podświetlania składni edytora Vim dla
206 opisów buforów protokołowych (Protocol Buffers).
212 ln -s /usr/src/gmock/src/gmock*.cc src
220 # Additional variables defined according to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192821
222 CFLAGS='%{rpmcflags} -DGOOGLE_PROTOBUF_NO_RTTI' \
223 CPPFLAGS='%{rpmcppflags} -DGOOGLE_PROTOBUF_NO_RTTI'
238 #rake clobber_package gem
247 rm -rf $RPM_BUILD_ROOT
248 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
252 INSTALL="install -p" \
254 DESTDIR=$RPM_BUILD_ROOT
256 install -d $RPM_BUILD_ROOT%{_vimdatadir}/{syntax,ftdetect}
257 cp -p editors/proto.vim $RPM_BUILD_ROOT%{_vimdatadir}/syntax/proto.vim
258 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_vimdatadir}/ftdetect/proto.vim
271 install -d $RPM_BUILD_ROOT{%{ruby_vendorarchdir}/google,%{ruby_vendorlibdir}/google,%{ruby_specdir}}
272 install ruby/lib/google/protobuf_c.so $RPM_BUILD_ROOT%{ruby_vendorarchdir}/google
273 cp -pr ruby/lib/google/{protobuf,protobuf.rb} $RPM_BUILD_ROOT%{ruby_vendorlibdir}/google
274 cp -p ruby/google-protobuf.gemspec $RPM_BUILD_ROOT%{ruby_specdir}/google-protobuf-%{version}.gemspec
276 cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
279 rm -rf $RPM_BUILD_ROOT
281 %post -p /sbin/ldconfig
282 %postun -p /sbin/ldconfig
284 %post libs -p /sbin/ldconfig
285 %postun libs -p /sbin/ldconfig
287 %post lite -p /sbin/ldconfig
288 %postun lite -p /sbin/ldconfig
291 %defattr(644,root,root,755)
292 %doc CHANGES.txt CONTRIBUTORS.txt LICENSE README.md
293 %attr(755,root,root) %{_bindir}/protoc
294 %attr(755,root,root) %{_libdir}/libprotoc.so.*.*.*
295 %attr(755,root,root) %ghost %{_libdir}/libprotoc.so.13
298 %defattr(644,root,root,755)
299 %attr(755,root,root) %{_libdir}/libprotobuf.so.*.*.*
300 %attr(755,root,root) %ghost %{_libdir}/libprotobuf.so.13
303 %defattr(644,root,root,755)
304 %attr(755,root,root) %{_libdir}/libprotobuf-lite.so.*.*.*
305 %attr(755,root,root) %ghost %{_libdir}/libprotobuf-lite.so.13
308 %defattr(644,root,root,755)
309 %attr(755,root,root) %{_libdir}/libprotobuf-lite.so
310 %attr(755,root,root) %{_libdir}/libprotobuf.so
311 %attr(755,root,root) %{_libdir}/libprotoc.so
312 %{_libdir}/libprotobuf-lite.la
313 %{_libdir}/libprotobuf.la
314 %{_libdir}/libprotoc.la
315 # XXX: dir shared with libtcmalloc
316 %dir %{_includedir}/google
317 %{_includedir}/google/protobuf
318 %{_pkgconfigdir}/protobuf-lite.pc
319 %{_pkgconfigdir}/protobuf.pc
320 %{_examplesdir}/%{name}-%{version}
323 %defattr(644,root,root,755)
324 %{_libdir}/libprotobuf-lite.a
325 %{_libdir}/libprotobuf.a
326 %{_libdir}/libprotoc.a
329 %files -n python-protobuf
330 %defattr(644,root,root,755)
331 %doc python/README.md
332 %dir %{py_sitescriptdir}/google
333 %{py_sitescriptdir}/google/protobuf
334 %{py_sitescriptdir}/protobuf-*-py*.egg-info
335 %{py_sitescriptdir}/protobuf-*-py*-nspkg.pth
339 %files -n python3-protobuf
340 %defattr(644,root,root,755)
341 %doc python/README.md
342 %dir %{py3_sitescriptdir}/google
343 %{py3_sitescriptdir}/google/protobuf
344 %{py3_sitescriptdir}/protobuf-*-py*.egg-info
345 %{py3_sitescriptdir}/protobuf-*-py*-nspkg.pth
349 %files -n ruby-google-protobuf
350 %defattr(644,root,root,755)
352 %dir %{ruby_vendorarchdir}/google
353 %attr(755,root,root) %{ruby_vendorarchdir}/google/protobuf_c.so
354 %dir %{ruby_vendorlibdir}/google
355 %{ruby_vendorlibdir}/google/protobuf.rb
356 %{ruby_vendorlibdir}/google/protobuf
357 %{ruby_specdir}/google-protobuf-%{version}.gemspec
360 %files -n vim-syntax-protobuf
361 %defattr(644,root,root,755)
362 %{_datadir}/vim/ftdetect/proto.vim
363 %{_datadir}/vim/syntax/proto.vim