1
# don't build -python subpackage
2
%define with_python %{?_without_python: 0} %{?!_without_python: 1}
3
# don't build -java subpackages
4
#%define with_java %{?_without_java: 0} %{?!_without_java: 1}
6
# don't require gtest for building
7
%define without_gtest 1
10
%define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
13
Summary: Protocol Buffers - Google's data interchange format
18
Group: Development/Libraries
19
Source: http://protobuf.googlecode.com/files/%{name}-%{version}.tar.bz2
20
Source1: ftdetect-proto.vim
21
Patch1: protobuf-%{version}-fedora-gtest.patch
22
Patch2: protobuf-java-notests.patch
23
Patch3: protobuf-2.2.0-libtool.patch
24
URL: http://code.google.com/p/protobuf/
25
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
26
BuildRequires: libtool pkgconfig
27
BuildRequires: gcc-c++
29
BuildRequires: gtest-devel
34
Protocol Buffers are a way of encoding structured data in an efficient
35
yet extensible format. Google uses Protocol Buffers for almost all of
36
its internal RPC protocols and file formats.
38
Protocol buffers are a flexible, efficient, automated mechanism for
39
serializing structured data – think XML, but smaller, faster, and
40
simpler. You define how you want your data to be structured once, then
41
you can use special generated source code to easily write and read
42
your structured data to and from a variety of data streams and using a
43
variety of languages. You can even update your data structure without
44
breaking deployed programs that are compiled against the "old" format.
47
Summary: Protocol Buffers compiler
48
Group: Development/Libraries
49
Requires: %{name} = %{version}-%{release}
52
This package contains Protocol Buffers compiler for all programming
56
Summary: Protocol Buffers C++ headers and libraries
57
Group: Development/Libraries
58
Requires: %{name} = %{version}-%{release}
59
Requires: %{name}-compiler = %{version}-%{release}
63
This package contains Protocol Buffers compiler for all languages and
64
C++ headers and libraries
67
Summary: Static development files for %{name}
68
Group: Development/Libraries
69
Requires: %{name} = %{version}-%{release}
72
Static libraries for Protocol Buffers
75
Summary: Protocol Buffers LITE_RUNTIME libraries
76
Group: Development/Libraries
79
Protocol Buffers built with optimize_for = LITE_RUNTIME.
81
The "optimize_for = LITE_RUNTIME" option causes the compiler to generate code
82
which only depends libprotobuf-lite, which is much smaller than libprotobuf but
83
lacks descriptors, reflection, and some other features.
86
Summary: Protocol Buffers LITE_RUNTIME development libraries
87
Group: Development/Libraries
88
Requires: %{name}-devel = %{version}-%{release}
89
Requires: %{name}-lite = %{version}-%{release}
91
%description lite-devel
92
This package contains development libraries built with
93
optimize_for = LITE_RUNTIME.
95
The "optimize_for = LITE_RUNTIME" option causes the compiler to generate code
96
which only depends libprotobuf-lite, which is much smaller than libprotobuf but
97
lacks descriptors, reflection, and some other features.
100
Summary: Static development files for %{name}-lite
101
Group: Development/Libraries
102
Requires: %{name}-devel = %{version}-%{release}
104
%description lite-static
105
This package contains static development libraries built with
106
optimize_for = LITE_RUNTIME.
108
The "optimize_for = LITE_RUNTIME" option causes the compiler to generate code
109
which only depends libprotobuf-lite, which is much smaller than libprotobuf but
110
lacks descriptors, reflection, and some other features.
114
Summary: Python bindings for Google Protocol Buffers
115
Group: Development/Languages
116
BuildRequires: python-setuptools
117
BuildRequires: python-devel
119
Conflicts: %{name}-compiler > %{version}
120
Conflicts: %{name}-compiler < %{version}
123
This package contains Python libraries for Google Protocol Buffers
127
Summary: Vim syntax highlighting for Google Protocol Buffers descriptions
128
Group: Development/Libraries
129
Requires: vim-enhanced
132
This package contains syntax highlighting for Google Protocol Buffers
133
descriptions in Vim editor
137
Summary: Java Protocol Buffers runtime library
138
Group: Development/Languages
139
BuildRequires: java-devel >= 1.6
140
BuildRequires: jpackage-utils
141
BuildRequires: maven2
142
BuildRequires: maven2-plugin-compiler
143
BuildRequires: maven2-plugin-install
144
BuildRequires: maven2-plugin-jar
145
BuildRequires: maven2-plugin-javadoc
146
BuildRequires: maven2-plugin-release
147
BuildRequires: maven2-plugin-resources
148
BuildRequires: maven2-plugin-surefire
149
BuildRequires: maven2-plugin-antrun
151
Requires: jpackage-utils
152
Requires(post): jpackage-utils
153
Requires(postun): jpackage-utils
154
Conflicts: %{name}-compiler > %{version}
155
Conflicts: %{name}-compiler < %{version}
158
This package contains Java Protocol Buffers runtime library.
161
Summary: Javadocs for %{name}-java
163
Requires: jpackage-utils
164
Requires: %{name}-java = %{version}-%{release}
167
This package contains the API documentation for %{name}-java.
173
%if !%{without_gtest}
183
%patch3 -p1 -b .libtool
186
iconv -f iso8859-1 -t utf-8 CONTRIBUTORS.txt > CONTRIBUTORS.txt.utf8
187
mv CONTRIBUTORS.txt.utf8 CONTRIBUTORS.txt
188
export PTHREAD_LIBS="-lpthread"
196
python ./setup.py build
197
sed -i -e 1d build/lib/google/protobuf/descriptor_pb2.py
203
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
204
mkdir -p $MAVEN_REPO_LOCAL
205
mvn-jpp -Dmaven.repo.local=$MAVEN_REPO_LOCAL install javadoc:javadoc
210
make %{?_smp_mflags} check
214
make %{?_smp_mflags} install DESTDIR=%{buildroot} STRIPBINARIES=no INSTALL="%{__install} -p" CPPROG="cp -p"
215
find %{buildroot} -type f -name "*.la" -exec rm -f {} \;
219
python ./setup.py install --root=%{buildroot} --single-version-externally-managed --record=INSTALLED_FILES --optimize=1
222
install -p -m 644 -D %{SOURCE1} %{buildroot}%{_datadir}/vim/vimfiles/ftdetect/proto.vim
223
install -p -m 644 -D editors/proto.vim %{buildroot}%{_datadir}/vim/vimfiles/syntax/proto.vim
227
install -d -m 755 %{buildroot}%{_javadir}
228
install -pm 644 target/%{name}-java-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
230
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
231
cp -rp target/site/apidocs %{buildroot}%{_javadocdir}/%{name}
233
install -d -m 755 %{buildroot}%{_datadir}/maven2/poms
234
install -pm 644 pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP-%{name}.pom
235
%add_to_maven_depmap org.apache.maven %{name} %{version} JPP %{name}
239
%post -p /sbin/ldconfig
240
%postun -p /sbin/ldconfig
242
%post lite -p /sbin/ldconfig
243
%postun lite -p /sbin/ldconfig
245
%post compiler -p /sbin/ldconfig
246
%postun compiler -p /sbin/ldconfig
260
%defattr(-, root, root, -)
261
%{_libdir}/libprotobuf.so.*
262
%doc CHANGES.txt CONTRIBUTORS.txt COPYING.txt README.txt
265
%defattr(-, root, root, -)
267
%{_libdir}/libprotoc.so.*
268
%doc COPYING.txt README.txt
271
%defattr(-, root, root, -)
272
%dir %{_includedir}/google
273
%{_includedir}/google/protobuf/
274
%{_libdir}/libprotobuf.so
275
%{_libdir}/libprotoc.so
276
%{_libdir}/pkgconfig/protobuf.pc
277
%doc examples/add_person.cc examples/addressbook.proto examples/list_people.cc examples/Makefile examples/README.txt
280
%defattr(-, root, root, -)
281
%{_libdir}/libprotobuf.a
282
%{_libdir}/libprotoc.a
285
%defattr(-, root, root, -)
286
%{_libdir}/libprotobuf-lite.so.*
289
%defattr(-, root, root, -)
290
%{_libdir}/libprotobuf-lite.so
291
%{_libdir}/pkgconfig/protobuf-lite.pc
294
%defattr(-, root, root, -)
295
%{_libdir}/libprotobuf-lite.a
299
%defattr(-, root, root, -)
300
%dir %{python_sitelib}/google
301
%{python_sitelib}/google/protobuf/
302
%{python_sitelib}/protobuf-%{version}-py*.egg-info/
303
%{python_sitelib}/protobuf-%{version}-py*-nspkg.pth
304
%doc python/README.txt
305
%doc examples/add_person.py examples/list_people.py examples/addressbook.proto
309
%defattr(-, root, root, -)
310
%{_datadir}/vim/vimfiles/ftdetect/proto.vim
311
%{_datadir}/vim/vimfiles/syntax/proto.vim
315
%defattr(-, root, root, -)
316
%{_datadir}/maven2/poms/JPP-protobuf.pom
317
%{_mavendepmapfragdir}/protobuf
319
%doc examples/AddPerson.java examples/ListPeople.java
322
%defattr(-, root, root, -)
323
%{_javadocdir}/%{name}
327
* Wed Mar 10 2010 BJ Dierkes <wdierkes@rackspace.com> - 2.2.0-3
328
- Add conditional for el5 python-setuptools (not -devel)
329
- BuildRequires: gcc-c++
330
- Added Patch3: protobuf-2.2.0-libtool.patch
331
- Removed BuildRequires: autoconf, automake (not used)
332
- No longer 'autogen.sh' (libtool issues)
334
* Wed Sep 30 2009 Lev Shamardin <shamardin@gmail.com> - 2.2.0-2
335
- added export PTHREAD_LIBS="-lpthread"
337
* Fri Sep 18 2009 Lev Shamardin <shamardin@gmail.com> - 2.2.0-1
338
- Upgraded to upstream protobuf-2.2.0
341
* Sun Mar 01 2009 Caolán McNamra <caolanm@redhat.com> - 2.0.2-8
342
- add stdio.h for sprintf, perror, etc.
344
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-7
345
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
347
* Tue Dec 23 2008 Lev Shamardin <shamardin@gmail.com> - 2.0.2-6
348
- Small fixes for python 2.6 eggs.
349
- Temporarily disabled java subpackage due to build problems, will be fixed and
350
turned back on in future.
352
* Thu Nov 27 2008 Lev Shamardin <shamardin@gmail.com> - 2.0.2-5
353
- No problems with ppc & ppc64 arch in rawhide, had to do a release bump.
355
* Sat Nov 22 2008 Lev Shamardin <shamardin@gmail.com> - 2.0.2-4
356
- Added patch from subversion r70 to workaround gcc 4.3.0 bug (see
357
http://code.google.com/p/protobuf/issues/detail?id=45 for more
360
* Tue Nov 11 2008 Lev Shamardin <shamardin@gmail.com> - 2.0.2-3
361
- Added conflicts to java and python subpackages to prevent using with
362
wrong compiler versions.
364
- Fixed BuildRequires for -python subpackage.
365
- Fixed Requires and Group for -javadoc subpackage.
366
- Fixed Requires for -devel subpackage.
367
- Fixed issue with wrong shebang in descriptor_pb2.py.
368
- Specify build options via --with/--without.
369
- Use Fedora-packaged gtest library instead of a bundled one by
372
* Fri Oct 31 2008 Lev Shamardin <shamardin@gmail.com> - 2.0.2-2
373
- Use python_sitelib macro instead of INSTALLED_FILES.
375
- Fix redundant requirement for -devel subpackage.
376
- Fix wrong dependences for -python subpackage.
377
- Fix typo in requirements for -javadoc subpackage.
378
- Use -p option for cp and install to preserve timestamps.
379
- Remove unneeded ldconfig call for post scripts of -devel subpackage.
380
- Fix directories ownership.
382
* Sun Oct 12 2008 Lev Shamardin <shamardin@gmail.com> - 2.0.2-1
383
- Update to version 2.0.2
384
- New -java and -javadoc subpackages.
385
- Options to disable building of -python and -java* subpackages
387
* Mon Sep 15 2008 Lev Shamardin <shamardin@gmail.com> - 2.0.1-2
388
- Added -p switch to install commands to preserve timestamps.
389
- Fixed Version and Libs in pkgconfig script.
390
- Added pkgconfig requires for -devel package.
391
- Removed libtool archives from -devel package.
393
* Thu Sep 04 2008 Lev Shamardin <shamardin@gmail.com> - 2.0.1-1
394
- Updated to 2.0.1 version.
396
* Wed Aug 13 2008 Lev Shamardin <shamardin@gmail.com> - 2.0.0-0.1.beta
397
- Initial package version. Credits for vim subpackage and pkgconfig go
398
to Rick L Vinyard Jr <rvinyard@cs.nmsu.edu>