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