]> git.pld-linux.org Git - packages/protobuf.git/blame - protobuf.spec
- updated to 3.5.0 (note: new sonames)
[packages/protobuf.git] / protobuf.spec
CommitLineData
f132b5a5 1# TODO:
079f482d 2# - add bindings for java (maven build)
57ac76ff
ER
3# - add bindings for javascript
4# - add bindings for csharp
d7b23517
ER
5#
6# Conditional build:
15d6b3e3
JB
7%bcond_without python2 # Python 2.x bindings
8%bcond_without python3 # Python 3.x bindings
9%bcond_without ruby # Ruby bindings
079f482d 10%bcond_without tests # perform "make check"
b475afd2 11
a2eaa483
JR
12%ifarch x32
13%undefine with_ruby
14%endif
15
f132b5a5
JR
16Summary: Protocol Buffers - Google's data interchange format
17Summary(pl.UTF-8): Protocol Buffers - format wymiany danych Google
18Name: protobuf
bef88e35 19Version: 3.5.0
50af910a 20Release: 1
f132b5a5
JR
21License: BSD
22Group: Libraries
8a85b52c 23#Source0Download: https://github.com/google/protobuf/releases
72bc381c 24Source0: https://github.com/google/protobuf/archive/v%{version}/%{name}-%{version}.tar.gz
bef88e35 25# Source0-md5: d95db321e1a9901fffc51ed8994afd36
8e6a7c84 26Source1: ftdetect-proto.vim
0759da77 27Patch0: system-gtest.patch
72bc381c
JB
28URL: https://github.com/google/protobuf/
29BuildRequires: autoconf >= 2.59
8a85b52c
JB
30BuildRequires: automake >= 1:1.9
31%{?with_tests:BuildRequires: gmock-devel}
99dd6ddb 32%{?with_tests:BuildRequires: gtest-devel}
e2ad8a47 33BuildRequires: libstdc++-devel
72bc381c 34BuildRequires: libtool
b475afd2 35BuildRequires: pkgconfig
15d6b3e3
JB
36%if %{with python2}
37BuildRequires: python-modules >= 1:2.6
71f28181 38BuildRequires: python-setuptools
15d6b3e3
JB
39%endif
40%if %{with python3}
41BuildRequires: python3-modules >= 1:3.3
42BuildRequires: python3-setuptools
43%endif
44%if %{with python2} || %{with python3}
d7b23517
ER
45BuildRequires: rpm-pythonprov
46%endif
15d6b3e3
JB
47BuildRequires: rpmbuild(macros) >= 1.714
48%if %{with ruby}
49BuildRequires: ruby-devel
50BuildRequires: ruby-rake
51BuildRequires: ruby-rake-compiler
52%endif
53BuildRequires: zlib-devel >= 1.2.0.4
f132b5a5
JR
54Requires: %{name}-libs = %{version}-%{release}
55BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56
8e6a7c84
ER
57%define _vimdatadir %{_datadir}/vim
58
8a85b52c
JB
59# triggers bogus "overflow in constant expression" errors with gcc 4.9 .. 5.4
60%define filterout -fwrapv
61
f132b5a5 62%description
b475afd2
ER
63Protocol Buffers are a way of encoding structured data in an efficient
64yet extensible format. Google uses Protocol Buffers for almost all of
65its internal RPC protocols and file formats.
66
67Protocol buffers are a flexible, efficient, automated mechanism for
380182ab 68serializing structured data - think XML, but smaller, faster, and
b475afd2
ER
69simpler. You define how you want your data to be structured once, then
70you can use special generated source code to easily write and read
71your structured data to and from a variety of data streams and using a
72variety of languages. You can even update your data structure without
73breaking deployed programs that are compiled against the "old" format.
74
75This package contains Protocol Buffers compiler for all programming
380182ab 76languages.
f132b5a5 77
c7c7fabc 78%description -l pl.UTF-8
380182ab
JB
79Bufory protokołowe (Protocol Buffers) to sposób kodowania danych
80strukturalnych w wydajny i rozszerzalny sposób. Google używa buforów
81protokołowych do prawie wszystkich wewnętrznych protokołów RPC i
82formatów plików.
83
c7c7fabc
JB
84Bufory protokołowe to elastyczny, wydajny i zautomatyzowany sposób
85serializacji danych strukturalnych - podobny do XML-a, ale mniejszy,
86szybszy i prostszy. Definiuje się raz, jaką strukturę mają mieć dane,
87a następnie używa specjalnie wygenerowanego kodu źródłowego do łatwego
88zapisu i odczytu danych strukturalnych do i z różnych strumieni
89danych, z poziomu różnych języków. Można nawet uaktualniać strukturę
90danych bez psucia programów skompilowanych w oparciu o "stary" format.
91
380182ab
JB
92Ten pakiet zawiera kompilator buforów protokołowych dla wszystkich
93języków programowania.
f132b5a5
JR
94
95%package libs
380182ab
JB
96Summary: Protocol Buffers library
97Summary(pl.UTF-8): Biblioteka buforów protokołowych (Protocol Buffers)
f132b5a5 98Group: Libraries
72bc381c 99Requires: zlib >= 1.2.0.4
f132b5a5
JR
100
101%description libs
380182ab 102Protocol Buffers library.
f132b5a5
JR
103
104%description libs -l pl.UTF-8
380182ab 105Biblioteka buforów protokołowych (Protocol Buffers).
f132b5a5 106
b475afd2 107%package lite
380182ab
JB
108Summary: Protocol Buffers LITE_RUNTIME library
109Summary(pl.UTF-8): Biblioteka LITE_RUNTIME buforów protokołowych (Protocol Buffers)
110Group: Libraries
b475afd2
ER
111
112%description lite
380182ab
JB
113Protocol Buffers library for programs built with optimize_for =
114LITE_RUNTIME.
b475afd2
ER
115
116The "optimize_for = LITE_RUNTIME" option causes the compiler to
117generate code which only depends libprotobuf-lite, which is much
118smaller than libprotobuf but lacks descriptors, reflection, and some
119other features.
120
380182ab
JB
121%description lite -l pl.UTF-8
122Biblioteka buforów protokołowych (Protocol Buffers) zbudowana dla
123programów z opcją optimize_for = LITE_RUNTIME.
124
125Opcja ta powoduje, że kompilator generuje kod, który wymaga tylko
126biblioteki libprotobuf-lite, która jest mniejsza niż libprotobuf, ale
127nie ma niektórych elementów, takich jak deskryptory czy refleksje.
128
f132b5a5 129%package devel
380182ab
JB
130Summary: Header files for Protocol Buffers libraries
131Summary(pl.UTF-8): Pliki nagłówkowe bibliotek buforów protokołowych (Protocol Buffers)
f132b5a5 132Group: Development/Libraries
b475afd2 133Requires: %{name} = %{version}-%{release}
f132b5a5 134Requires: %{name}-libs = %{version}-%{release}
55d381f3 135Requires: %{name}-lite = %{version}-%{release}
e2ad8a47 136Requires: libstdc++-devel
f132b5a5
JR
137
138%description devel
380182ab 139Header files for Protocol Buffers libraries.
f132b5a5
JR
140
141%description devel -l pl.UTF-8
380182ab 142Pliki nagłówkowe bibliotek buforów protokołowych (Protocol Buffers).
f132b5a5
JR
143
144%package static
380182ab
JB
145Summary: Static Protocol Buffers libraries
146Summary(pl.UTF-8): Statyczne biblioteki buforów protokołowych (Protocol Buffers)
f132b5a5
JR
147Group: Development/Libraries
148Requires: %{name}-devel = %{version}-%{release}
149
150%description static
380182ab 151Static Protocol Buffers libraries.
f132b5a5
JR
152
153%description static -l pl.UTF-8
380182ab 154Statyczne biblioteki buforów protokołowych (Protocol Buffers).
f132b5a5 155
d7b23517 156%package -n python-protobuf
15d6b3e3
JB
157Summary: Python 2 bindings for Protocol Buffers
158Summary(pl.UTF-8): Wiązania Pythona 2 do buforów protokołowych (Protocol Buffers)
380182ab 159Group: Development/Languages/Python
15d6b3e3 160Requires: python-modules >= 1:2.6
d7b23517 161# does not use C++ library at this time
d7b23517
ER
162
163%description -n python-protobuf
15d6b3e3 164Python 2 bindings for Protocol Buffers.
380182ab
JB
165
166%description -n python-protobuf -l pl.UTF-8
15d6b3e3
JB
167Wiązania Pythona 2 do buforów protokołowych (Protocol Buffers).
168
169%package -n python3-protobuf
170Summary: Python 3 bindings for Protocol Buffers
171Summary(pl.UTF-8): Wiązania Pythona 3 do buforów protokołowych (Protocol Buffers)
172Group: Development/Languages/Python
173Requires: python3-modules >= 1:3.3
174# does not use C++ library at this time
175
176%description -n python3-protobuf
177Python 3 bindings for Protocol Buffers.
178
179%description -n python3-protobuf -l pl.UTF-8
180Wiązania Pythona 3 do buforów protokołowych (Protocol Buffers).
181
182%package -n ruby-google-protobuf
183Summary: Ruby bindings for Google Protocol Buffers
184Summary(pl.UTF-8): Wiązania języka Ruby do biblioteki Google Protocol Buffers
185Group: Development/Languages
186Requires: ruby
187
188%description -n ruby-google-protobuf
189Ruby bindings for Google Protocol Buffers.
190
191%description -n ruby-google-protobuf -l pl.UTF-8
192Wiązania języka Ruby do biblioteki Google Protocol Buffers.
d7b23517 193
8e6a7c84 194%package -n vim-syntax-protobuf
380182ab
JB
195Summary: Vim syntax highlighting for Protocol Buffers descriptions
196Summary(pl.UTF-8): Podświetlanie składni Vima dla opisów buforów protokołowych (Protocol Buffers)
8e6a7c84
ER
197Group: Development/Libraries
198Requires: vim-rt >= 4:7.2.170
199
200%description -n vim-syntax-protobuf
380182ab
JB
201This package contains syntax highlighting for Protocol Buffers
202descriptions in Vim editor.
203
204%description -n vim-syntax-protobuf -l pl.UTF-8
205Ten pakiet zawiera pliki podświetlania składni edytora Vim dla
206opisów buforów protokołowych (Protocol Buffers).
8e6a7c84 207
f132b5a5
JR
208%prep
209%setup -q
8a85b52c
JB
210%patch0 -p1
211
212ln -s /usr/src/gmock/src/gmock*.cc src
f132b5a5
JR
213
214%build
72bc381c 215%{__libtoolize}
0759da77
ER
216%{__aclocal} -I m4
217%{__autoconf}
72bc381c 218%{__autoheader}
0759da77 219%{__automake}
18e73e19
LM
220# Additional variables defined according to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192821
221%configure \
36397081
AM
222 CFLAGS='%{rpmcflags} -DGOOGLE_PROTOBUF_NO_RTTI' \
223 CPPFLAGS='%{rpmcppflags} -DGOOGLE_PROTOBUF_NO_RTTI'
f132b5a5
JR
224%{__make}
225
d7b23517 226cd python
15d6b3e3 227%if %{with python2}
81c7e577 228%py_build
15d6b3e3
JB
229%endif
230%if %{with python3}
231%py3_build
232%endif
233cd ..
234
235%if %{with ruby}
236cd ruby
237rake
238#rake clobber_package gem
d7b23517
ER
239cd ..
240%endif
241
99dd6ddb
ER
242%if %{with tests}
243%{__make} check
244%endif
245
f132b5a5
JR
246%install
247rm -rf $RPM_BUILD_ROOT
248install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
249
250%{__make} install \
b475afd2
ER
251 STRIPBINARIES=no \
252 INSTALL="install -p" \
253 CPPROG="cp -p" \
f132b5a5
JR
254 DESTDIR=$RPM_BUILD_ROOT
255
8e6a7c84
ER
256install -d $RPM_BUILD_ROOT%{_vimdatadir}/{syntax,ftdetect}
257cp -p editors/proto.vim $RPM_BUILD_ROOT%{_vimdatadir}/syntax/proto.vim
258cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_vimdatadir}/ftdetect/proto.vim
259
d7b23517 260cd python
15d6b3e3 261%if %{with python2}
81c7e577 262%py_install
d7b23517 263%py_postclean
d7b23517 264%endif
15d6b3e3
JB
265%if %{with python3}
266%py3_install
267%endif
268cd ..
d7b23517 269
15d6b3e3
JB
270%if %{with ruby}
271install -d $RPM_BUILD_ROOT{%{ruby_vendorarchdir}/google,%{ruby_vendorlibdir}/google,%{ruby_specdir}}
272install ruby/lib/google/protobuf_c.so $RPM_BUILD_ROOT%{ruby_vendorarchdir}/google
273cp -pr ruby/lib/google/{protobuf,protobuf.rb} $RPM_BUILD_ROOT%{ruby_vendorlibdir}/google
274cp -p ruby/google-protobuf.gemspec $RPM_BUILD_ROOT%{ruby_specdir}/google-protobuf-%{version}.gemspec
275%endif
b475afd2 276cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
f132b5a5
JR
277
278%clean
279rm -rf $RPM_BUILD_ROOT
280
b475afd2
ER
281%post -p /sbin/ldconfig
282%postun -p /sbin/ldconfig
283
f132b5a5
JR
284%post libs -p /sbin/ldconfig
285%postun libs -p /sbin/ldconfig
286
b475afd2
ER
287%post lite -p /sbin/ldconfig
288%postun lite -p /sbin/ldconfig
289
f132b5a5
JR
290%files
291%defattr(644,root,root,755)
006c282c 292%doc CHANGES.txt CONTRIBUTORS.txt LICENSE README.md
f132b5a5 293%attr(755,root,root) %{_bindir}/protoc
b475afd2 294%attr(755,root,root) %{_libdir}/libprotoc.so.*.*.*
bef88e35 295%attr(755,root,root) %ghost %{_libdir}/libprotoc.so.15
f132b5a5
JR
296
297%files libs
298%defattr(644,root,root,755)
e5c615f2 299%attr(755,root,root) %{_libdir}/libprotobuf.so.*.*.*
bef88e35 300%attr(755,root,root) %ghost %{_libdir}/libprotobuf.so.15
b475afd2
ER
301
302%files lite
303%defattr(644,root,root,755)
304%attr(755,root,root) %{_libdir}/libprotobuf-lite.so.*.*.*
bef88e35 305%attr(755,root,root) %ghost %{_libdir}/libprotobuf-lite.so.15
f132b5a5
JR
306
307%files devel
308%defattr(644,root,root,755)
2d1bc323 309%attr(755,root,root) %{_libdir}/libprotobuf-lite.so
e5c615f2
JB
310%attr(755,root,root) %{_libdir}/libprotobuf.so
311%attr(755,root,root) %{_libdir}/libprotoc.so
2d1bc323 312%{_libdir}/libprotobuf-lite.la
e5c615f2
JB
313%{_libdir}/libprotobuf.la
314%{_libdir}/libprotoc.la
079f482d
JB
315# XXX: dir shared with libtcmalloc
316%dir %{_includedir}/google
317%{_includedir}/google/protobuf
2d1bc323 318%{_pkgconfigdir}/protobuf-lite.pc
319%{_pkgconfigdir}/protobuf.pc
079f482d 320%{_examplesdir}/%{name}-%{version}
f132b5a5
JR
321
322%files static
323%defattr(644,root,root,755)
2d1bc323 324%{_libdir}/libprotobuf-lite.a
e5c615f2
JB
325%{_libdir}/libprotobuf.a
326%{_libdir}/libprotoc.a
8e6a7c84 327
15d6b3e3 328%if %{with python2}
d7b23517
ER
329%files -n python-protobuf
330%defattr(644,root,root,755)
8a85b52c 331%doc python/README.md
d7b23517
ER
332%dir %{py_sitescriptdir}/google
333%{py_sitescriptdir}/google/protobuf
38208315
JR
334%{py_sitescriptdir}/protobuf-*-py*.egg-info
335%{py_sitescriptdir}/protobuf-*-py*-nspkg.pth
d7b23517
ER
336%endif
337
15d6b3e3
JB
338%if %{with python3}
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
38208315
JR
344%{py3_sitescriptdir}/protobuf-*-py*.egg-info
345%{py3_sitescriptdir}/protobuf-*-py*-nspkg.pth
15d6b3e3
JB
346%endif
347
348%if %{with ruby}
349%files -n ruby-google-protobuf
350%defattr(644,root,root,755)
351%doc ruby/README.md
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
358%endif
359
8e6a7c84
ER
360%files -n vim-syntax-protobuf
361%defattr(644,root,root,755)
362%{_datadir}/vim/ftdetect/proto.vim
363%{_datadir}/vim/syntax/proto.vim
This page took 0.225424 seconds and 4 git commands to generate.