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"
12 Summary: Protocol Buffers - Google's data interchange format
13 Summary(pl.UTF-8): Protocol Buffers - format wymiany danych Google
19 #Source0Download: https://github.com/google/protobuf/releases
20 Source0: https://github.com/google/protobuf/archive/v%{version}/%{name}-%{version}.tar.gz
21 # Source0-md5: 14a532a7538551d5def317bfca41dace
22 Source1: ftdetect-proto.vim
23 Patch0: system-gtest.patch
24 URL: https://github.com/google/protobuf/
25 BuildRequires: autoconf >= 2.59
26 BuildRequires: automake >= 1:1.9
27 %{?with_tests:BuildRequires: gmock-devel}
28 %{?with_tests:BuildRequires: gtest-devel}
29 BuildRequires: libstdc++-devel
30 BuildRequires: libtool
31 BuildRequires: pkgconfig
33 BuildRequires: python-modules >= 1:2.6
34 BuildRequires: python-setuptools
37 BuildRequires: python3-modules >= 1:3.3
38 BuildRequires: python3-setuptools
40 %if %{with python2} || %{with python3}
41 BuildRequires: rpm-pythonprov
43 BuildRequires: rpmbuild(macros) >= 1.714
45 BuildRequires: ruby-devel
46 BuildRequires: ruby-rake
47 BuildRequires: ruby-rake-compiler
49 BuildRequires: zlib-devel >= 1.2.0.4
50 Requires: %{name}-libs = %{version}-%{release}
51 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53 %define _vimdatadir %{_datadir}/vim
55 # triggers bogus "overflow in constant expression" errors with gcc 4.9 .. 5.4
56 %define filterout -fwrapv
59 Protocol Buffers are a way of encoding structured data in an efficient
60 yet extensible format. Google uses Protocol Buffers for almost all of
61 its internal RPC protocols and file formats.
63 Protocol buffers are a flexible, efficient, automated mechanism for
64 serializing structured data - think XML, but smaller, faster, and
65 simpler. You define how you want your data to be structured once, then
66 you can use special generated source code to easily write and read
67 your structured data to and from a variety of data streams and using a
68 variety of languages. You can even update your data structure without
69 breaking deployed programs that are compiled against the "old" format.
71 This package contains Protocol Buffers compiler for all programming
74 %description -l pl.UTF-8
75 Bufory protokołowe (Protocol Buffers) to sposób kodowania danych
76 strukturalnych w wydajny i rozszerzalny sposób. Google używa buforów
77 protokołowych do prawie wszystkich wewnętrznych protokołów RPC i
80 Bufory protokołowe to elastyczny, wydajny i zautomatyzowany sposób
81 serializacji danych strukturalnych - podobny do XML-a, ale mniejszy,
82 szybszy i prostszy. Definiuje się raz, jaką strukturę mają mieć dane,
83 a następnie używa specjalnie wygenerowanego kodu źródłowego do łatwego
84 zapisu i odczytu danych strukturalnych do i z różnych strumieni
85 danych, z poziomu różnych języków. Można nawet uaktualniać strukturę
86 danych bez psucia programów skompilowanych w oparciu o "stary" format.
88 Ten pakiet zawiera kompilator buforów protokołowych dla wszystkich
89 języków programowania.
92 Summary: Protocol Buffers library
93 Summary(pl.UTF-8): Biblioteka buforów protokołowych (Protocol Buffers)
95 Requires: zlib >= 1.2.0.4
98 Protocol Buffers library.
100 %description libs -l pl.UTF-8
101 Biblioteka buforów protokołowych (Protocol Buffers).
104 Summary: Protocol Buffers LITE_RUNTIME library
105 Summary(pl.UTF-8): Biblioteka LITE_RUNTIME buforów protokołowych (Protocol Buffers)
109 Protocol Buffers library for programs built with optimize_for =
112 The "optimize_for = LITE_RUNTIME" option causes the compiler to
113 generate code which only depends libprotobuf-lite, which is much
114 smaller than libprotobuf but lacks descriptors, reflection, and some
117 %description lite -l pl.UTF-8
118 Biblioteka buforów protokołowych (Protocol Buffers) zbudowana dla
119 programów z opcją optimize_for = LITE_RUNTIME.
121 Opcja ta powoduje, że kompilator generuje kod, który wymaga tylko
122 biblioteki libprotobuf-lite, która jest mniejsza niż libprotobuf, ale
123 nie ma niektórych elementów, takich jak deskryptory czy refleksje.
126 Summary: Header files for Protocol Buffers libraries
127 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek buforów protokołowych (Protocol Buffers)
128 Group: Development/Libraries
129 Requires: %{name} = %{version}-%{release}
130 Requires: %{name}-libs = %{version}-%{release}
131 Requires: %{name}-lite = %{version}-%{release}
132 Requires: libstdc++-devel
135 Header files for Protocol Buffers libraries.
137 %description devel -l pl.UTF-8
138 Pliki nagłówkowe bibliotek buforów protokołowych (Protocol Buffers).
141 Summary: Static Protocol Buffers libraries
142 Summary(pl.UTF-8): Statyczne biblioteki buforów protokołowych (Protocol Buffers)
143 Group: Development/Libraries
144 Requires: %{name}-devel = %{version}-%{release}
147 Static Protocol Buffers libraries.
149 %description static -l pl.UTF-8
150 Statyczne biblioteki buforów protokołowych (Protocol Buffers).
152 %package -n python-protobuf
153 Summary: Python 2 bindings for Protocol Buffers
154 Summary(pl.UTF-8): Wiązania Pythona 2 do buforów protokołowych (Protocol Buffers)
155 Group: Development/Languages/Python
156 Requires: python-modules >= 1:2.6
157 # does not use C++ library at this time
159 %description -n python-protobuf
160 Python 2 bindings for Protocol Buffers.
162 %description -n python-protobuf -l pl.UTF-8
163 Wiązania Pythona 2 do buforów protokołowych (Protocol Buffers).
165 %package -n python3-protobuf
166 Summary: Python 3 bindings for Protocol Buffers
167 Summary(pl.UTF-8): Wiązania Pythona 3 do buforów protokołowych (Protocol Buffers)
168 Group: Development/Languages/Python
169 Requires: python3-modules >= 1:3.3
170 # does not use C++ library at this time
172 %description -n python3-protobuf
173 Python 3 bindings for Protocol Buffers.
175 %description -n python3-protobuf -l pl.UTF-8
176 Wiązania Pythona 3 do buforów protokołowych (Protocol Buffers).
178 %package -n ruby-google-protobuf
179 Summary: Ruby bindings for Google Protocol Buffers
180 Summary(pl.UTF-8): Wiązania języka Ruby do biblioteki Google Protocol Buffers
181 Group: Development/Languages
184 %description -n ruby-google-protobuf
185 Ruby bindings for Google Protocol Buffers.
187 %description -n ruby-google-protobuf -l pl.UTF-8
188 Wiązania języka Ruby do biblioteki Google Protocol Buffers.
190 %package -n vim-syntax-protobuf
191 Summary: Vim syntax highlighting for Protocol Buffers descriptions
192 Summary(pl.UTF-8): Podświetlanie składni Vima dla opisów buforów protokołowych (Protocol Buffers)
193 Group: Development/Libraries
194 Requires: vim-rt >= 4:7.2.170
196 %description -n vim-syntax-protobuf
197 This package contains syntax highlighting for Protocol Buffers
198 descriptions in Vim editor.
200 %description -n vim-syntax-protobuf -l pl.UTF-8
201 Ten pakiet zawiera pliki podświetlania składni edytora Vim dla
202 opisów buforów protokołowych (Protocol Buffers).
208 ln -s /usr/src/gmock/src/gmock*.cc src
216 # Additional variables defined according to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192821
218 CFLAGS='%{rpmcflags} -DGOOGLE_PROTOBUF_NO_RTTI' \
219 CPPFLAGS='%{rpmcppflags} -DGOOGLE_PROTOBUF_NO_RTTI'
234 #rake clobber_package gem
243 rm -rf $RPM_BUILD_ROOT
244 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
248 INSTALL="install -p" \
250 DESTDIR=$RPM_BUILD_ROOT
252 install -d $RPM_BUILD_ROOT%{_vimdatadir}/{syntax,ftdetect}
253 cp -p editors/proto.vim $RPM_BUILD_ROOT%{_vimdatadir}/syntax/proto.vim
254 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_vimdatadir}/ftdetect/proto.vim
267 install -d $RPM_BUILD_ROOT{%{ruby_vendorarchdir}/google,%{ruby_vendorlibdir}/google,%{ruby_specdir}}
268 install ruby/lib/google/protobuf_c.so $RPM_BUILD_ROOT%{ruby_vendorarchdir}/google
269 cp -pr ruby/lib/google/{protobuf,protobuf.rb} $RPM_BUILD_ROOT%{ruby_vendorlibdir}/google
270 cp -p ruby/google-protobuf.gemspec $RPM_BUILD_ROOT%{ruby_specdir}/google-protobuf-%{version}.gemspec
272 cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
275 rm -rf $RPM_BUILD_ROOT
277 %post -p /sbin/ldconfig
278 %postun -p /sbin/ldconfig
280 %post libs -p /sbin/ldconfig
281 %postun libs -p /sbin/ldconfig
283 %post lite -p /sbin/ldconfig
284 %postun lite -p /sbin/ldconfig
287 %defattr(644,root,root,755)
288 %doc CHANGES.txt CONTRIBUTORS.txt LICENSE README.md
289 %attr(755,root,root) %{_bindir}/protoc
290 %attr(755,root,root) %{_libdir}/libprotoc.so.*.*.*
291 %attr(755,root,root) %ghost %{_libdir}/libprotoc.so.11
294 %defattr(644,root,root,755)
295 %attr(755,root,root) %{_libdir}/libprotobuf.so.*.*.*
296 %attr(755,root,root) %ghost %{_libdir}/libprotobuf.so.11
299 %defattr(644,root,root,755)
300 %attr(755,root,root) %{_libdir}/libprotobuf-lite.so.*.*.*
301 %attr(755,root,root) %ghost %{_libdir}/libprotobuf-lite.so.11
304 %defattr(644,root,root,755)
305 %attr(755,root,root) %{_libdir}/libprotobuf-lite.so
306 %attr(755,root,root) %{_libdir}/libprotobuf.so
307 %attr(755,root,root) %{_libdir}/libprotoc.so
308 %{_libdir}/libprotobuf-lite.la
309 %{_libdir}/libprotobuf.la
310 %{_libdir}/libprotoc.la
311 # XXX: dir shared with libtcmalloc
312 %dir %{_includedir}/google
313 %{_includedir}/google/protobuf
314 %{_pkgconfigdir}/protobuf-lite.pc
315 %{_pkgconfigdir}/protobuf.pc
316 %{_examplesdir}/%{name}-%{version}
319 %defattr(644,root,root,755)
320 %{_libdir}/libprotobuf-lite.a
321 %{_libdir}/libprotobuf.a
322 %{_libdir}/libprotoc.a
325 %files -n python-protobuf
326 %defattr(644,root,root,755)
327 %doc python/README.md
328 %dir %{py_sitescriptdir}/google
329 %{py_sitescriptdir}/google/protobuf
330 %{py_sitescriptdir}/protobuf-%{version}-py*.egg-info
331 %{py_sitescriptdir}/protobuf-%{version}-py*-nspkg.pth
335 %files -n python3-protobuf
336 %defattr(644,root,root,755)
337 %doc python/README.md
338 %dir %{py3_sitescriptdir}/google
339 %{py3_sitescriptdir}/google/protobuf
340 %{py3_sitescriptdir}/protobuf-%{version}-py*.egg-info
341 %{py3_sitescriptdir}/protobuf-%{version}-py*-nspkg.pth
345 %files -n ruby-google-protobuf
346 %defattr(644,root,root,755)
348 %dir %{ruby_vendorarchdir}/google
349 %attr(755,root,root) %{ruby_vendorarchdir}/google/protobuf_c.so
350 %dir %{ruby_vendorlibdir}/google
351 %{ruby_vendorlibdir}/google/protobuf.rb
352 %{ruby_vendorlibdir}/google/protobuf
353 %{ruby_specdir}/google-protobuf-%{version}.gemspec
356 %files -n vim-syntax-protobuf
357 %defattr(644,root,root,755)
358 %{_datadir}/vim/ftdetect/proto.vim
359 %{_datadir}/vim/syntax/proto.vim