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