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