Created
June 18, 2020 04:55
-
-
Save hanxue/e3e0223e6c2279c1ffe5a0c78fb26fff to your computer and use it in GitHub Desktop.
Protobuf 2.5.0 and 3.5.0 RPM spec files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build -python subpackage | |
%bcond_without python | |
# Build -java subpackage | |
%bcond_without java | |
# Don't require gtest | |
%bcond_with gtest | |
%if %{with python} | |
%define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()") | |
%endif | |
%global emacs_version %(pkg-config emacs --modversion) | |
%global emacs_lispdir %(pkg-config emacs --variable sitepkglispdir) | |
%global emacs_startdir %(pkg-config emacs --variable sitestartdir) | |
Summary: Protocol Buffers - Google's data interchange format | |
Name: protobuf | |
Version: 2.5.0 | |
Release: 8%{?dist} | |
License: BSD | |
Group: Development/Libraries | |
Source: http://protobuf.googlecode.com/files/protobuf-%{version}.tar.bz2 | |
Source1: ftdetect-proto.vim | |
Source2: protobuf-init.el | |
Patch1: protobuf-2.5.0-fedora-gtest.patch | |
Patch2: protobuf-2.5.0-java-fixes.patch | |
Patch3: 0001-Add-generic-GCC-support-for-atomic-operations.patch | |
Patch4: protobuf-2.5.0-makefile.patch | |
URL: http://code.google.com/p/protobuf/ | |
BuildRequires: automake autoconf libtool pkgconfig zlib-devel | |
BuildRequires: emacs | |
BuildRequires: emacs-el >= 24.1 | |
%if %{with gtest} | |
BuildRequires: gtest-devel | |
%endif | |
%description | |
Protocol Buffers are a way of encoding structured data in an efficient | |
yet extensible format. Google uses Protocol Buffers for almost all of | |
its internal RPC protocols and file formats. | |
Protocol buffers are a flexible, efficient, automated mechanism for | |
serializing structured data – think XML, but smaller, faster, and | |
simpler. You define how you want your data to be structured once, then | |
you can use special generated source code to easily write and read | |
your structured data to and from a variety of data streams and using a | |
variety of languages. You can even update your data structure without | |
breaking deployed programs that are compiled against the "old" format. | |
%package compiler | |
Summary: Protocol Buffers compiler | |
Group: Development/Libraries | |
Requires: %{name} = %{version}-%{release} | |
%description compiler | |
This package contains Protocol Buffers compiler for all programming | |
languages | |
%package devel | |
Summary: Protocol Buffers C++ headers and libraries | |
Group: Development/Libraries | |
Requires: %{name} = %{version}-%{release} | |
Requires: %{name}-compiler = %{version}-%{release} | |
Requires: zlib-devel | |
Requires: pkgconfig | |
%description devel | |
This package contains Protocol Buffers compiler for all languages and | |
C++ headers and libraries | |
%package static | |
Summary: Static development files for %{name} | |
Group: Development/Libraries | |
Requires: %{name} = %{version}-%{release} | |
%description static | |
Static libraries for Protocol Buffers | |
%package lite | |
Summary: Protocol Buffers LITE_RUNTIME libraries | |
Group: Development/Libraries | |
%description lite | |
Protocol Buffers built with optimize_for = LITE_RUNTIME. | |
The "optimize_for = LITE_RUNTIME" option causes the compiler to generate code | |
which only depends libprotobuf-lite, which is much smaller than libprotobuf but | |
lacks descriptors, reflection, and some other features. | |
%package lite-devel | |
Summary: Protocol Buffers LITE_RUNTIME development libraries | |
Requires: %{name}-devel = %{version}-%{release} | |
Requires: %{name}-lite = %{version}-%{release} | |
%description lite-devel | |
This package contains development libraries built with | |
optimize_for = LITE_RUNTIME. | |
The "optimize_for = LITE_RUNTIME" option causes the compiler to generate code | |
which only depends libprotobuf-lite, which is much smaller than libprotobuf but | |
lacks descriptors, reflection, and some other features. | |
%package lite-static | |
Summary: Static development files for %{name}-lite | |
Group: Development/Libraries | |
Requires: %{name}-devel = %{version}-%{release} | |
%description lite-static | |
This package contains static development libraries built with | |
optimize_for = LITE_RUNTIME. | |
The "optimize_for = LITE_RUNTIME" option causes the compiler to generate code | |
which only depends libprotobuf-lite, which is much smaller than libprotobuf but | |
lacks descriptors, reflection, and some other features. | |
%if %{with python} | |
%package python | |
Summary: Python bindings for Google Protocol Buffers | |
Group: Development/Languages | |
BuildRequires: python-devel | |
BuildRequires: python-setuptools | |
Conflicts: %{name}-compiler > %{version} | |
Conflicts: %{name}-compiler < %{version} | |
%description python | |
This package contains Python libraries for Google Protocol Buffers | |
%endif | |
%package vim | |
Summary: Vim syntax highlighting for Google Protocol Buffers descriptions | |
Group: Development/Libraries | |
Requires: vim-enhanced | |
%description vim | |
This package contains syntax highlighting for Google Protocol Buffers | |
descriptions in Vim editor | |
%package emacs | |
Summary: Emacs mode for Google Protocol Buffers descriptions | |
Group: Applications/Editors | |
Requires: emacs >= 0%{emacs_version} | |
%description emacs | |
This package contains syntax highlighting for Google Protocol Buffers | |
descriptions in the Emacs editor. | |
%package emacs-el | |
Summary: Elisp source files for Google protobuf Emacs mode | |
Group: Applications/Editors | |
Requires: protobuf-emacs = %{version} | |
%description emacs-el | |
This package contains the elisp source files for %{name}-emacs | |
under GNU Emacs. You do not need to install this package to use | |
%{name}-emacs. | |
%if %{with java} | |
%package java | |
Summary: Java Protocol Buffers runtime library | |
Group: Development/Languages | |
BuildRequires: java-devel >= 1.6 | |
BuildRequires: jpackage-utils | |
BuildRequires: maven-local | |
BuildRequires: maven-compiler-plugin | |
BuildRequires: maven-install-plugin | |
BuildRequires: maven-jar-plugin | |
BuildRequires: maven-javadoc-plugin | |
BuildRequires: maven-resources-plugin | |
BuildRequires: maven-surefire-plugin | |
BuildRequires: maven-antrun-plugin | |
Conflicts: %{name}-compiler > %{version} | |
Conflicts: %{name}-compiler < %{version} | |
%description java | |
This package contains Java Protocol Buffers runtime library. | |
%package javadoc | |
Summary: Javadocs for %{name}-java | |
Group: Documentation | |
Requires: %{name}-java = %{version}-%{release} | |
%description javadoc | |
This package contains the API documentation for %{name}-java. | |
%endif | |
%prep | |
%setup -q | |
%if %{with gtest} | |
rm -rf gtest | |
%patch1 -p1 -b .gtest | |
%endif | |
chmod 644 examples/* | |
%if %{with java} | |
%patch2 -p1 -b .java-fixes | |
rm -rf java/src/test | |
%endif | |
%patch3 -p1 -b .generic-atomics | |
%patch4 -p1 -b .generic-atomics-makefile | |
%build | |
iconv -f iso8859-1 -t utf-8 CONTRIBUTORS.txt > CONTRIBUTORS.txt.utf8 | |
mv CONTRIBUTORS.txt.utf8 CONTRIBUTORS.txt | |
export PTHREAD_LIBS="-lpthread" | |
./autogen.sh | |
%configure | |
make %{?_smp_mflags} | |
%if %{with python} | |
pushd python | |
python ./setup.py build | |
sed -i -e 1d build/lib/google/protobuf/descriptor_pb2.py | |
popd | |
%endif | |
%if %{with java} | |
pushd java | |
%mvn_file : %{name} | |
%mvn_build | |
popd | |
%endif | |
emacs -batch -f batch-byte-compile editors/protobuf-mode.el | |
%check | |
#make %{?_smp_mflags} check | |
%install | |
rm -rf %{buildroot} | |
make %{?_smp_mflags} install DESTDIR=%{buildroot} STRIPBINARIES=no INSTALL="%{__install} -p" CPPROG="cp -p" | |
find %{buildroot} -type f -name "*.la" -exec rm -f {} \; | |
%if %{with python} | |
pushd python | |
python ./setup.py install --root=%{buildroot} --single-version-externally-managed --record=INSTALLED_FILES --optimize=1 | |
popd | |
%endif | |
install -p -m 644 -D %{SOURCE1} %{buildroot}%{_datadir}/vim/vimfiles/ftdetect/proto.vim | |
install -p -m 644 -D editors/proto.vim %{buildroot}%{_datadir}/vim/vimfiles/syntax/proto.vim | |
%if %{with java} | |
pushd java | |
%mvn_install | |
popd | |
%endif | |
mkdir -p $RPM_BUILD_ROOT%{emacs_lispdir} | |
mkdir -p $RPM_BUILD_ROOT%{emacs_startdir} | |
install -p -m 0644 editors/protobuf-mode.el $RPM_BUILD_ROOT%{emacs_lispdir} | |
install -p -m 0644 editors/protobuf-mode.elc $RPM_BUILD_ROOT%{emacs_lispdir} | |
install -p -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{emacs_startdir} | |
%post -p /sbin/ldconfig | |
%postun -p /sbin/ldconfig | |
%post lite -p /sbin/ldconfig | |
%postun lite -p /sbin/ldconfig | |
%post compiler -p /sbin/ldconfig | |
%postun compiler -p /sbin/ldconfig | |
%files | |
%defattr(-, root, root, -) | |
%{_libdir}/libprotobuf.so.* | |
%doc CHANGES.txt CONTRIBUTORS.txt COPYING.txt README.txt | |
%files compiler | |
%defattr(-, root, root, -) | |
%{_bindir}/protoc | |
%{_libdir}/libprotoc.so.* | |
%doc COPYING.txt README.txt | |
%files devel | |
%defattr(-, root, root, -) | |
%dir %{_includedir}/google | |
%{_includedir}/google/protobuf/ | |
%{_libdir}/libprotobuf.so | |
%{_libdir}/libprotoc.so | |
%{_libdir}/pkgconfig/protobuf.pc | |
%doc examples/add_person.cc examples/addressbook.proto examples/list_people.cc examples/Makefile examples/README.txt | |
%files static | |
%defattr(-, root, root, -) | |
%{_libdir}/libprotobuf.a | |
%{_libdir}/libprotoc.a | |
%files lite | |
%defattr(-, root, root, -) | |
%{_libdir}/libprotobuf-lite.so.* | |
%files lite-devel | |
%defattr(-, root, root, -) | |
%{_libdir}/libprotobuf-lite.so | |
%{_libdir}/pkgconfig/protobuf-lite.pc | |
%files lite-static | |
%defattr(-, root, root, -) | |
%{_libdir}/libprotobuf-lite.a | |
%if %{with python} | |
%files python | |
%defattr(-, root, root, -) | |
%dir %{python_sitelib}/google | |
%{python_sitelib}/google/protobuf/ | |
%{python_sitelib}/protobuf-%{version}-py2.?.egg-info/ | |
%{python_sitelib}/protobuf-%{version}-py2.?-nspkg.pth | |
%doc python/README.txt | |
%doc examples/add_person.py examples/list_people.py examples/addressbook.proto | |
%endif | |
%files vim | |
%defattr(-, root, root, -) | |
%{_datadir}/vim/vimfiles/ftdetect/proto.vim | |
%{_datadir}/vim/vimfiles/syntax/proto.vim | |
%files emacs | |
%defattr(-,root,root,-) | |
%{emacs_startdir}/protobuf-init.el | |
%{emacs_lispdir}/protobuf-mode.elc | |
%files emacs-el | |
%defattr(-,root,root,-) | |
%{emacs_lispdir}/protobuf-mode.el | |
%if %{with java} | |
%files java -f java/.mfiles | |
%doc examples/AddPerson.java examples/ListPeople.java | |
%files javadoc -f java/.mfiles-javadoc | |
%endif | |
%changelog | |
* Mon Jul 27 2015 Adrian Reber <[email protected]> - 2.5.0-8 | |
- Merge specfiles | |
* Wed Dec 17 2014 Peter Lemenkov <[email protected]> - 2.5.0-7 | |
- Added missing Requires zlib-devel to protobuf-devel (see rhbz #1173343). See | |
also rhbz #732087. | |
* Thu Dec 12 2013 Conrad Meyer <[email protected]> - 2.5.0-6.1 | |
- BR python-setuptools-devel -> python-setuptools | |
* Mon Aug 26 2013 Michal Srb <[email protected]> - 2.5.0-6 | |
- Migrate away from mvn-rpmbuild (Resolves: #997515) | |
* Sun Aug 04 2013 Fedora Release Engineering <[email protected]> - 2.5.0-5.1 | |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild | |
* Fri Jun 28 2013 Mikolaj Izdebski <[email protected]> - 2.5.0-5 | |
- Rebuild to regenerate API documentation | |
- Resolv: CVE-2013-1571 | |
* Thu May 16 2013 Dan Horák <dan[at]danny.cz> - 2.5.0-4 | |
- export the new generic atomics header (rh #926374) | |
* Mon May 6 2013 Stanislav Ochotnicky <[email protected]> - 2.5.0-3 | |
- Add support for generic gcc atomic operations (rh #926374) | |
* Sat Apr 27 2013 Conrad Meyer <[email protected]> - 2.5.0-2 | |
- Remove changelog history from before 2010 | |
- This spec already runs autoreconf -fi during %%build, but bump build for | |
rhbz #926374 | |
* Sat Mar 9 2013 Conrad Meyer <[email protected]> - 2.5.0-1 | |
- Bump to latest upstream (#883822) | |
- Rebase gtest, maven patches on 2.5.0 | |
* Tue Feb 26 2013 Conrad Meyer <[email protected]> - 2.4.1-12 | |
- Nuke BR on maven-doxia, maven-doxia-sitetools (#915620) | |
* Thu Feb 14 2013 Fedora Release Engineering <[email protected]> - 2.4.1-11 | |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild | |
* Wed Feb 06 2013 Java SIG <[email protected]> - 2.4.1-10 | |
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild | |
- Replace maven BuildRequires with maven-local | |
* Sun Jan 20 2013 Conrad Meyer <[email protected]> - 2.4.1-9 | |
- Fix packaging bug, -emacs-el subpackage should depend on -emacs subpackage of | |
the same version (%%version), not the emacs version number... | |
* Thu Jan 17 2013 Tim Niemueller <[email protected]> - 2.4.1-8 | |
- Added sub-package for Emacs editing mode | |
* Sat Jul 21 2012 Fedora Release Engineering <[email protected]> - 2.4.1-7 | |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild | |
* Mon Mar 19 2012 Dan Horák <dan[at]danny.cz> - 2.4.1-6 | |
- disable test-suite until g++ 4.7 issues are resolved | |
* Mon Mar 19 2012 Stanislav Ochotnicky <[email protected]> - 2.4.1-5 | |
- Update to latest java packaging guidelines | |
* Tue Feb 28 2012 Fedora Release Engineering <[email protected]> - 2.4.1-4 | |
- Rebuilt for c++ ABI breakage | |
* Sat Jan 14 2012 Fedora Release Engineering <[email protected]> - 2.4.1-3 | |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild | |
* Tue Sep 27 2011 Pierre-Yves Chibon <[email protected]> - 2.4.1-2 | |
- Adding zlib-devel as BR (rhbz: #732087) | |
* Thu Jun 09 2011 BJ Dierkes <[email protected]> - 2.4.1-1 | |
- Latest sources from upstream. | |
- Rewrote Patch2 as protobuf-2.4.1-java-fixes.patch | |
* Wed Feb 09 2011 Fedora Release Engineering <[email protected]> - 2.3.0-7 | |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild | |
* Thu Jan 13 2011 Stanislav Ochotnicky <[email protected]> - 2.3.0-6 | |
- Fix java subpackage bugs #669345 and #669346 | |
- Use new maven plugin names | |
- Use mavenpomdir macro for pom installation | |
* Mon Jul 26 2010 David Malcolm <[email protected]> - 2.3.0-5 | |
- generalize hardcoded reference to 2.6 in python subpackage %%files manifest | |
* Wed Jul 21 2010 David Malcolm <[email protected]> - 2.3.0-4 | |
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild | |
* Thu Jul 15 2010 James Laska <[email protected]> - 2.3.0-3 | |
- Correct use of %bcond macros | |
* Wed Jul 14 2010 James Laska <[email protected]> - 2.3.0-2 | |
- Enable python and java sub-packages | |
* Tue May 4 2010 Conrad Meyer <[email protected]> - 2.3.0-1 | |
- bump to 2.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build -python2 subpackage | |
%bcond_with python2 | |
# Build -python3 subpackage | |
%bcond_without python3 | |
# Build -java subpackage | |
%bcond_with java | |
%global emacs_version %(pkg-config emacs --modversion) | |
%global emacs_lispdir %(pkg-config emacs --variable sitepkglispdir) | |
%global emacs_startdir %(pkg-config emacs --variable sitestartdir) | |
#global rcver rc2 | |
Summary: Protocol Buffers - Google's data interchange format | |
Name: protobuf | |
Version: 3.5.0 | |
Release: 7%{?dist} | |
License: BSD | |
URL: https://github.com/google/protobuf | |
Source: https://github.com/google/protobuf/archive/v%{version}%{?rcver}/%{name}-%{version}%{?rcver}.tar.gz | |
Source1: ftdetect-proto.vim | |
Source2: protobuf-init.el | |
# For tests | |
Source3: https://github.com/google/googlemock/archive/release-1.7.0.tar.gz#/googlemock-1.7.0.tar.gz | |
Source4: https://github.com/google/googletest/archive/release-1.7.0.tar.gz#/googletest-1.7.0.tar.gz | |
# Might be upstreamable, but for now temporary workaround | |
Patch0: 0001-fix-build-on-s390x.patch | |
BuildRequires: autoconf | |
BuildRequires: automake | |
BuildRequires: emacs(bin) | |
BuildRequires: emacs-el >= 24.1 | |
BuildRequires: gcc-c++ | |
BuildRequires: libtool | |
BuildRequires: pkgconfig | |
BuildRequires: zlib-devel | |
%description | |
Protocol Buffers are a way of encoding structured data in an efficient | |
yet extensible format. Google uses Protocol Buffers for almost all of | |
its internal RPC protocols and file formats. | |
Protocol buffers are a flexible, efficient, automated mechanism for | |
serializing structured data – think XML, but smaller, faster, and | |
simpler. You define how you want your data to be structured once, then | |
you can use special generated source code to easily write and read | |
your structured data to and from a variety of data streams and using a | |
variety of languages. You can even update your data structure without | |
breaking deployed programs that are compiled against the "old" format. | |
%package compiler | |
Summary: Protocol Buffers compiler | |
Requires: %{name} = %{version}-%{release} | |
%description compiler | |
This package contains Protocol Buffers compiler for all programming | |
languages | |
%package devel | |
Summary: Protocol Buffers C++ headers and libraries | |
Requires: %{name} = %{version}-%{release} | |
Requires: %{name}-compiler = %{version}-%{release} | |
Requires: zlib-devel | |
Requires: pkgconfig | |
%description devel | |
This package contains Protocol Buffers compiler for all languages and | |
C++ headers and libraries | |
%package static | |
Summary: Static development files for %{name} | |
Requires: %{name}-devel = %{version}-%{release} | |
%description static | |
Static libraries for Protocol Buffers | |
%package lite | |
Summary: Protocol Buffers LITE_RUNTIME libraries | |
%description lite | |
Protocol Buffers built with optimize_for = LITE_RUNTIME. | |
The "optimize_for = LITE_RUNTIME" option causes the compiler to generate code | |
which only depends libprotobuf-lite, which is much smaller than libprotobuf but | |
lacks descriptors, reflection, and some other features. | |
%package lite-devel | |
Summary: Protocol Buffers LITE_RUNTIME development libraries | |
Requires: %{name}-devel = %{version}-%{release} | |
Requires: %{name}-lite = %{version}-%{release} | |
%description lite-devel | |
This package contains development libraries built with | |
optimize_for = LITE_RUNTIME. | |
The "optimize_for = LITE_RUNTIME" option causes the compiler to generate code | |
which only depends libprotobuf-lite, which is much smaller than libprotobuf but | |
lacks descriptors, reflection, and some other features. | |
%package lite-static | |
Summary: Static development files for %{name}-lite | |
Requires: %{name}-devel = %{version}-%{release} | |
%description lite-static | |
This package contains static development libraries built with | |
optimize_for = LITE_RUNTIME. | |
The "optimize_for = LITE_RUNTIME" option causes the compiler to generate code | |
which only depends libprotobuf-lite, which is much smaller than libprotobuf but | |
lacks descriptors, reflection, and some other features. | |
%if %{with python2} | |
%package -n python2-%{name} | |
Summary: Python 2 bindings for Google Protocol Buffers | |
BuildArch: noarch | |
BuildRequires: python2-devel | |
BuildRequires: python-setuptools | |
%if 0%{?fedora} | |
# For tests | |
BuildRequires: python-google-apputils | |
%endif | |
Requires: python-six >= 1.9 | |
Conflicts: %{name}-compiler > %{version} | |
Conflicts: %{name}-compiler < %{version} | |
Obsoletes: %{name}-python < 3.1.0-4 | |
Provides: %{name}-python = %{version}-%{release} | |
%{?python_provide:%python_provide python2-%{name}} | |
%description -n python2-%{name} | |
This package contains Python 2 libraries for Google Protocol Buffers | |
%endif | |
%if %{with python3} | |
%package -n python%{python3_pkgversion}-%{name} | |
Summary: Python 3 bindings for Google Protocol Buffers | |
BuildArch: noarch | |
BuildRequires: python%{python3_pkgversion}-devel | |
BuildRequires: python%{python3_pkgversion}-setuptools | |
%if 0%{?fedora} | |
# For tests | |
BuildRequires: python%{python3_pkgversion}-google-apputils | |
%endif | |
Requires: python%{python3_pkgversion}-six >= 1.9 | |
Conflicts: %{name}-compiler > %{version} | |
Conflicts: %{name}-compiler < %{version} | |
Provides: %{name}-python3 = %{version}-%{release} | |
%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}} | |
%description -n python%{python3_pkgversion}-%{name} | |
This package contains Python 3 libraries for Google Protocol Buffers | |
%endif | |
%package vim | |
Summary: Vim syntax highlighting for Google Protocol Buffers descriptions | |
BuildArch: noarch | |
Requires: vim-enhanced | |
%description vim | |
This package contains syntax highlighting for Google Protocol Buffers | |
descriptions in Vim editor | |
%package emacs | |
Summary: Emacs mode for Google Protocol Buffers descriptions | |
BuildArch: noarch | |
Requires: emacs(bin) >= 0%{emacs_version} | |
%description emacs | |
This package contains syntax highlighting for Google Protocol Buffers | |
descriptions in the Emacs editor. | |
%package emacs-el | |
Summary: Elisp source files for Google protobuf Emacs mode | |
BuildArch: noarch | |
Requires: protobuf-emacs = %{version} | |
%description emacs-el | |
This package contains the elisp source files for %{name}-emacs | |
under GNU Emacs. You do not need to install this package to use | |
%{name}-emacs. | |
%if %{with java} | |
%package java | |
Summary: Java Protocol Buffers runtime library | |
BuildArch: noarch | |
BuildRequires: maven-local | |
BuildRequires: mvn(com.google.code.gson:gson) | |
BuildRequires: mvn(com.google.guava:guava) | |
BuildRequires: mvn(junit:junit) | |
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) | |
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) | |
BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin) | |
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) | |
BuildRequires: mvn(org.easymock:easymock) | |
Conflicts: %{name}-compiler > %{version} | |
Conflicts: %{name}-compiler < %{version} | |
%description java | |
This package contains Java Protocol Buffers runtime library. | |
%package java-util | |
Summary: Utilities for Protocol Buffers | |
BuildArch: noarch | |
%description java-util | |
Utilities to work with protos. It contains JSON support | |
as well as utilities to work with proto3 well-known types. | |
%package javadoc | |
Summary: Javadoc for %{name}-java | |
BuildArch: noarch | |
%description javadoc | |
This package contains the API documentation for %{name}-java. | |
%package javanano | |
Summary: Protocol Buffer JavaNano API | |
BuildArch: noarch | |
%description javanano | |
JavaNano is a special code generator and runtime | |
library designed specially for resource-restricted | |
systems, like Android. | |
%package parent | |
Summary: Protocol Buffer Parent POM | |
BuildArch: noarch | |
%description parent | |
Protocol Buffer Parent POM. | |
%endif | |
%prep | |
%setup -q -n %{name}-%{version}%{?rcver} -a 3 -a 4 | |
%autopatch -p1 | |
mv googlemock-release-1.7.0 gmock | |
mv googletest-release-1.7.0 gmock/gtest | |
find -name \*.cc -o -name \*.h | xargs chmod -x | |
chmod 644 examples/* | |
%if %{with java} | |
%pom_remove_parent java/pom.xml | |
%pom_remove_dep org.easymock:easymockclassextension java/pom.xml java/*/pom.xml | |
# These use easymockclassextension | |
rm java/core/src/test/java/com/google/protobuf/ServiceTest.java | |
#rm -r java/core/src/test | |
# used by https://github.com/googlei18n/libphonenumber | |
%pom_xpath_inject "pom:project/pom:modules" "<module>../javanano</module>" java | |
%pom_remove_parent javanano | |
%pom_remove_dep org.easymock:easymockclassextension javanano | |
# Make OSGi dependency on sun.misc package optional | |
%pom_xpath_inject "pom:configuration/pom:instructions" "<Import-Package>sun.misc;resolution:=optional,*</Import-Package>" java/core | |
# Backward compatibility symlink | |
%mvn_file :protobuf-java:jar: %{name}/%{name}-java %{name} | |
# This test is incredibly slow on arm | |
# https://github.com/google/protobuf/issues/2389 | |
%ifarch %{arm} | |
mv java/core/src/test/java/com/google/protobuf/IsValidUtf8Test.java \ | |
java/core/src/test/java/com/google/protobuf/IsValidUtf8Test.java.slow | |
%endif | |
%endif | |
rm -f src/solaris/libstdc++.la | |
%build | |
iconv -f iso8859-1 -t utf-8 CONTRIBUTORS.txt > CONTRIBUTORS.txt.utf8 | |
mv CONTRIBUTORS.txt.utf8 CONTRIBUTORS.txt | |
export PTHREAD_LIBS="-lpthread" | |
./autogen.sh | |
%configure | |
make %{?_smp_mflags} | |
%if %{with python2} | |
pushd python | |
%py2_build | |
popd | |
%endif | |
%if %{with python3} | |
pushd python | |
%py3_build | |
popd | |
%endif | |
%if %{with java} | |
%mvn_build -s -- -f java/pom.xml | |
%endif | |
emacs -batch -f batch-byte-compile editors/protobuf-mode.el | |
%check | |
# TODO: failures; get them fixed and remove || : | |
# https://github.com/google/protobuf/issues/631 | |
make %{?_smp_mflags} check || : | |
%install | |
make %{?_smp_mflags} install DESTDIR=%{buildroot} STRIPBINARIES=no INSTALL="%{__install} -p" CPPROG="cp -p" | |
find %{buildroot} -type f -name "*.la" -exec rm -f {} \; | |
%if %{with python2} | |
pushd python | |
#python ./setup.py install --root=%{buildroot} --single-version-externally-managed --record=INSTALLED_FILES --optimize=1 | |
%py2_install | |
find %{buildroot}%{python2_sitelib} -name \*.py | | |
xargs sed -i -e '1{\@^#!@d}' | |
popd | |
%endif | |
%if %{with python3} | |
pushd python | |
#python ./setup.py install --root=%{buildroot} --single-version-externally-managed --record=INSTALLED_FILES --optimize=1 | |
%py3_install | |
find %{buildroot}%{python3_sitelib} -name \*.py | | |
xargs sed -i -e '1{\@^#!@d}' | |
popd | |
%endif | |
install -p -m 644 -D %{SOURCE1} %{buildroot}%{_datadir}/vim/vimfiles/ftdetect/proto.vim | |
install -p -m 644 -D editors/proto.vim %{buildroot}%{_datadir}/vim/vimfiles/syntax/proto.vim | |
%if %{with java} | |
%mvn_install | |
%endif | |
mkdir -p $RPM_BUILD_ROOT%{emacs_lispdir} | |
mkdir -p $RPM_BUILD_ROOT%{emacs_startdir} | |
install -p -m 0644 editors/protobuf-mode.el $RPM_BUILD_ROOT%{emacs_lispdir} | |
install -p -m 0644 editors/protobuf-mode.elc $RPM_BUILD_ROOT%{emacs_lispdir} | |
install -p -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{emacs_startdir} | |
%ldconfig_scriptlets | |
%ldconfig_scriptlets lite | |
%ldconfig_scriptlets compiler | |
%files | |
%{_libdir}/libprotobuf.so.15* | |
%doc CHANGES.txt CONTRIBUTORS.txt README.md | |
%license LICENSE | |
%files compiler | |
%{_bindir}/protoc | |
%{_libdir}/libprotoc.so.15* | |
%doc README.md | |
%license LICENSE | |
%files devel | |
%dir %{_includedir}/google | |
%{_includedir}/google/protobuf/ | |
%{_libdir}/libprotobuf.so | |
%{_libdir}/libprotoc.so | |
%{_libdir}/pkgconfig/protobuf.pc | |
%doc examples/add_person.cc examples/addressbook.proto examples/list_people.cc examples/Makefile examples/README.md | |
%files static | |
%{_libdir}/libprotobuf.a | |
%{_libdir}/libprotoc.a | |
%files lite | |
%{_libdir}/libprotobuf-lite.so.15* | |
%files lite-devel | |
%{_libdir}/libprotobuf-lite.so | |
%{_libdir}/pkgconfig/protobuf-lite.pc | |
%files lite-static | |
%{_libdir}/libprotobuf-lite.a | |
%if %{with python2} | |
%files -n python2-protobuf | |
%dir %{python2_sitelib}/google | |
%{python2_sitelib}/google/protobuf/ | |
%{python2_sitelib}/protobuf-%{version}%{?rcver}-py2.?.egg-info/ | |
%{python2_sitelib}/protobuf-%{version}%{?rcver}-py2.?-nspkg.pth | |
%doc python/README.md | |
%doc examples/add_person.py examples/list_people.py examples/addressbook.proto | |
%endif | |
%if %{with python3} | |
%files -n python%{python3_pkgversion}-protobuf | |
%dir %{python3_sitelib}/google | |
%{python3_sitelib}/google/protobuf/ | |
%{python3_sitelib}/protobuf-%{version}%{?rcver}-py3.?.egg-info/ | |
%{python3_sitelib}/protobuf-%{version}%{?rcver}-py3.?-nspkg.pth | |
%doc python/README.md | |
%doc examples/add_person.py examples/list_people.py examples/addressbook.proto | |
%endif | |
%files vim | |
%{_datadir}/vim/vimfiles/ftdetect/proto.vim | |
%{_datadir}/vim/vimfiles/syntax/proto.vim | |
%files emacs | |
%{emacs_startdir}/protobuf-init.el | |
%{emacs_lispdir}/protobuf-mode.elc | |
%files emacs-el | |
%{emacs_lispdir}/protobuf-mode.el | |
%if %{with java} | |
%files java -f .mfiles-protobuf-java | |
%doc examples/AddPerson.java examples/ListPeople.java | |
%doc java/README.md | |
%license LICENSE | |
%files java-util -f .mfiles-protobuf-java-util | |
%files javadoc -f .mfiles-javadoc | |
%license LICENSE | |
%files javanano -f .mfiles-protobuf-javanano | |
%doc javanano/README.md | |
%license LICENSE | |
%files parent -f .mfiles-protobuf-parent | |
%license LICENSE | |
%endif | |
%changelog | |
* Thu Jul 12 2018 Adrian Reber <[email protected]> - 3.5.0-7 | |
- Build without python2 subpackage | |
* Wed Jun 20 2018 Adrian Reber <[email protected]> - 3.5.0-6 | |
- Only BR python-google-apputils on Fedora | |
* Wed May 30 2018 Mikolaj Izdebski <[email protected]> - 3.5.0-5 | |
- Build without -java supbackage | |
* Fri Feb 09 2018 Igor Gnatenko <[email protected]> - 3.5.0-4 | |
- Escape macros in %%changelog | |
* Fri Feb 09 2018 Fedora Release Engineering <[email protected]> - 3.5.0-3 | |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild | |
* Fri Feb 02 2018 Igor Gnatenko <[email protected]> - 3.5.0-2 | |
- Switch to %%ldconfig_scriptlets | |
* Thu Nov 23 2017 Igor Gnatenko <[email protected]> - 3.5.0-1 | |
- Update to 3.5.0 | |
* Mon Nov 13 2017 Igor Gnatenko <[email protected]> - 3.4.1-1 | |
- Update to 3.4.1 | |
* Thu Aug 03 2017 Fedora Release Engineering <[email protected]> - 3.3.1-4 | |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild | |
* Thu Jul 27 2017 Fedora Release Engineering <[email protected]> - 3.3.1-3 | |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild | |
* Tue Jun 27 2017 Mat Booth <[email protected]> - 3.3.1-2 | |
- Make OSGi dependency on sun.misc package optional. This package is not | |
available in all execution environments and will not be available in Java 9. | |
* Mon Jun 12 2017 Orion Poplawski <[email protected]> - 3.3.1-1 | |
- Update to 3.3.1 | |
* Mon May 15 2017 Fedora Release Engineering <[email protected]> - 3.2.0-3 | |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild | |
* Sat Feb 11 2017 Fedora Release Engineering <[email protected]> - 3.2.0-2 | |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild | |
* Fri Jan 27 2017 Orion Poplawski <[email protected]> - 3.2.0-1 | |
- Update to 3.2.0 final | |
* Mon Jan 23 2017 Orion Poplawski <[email protected]> - 3.2.0-0.1.rc2 | |
- Update to 3.2.0rc2 | |
* Mon Dec 19 2016 Miro Hrončok <[email protected]> - 3.1.0-6 | |
- Rebuild for Python 3.6 | |
* Sat Nov 19 2016 Orion Poplawski <[email protected]> - 3.1.0-5 | |
- Disable slow test on arm | |
* Fri Nov 18 2016 Orion Poplawski <[email protected]> - 3.1.0-4 | |
- Ship python 3 module | |
* Fri Nov 18 2016 Orion Poplawski <[email protected]> - 3.1.0-3 | |
- Fix jar file compat symlink | |
* Fri Nov 18 2016 Orion Poplawski <[email protected]> - 3.1.0-2 | |
- Add needed python requirement | |
* Fri Nov 04 2016 Orion Poplawski <[email protected]> - 3.1.0-2 | |
- Make various sub-packages noarch | |
* Fri Nov 04 2016 gil cattaneo <[email protected]> 3.1.0-2 | |
- enable javanano | |
- minor changes to adapt to current guidelines | |
* Fri Nov 04 2016 Orion Poplawski <[email protected]> - 3.1.0-1 | |
- Update to 3.1.0 | |
* Tue Jul 19 2016 Fedora Release Engineering <[email protected]> - 2.6.1-5 | |
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages | |
* Thu Feb 04 2016 Fedora Release Engineering <[email protected]> - 2.6.1-4 | |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild | |
* Wed Jan 20 2016 Orion Poplawski <[email protected]> - 2.6.1-3 | |
- Tests no longer segfaulting on arm | |
* Thu Jun 18 2015 Fedora Release Engineering <[email protected]> - 2.6.1-2 | |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild | |
* Mon Apr 6 2015 Orion Poplawski <[email protected]> - 2.6.1-1 | |
- Update to 2.6.1 | |
- New URL | |
- Cleanup spec | |
- Add patch to fix emacs compilation with emacs 24.4 | |
- Drop java-fixes patch, use pom macros instead | |
- Add BR on python-google-apputils and mvn(org.easymock:easymock) | |
- Run make check | |
- Make -static require -devel (bug #1067475) | |
* Thu Mar 26 2015 Kalev Lember <[email protected]> - 2.6.0-4 | |
- Rebuilt for GCC 5 ABI change | |
* Sat Feb 21 2015 Till Maas <[email protected]> - 2.6.0-3 | |
- Rebuilt for Fedora 23 Change | |
https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code | |
* Wed Dec 17 2014 Peter Lemenkov <[email protected]> - 2.6.0-2 | |
- Added missing Requires zlib-devel to protobuf-devel (see rhbz #1173343). See | |
also rhbz #732087. | |
* Sun Oct 19 2014 Conrad Meyer <[email protected]> - 2.6.0-1 | |
- Bump to upstream release 2.6.0 (rh# 1154474). | |
- Rebase 'java fixes' patch on 2.6.0 pom.xml. | |
- Drop patch #3 (fall back to generic GCC atomics if no specialized atomics | |
exist, e.g. AArch64 GCC); this has been upstreamed. | |
* Sun Oct 19 2014 Conrad Meyer <[email protected]> - 2.5.0-11 | |
- protobuf-emacs requires emacs(bin), not emacs (rh# 1154456) | |
* Sun Aug 17 2014 Fedora Release Engineering <[email protected]> - 2.5.0-10 | |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild | |
* Mon Jun 16 2014 Mikolaj Izdebski <[email protected]> - 2.5.0-9 | |
- Update to current Java packaging guidelines | |
* Sat Jun 07 2014 Fedora Release Engineering <[email protected]> - 2.5.0-8 | |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild | |
* Tue Mar 04 2014 Stanislav Ochotnicky <[email protected]> - 2.5.0-7 | |
- Use Requires: java-headless rebuild (#1067528) | |
* Thu Dec 12 2013 Conrad Meyer <[email protected]> - 2.5.0-6 | |
- BR python-setuptools-devel -> python-setuptools | |
* Sun Aug 04 2013 Fedora Release Engineering <[email protected]> - 2.5.0-5 | |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild | |
* Thu May 16 2013 Dan Horák <dan[at]danny.cz> - 2.5.0-4 | |
- export the new generic atomics header (rh #926374) | |
* Mon May 6 2013 Stanislav Ochotnicky <[email protected]> - 2.5.0-3 | |
- Add support for generic gcc atomic operations (rh #926374) | |
* Sat Apr 27 2013 Conrad Meyer <[email protected]> - 2.5.0-2 | |
- Remove changelog history from before 2010 | |
- This spec already runs autoreconf -fi during %%build, but bump build for | |
rhbz #926374 | |
* Sat Mar 9 2013 Conrad Meyer <[email protected]> - 2.5.0-1 | |
- Bump to latest upstream (#883822) | |
- Rebase gtest, maven patches on 2.5.0 | |
* Tue Feb 26 2013 Conrad Meyer <[email protected]> - 2.4.1-12 | |
- Nuke BR on maven-doxia, maven-doxia-sitetools (#915620) | |
* Thu Feb 14 2013 Fedora Release Engineering <[email protected]> - 2.4.1-11 | |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild | |
* Wed Feb 06 2013 Java SIG <[email protected]> - 2.4.1-10 | |
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild | |
- Replace maven BuildRequires with maven-local | |
* Sun Jan 20 2013 Conrad Meyer <[email protected]> - 2.4.1-9 | |
- Fix packaging bug, -emacs-el subpackage should depend on -emacs subpackage of | |
the same version (%%version), not the emacs version number... | |
* Thu Jan 17 2013 Tim Niemueller <[email protected]> - 2.4.1-8 | |
- Added sub-package for Emacs editing mode | |
* Sat Jul 21 2012 Fedora Release Engineering <[email protected]> - 2.4.1-7 | |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild | |
* Mon Mar 19 2012 Dan Horák <dan[at]danny.cz> - 2.4.1-6 | |
- disable test-suite until g++ 4.7 issues are resolved | |
* Mon Mar 19 2012 Stanislav Ochotnicky <[email protected]> - 2.4.1-5 | |
- Update to latest java packaging guidelines | |
* Tue Feb 28 2012 Fedora Release Engineering <[email protected]> - 2.4.1-4 | |
- Rebuilt for c++ ABI breakage | |
* Sat Jan 14 2012 Fedora Release Engineering <[email protected]> - 2.4.1-3 | |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild | |
* Tue Sep 27 2011 Pierre-Yves Chibon <[email protected]> - 2.4.1-2 | |
- Adding zlib-devel as BR (rhbz: #732087) | |
* Thu Jun 09 2011 BJ Dierkes <[email protected]> - 2.4.1-1 | |
- Latest sources from upstream. | |
- Rewrote Patch2 as protobuf-2.4.1-java-fixes.patch | |
* Wed Feb 09 2011 Fedora Release Engineering <[email protected]> - 2.3.0-7 | |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild | |
* Thu Jan 13 2011 Stanislav Ochotnicky <[email protected]> - 2.3.0-6 | |
- Fix java subpackage bugs #669345 and #669346 | |
- Use new maven plugin names | |
- Use mavenpomdir macro for pom installation | |
* Mon Jul 26 2010 David Malcolm <[email protected]> - 2.3.0-5 | |
- generalize hardcoded reference to 2.6 in python subpackage %%files manifest | |
* Wed Jul 21 2010 David Malcolm <[email protected]> - 2.3.0-4 | |
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild | |
* Thu Jul 15 2010 James Laska <[email protected]> - 2.3.0-3 | |
- Correct use of %%bcond macros | |
* Wed Jul 14 2010 James Laska <[email protected]> - 2.3.0-2 | |
- Enable python and java sub-packages | |
* Tue May 4 2010 Conrad Meyer <[email protected]> - 2.3.0-1 | |
- bump to 2.3.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment