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