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