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