|
@@ -1,32 +1,30 @@
|
|
|
+%global gtest_version 1.10.0
|
|
|
+
|
|
|
# build -python subpackage
|
|
|
%define with_python %{?_without_python: 0} %{?!_without_python: 1}
|
|
|
-# build -java subpackages
|
|
|
-#%define with_java %{?_without_java: 0} %{?!_without_java: 1}
|
|
|
-# but currently diabled
|
|
|
-%define with_java 0
|
|
|
# don't require gtest for building
|
|
|
%define without_gtest %{?_without_gtest: 0} %{?!_without_gtest: 1}
|
|
|
# don't build static subpackages
|
|
|
%define with_static %{?_with_static: 1} %{?!_with_static: 0}
|
|
|
|
|
|
-%if %{with_python}
|
|
|
-%define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
|
|
|
-%endif
|
|
|
-
|
|
|
Summary: Protocol Buffers - Google's data interchange format
|
|
|
Summary(ja): Protocol Buffers - Google のデータ交換フォーマット
|
|
|
Name: protobuf
|
|
|
-Version: 2.6.1
|
|
|
+Version: 3.17.3
|
|
|
Release: 1%{?_dist_release}
|
|
|
-License: BSD
|
|
|
-Group: System Environment/Libraries
|
|
|
-Source: http://protobuf.googlecode.com/files/%{name}-%{version}.tar.bz2
|
|
|
-Source1: ftdetect-proto.vim
|
|
|
-Patch0: protobuf-2.5.0-emacs-24.4.patch
|
|
|
-Patch1: protobuf-2.5.0-fedora-gtest.patch
|
|
|
-URL: http://code.google.com/p/protobuf/
|
|
|
+Group: system
|
|
|
Vendor: Project Vine
|
|
|
Distribution: Vine Linux
|
|
|
+
|
|
|
+License: BSD
|
|
|
+URL: https://github.com/protocolbuffers/protobuf
|
|
|
+Source: https://github.com/protocolbuffers/protobuf/archive/v%{version}%{?rcver}/%{name}-%{version}%{?rcver}-all.tar.gz
|
|
|
+Source1: ftdetect-proto.vim
|
|
|
+Source3: https://github.com/google/googletest/archive/refs/tags/release-%{gtest_version}.tar.gz#/googletest-release-%{gtest_version}.tar.gz
|
|
|
+
|
|
|
+# https://github.com/protocolbuffers/protobuf/issues/8082
|
|
|
+Patch1: protobuf-3.14-disable-IoTest.LargeOutput.patch
|
|
|
+
|
|
|
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
|
|
BuildRequires: automake autoconf libtool pkgconfig
|
|
|
%if !%{without_gtest}
|
|
@@ -49,16 +47,17 @@ breaking deployed programs that are compiled against the "old" format.
|
|
|
|
|
|
%package compiler
|
|
|
Summary: Protocol Buffers compiler
|
|
|
-Group: Development/Tools
|
|
|
+Group: programming
|
|
|
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
|
|
|
+Group: programming
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
Requires: %{name}-compiler = %{version}-%{release}
|
|
|
Requires: pkgconfig
|
|
@@ -67,19 +66,21 @@ Requires: pkgconfig
|
|
|
This package contains Protocol Buffers compiler for all languages and
|
|
|
C++ headers and libraries
|
|
|
|
|
|
+
|
|
|
%if %{with_static}
|
|
|
%package static
|
|
|
Summary: Static development files for %{name}
|
|
|
-Group: Development/Libraries
|
|
|
+Group: programming
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
%description static
|
|
|
Static libraries for Protocol Buffers
|
|
|
%endif
|
|
|
|
|
|
+
|
|
|
%package lite
|
|
|
Summary: Protocol Buffers LITE_RUNTIME libraries
|
|
|
-Group: System Environment/Libraries
|
|
|
+Group: system
|
|
|
|
|
|
%description lite
|
|
|
Protocol Buffers built with optimize_for = LITE_RUNTIME.
|
|
@@ -88,9 +89,10 @@ 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
|
|
|
-Group: Development/Libraries
|
|
|
+Group: programming
|
|
|
Requires: %{name}-devel = %{version}-%{release}
|
|
|
Requires: %{name}-lite = %{version}-%{release}
|
|
|
|
|
@@ -102,10 +104,11 @@ 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_static}
|
|
|
%package lite-static
|
|
|
Summary: Static development files for %{name}-lite
|
|
|
-Group: Development/Libraries
|
|
|
+Group: programming
|
|
|
Requires: %{name}-devel = %{version}-%{release}
|
|
|
|
|
|
%description lite-static
|
|
@@ -117,22 +120,27 @@ which only depends libprotobuf-lite, which is much smaller than libprotobuf but
|
|
|
lacks descriptors, reflection, and some other features.
|
|
|
%endif
|
|
|
|
|
|
+
|
|
|
%if %{with_python}
|
|
|
-%package python
|
|
|
+%package -n python3-%{name}
|
|
|
Summary: Python bindings for Google Protocol Buffers
|
|
|
-Group: Development/Languages
|
|
|
-BuildRequires: python-devel
|
|
|
-BuildRequires: python-setuptools
|
|
|
+Group: programming
|
|
|
+BuildRequires: python3-devel
|
|
|
+BuildRequires: python3-setuptools
|
|
|
+BuildRequires: python3-six
|
|
|
Conflicts: %{name}-compiler > %{version}
|
|
|
Conflicts: %{name}-compiler < %{version}
|
|
|
+Obsoletes: %{name}-python < %{version}-%{release}
|
|
|
+Provides: %{name}-python3 = %{version}-%{release}
|
|
|
|
|
|
-%description python
|
|
|
+%description -n python3-%{name}
|
|
|
This package contains Python libraries for Google Protocol Buffers
|
|
|
%endif
|
|
|
|
|
|
+
|
|
|
%package vim
|
|
|
Summary: Vim syntax highlighting for Google Protocol Buffers descriptions
|
|
|
-Group: Applications/Editors
|
|
|
+Group: accessories
|
|
|
Requires(pre): vim
|
|
|
Requires: vim
|
|
|
|
|
@@ -140,59 +148,29 @@ Requires: vim
|
|
|
This package contains syntax highlighting for Google Protocol Buffers
|
|
|
descriptions in Vim editor
|
|
|
|
|
|
-%if %{with_java}
|
|
|
-%package java
|
|
|
-Summary: Java Protocol Buffers runtime library
|
|
|
-Group: Development/Languages
|
|
|
-BuildRequires: java-devel >= 1.6
|
|
|
-BuildRequires: jpackage-utils
|
|
|
-BuildRequires: maven2
|
|
|
-BuildRequires: maven2-plugin-compiler
|
|
|
-BuildRequires: maven2-plugin-install
|
|
|
-BuildRequires: maven2-plugin-jar
|
|
|
-BuildRequires: maven2-plugin-javadoc
|
|
|
-BuildRequires: maven2-plugin-release
|
|
|
-BuildRequires: maven2-plugin-resources
|
|
|
-BuildRequires: maven2-plugin-surefire
|
|
|
-BuildRequires: maven2-plugin-antrun
|
|
|
-Requires: java
|
|
|
-Requires: jpackage-utils
|
|
|
-Requires(post): jpackage-utils
|
|
|
-Requires(postun): jpackage-utils
|
|
|
-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: jpackage-utils
|
|
|
-Requires: %{name}-java = %{version}-%{release}
|
|
|
-
|
|
|
-%description javadoc
|
|
|
-This package contains the API documentation for %{name}-java.
|
|
|
-%endif
|
|
|
+
|
|
|
+%debug_package
|
|
|
|
|
|
|
|
|
%prep
|
|
|
-%setup -q
|
|
|
-%patch0 -p1 -b .emacs
|
|
|
-%if !%{without_gtest}
|
|
|
-rm -rf gtest
|
|
|
+%setup -q -a 3
|
|
|
+%ifarch %{ix86}
|
|
|
+# IoTest.LargeOutput fails on 32bit arches
|
|
|
+# https://github.com/protocolbuffers/protobuf/issues/8082
|
|
|
%patch1 -p1
|
|
|
%endif
|
|
|
+mv googletest-release-%{gtest_version}/* third_party/googletest/
|
|
|
+find -name \*.cc -o -name \*.h | xargs chmod -x
|
|
|
chmod 644 examples/*
|
|
|
-%if %{with_java}
|
|
|
-%patch2
|
|
|
-rm -rf java/src/test
|
|
|
-%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 \
|
|
|
%if %{with_static}
|
|
|
--enable-static
|
|
@@ -200,73 +178,46 @@ export PTHREAD_LIBS="-lpthread"
|
|
|
--disable-static
|
|
|
%endif
|
|
|
|
|
|
-make %{?_smp_mflags}
|
|
|
+# -Wno-error=type-limits:
|
|
|
+# https://bugzilla.redhat.com/show_bug.cgi?id=1838470
|
|
|
+# https://github.com/protocolbuffers/protobuf/issues/7514
|
|
|
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95148
|
|
|
+# (also set in %%check)
|
|
|
+%make_build CXXFLAGS="%{build_cxxflags} -Wno-error=type-limits"
|
|
|
|
|
|
%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
|
|
|
-export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
|
|
|
-mkdir -p $MAVEN_REPO_LOCAL
|
|
|
-mvn-jpp -Dmaven.repo.local=$MAVEN_REPO_LOCAL install javadoc:javadoc
|
|
|
+%py3_build
|
|
|
popd
|
|
|
%endif
|
|
|
|
|
|
-%check
|
|
|
-make %{?_smp_mflags} check
|
|
|
|
|
|
%install
|
|
|
rm -rf %{buildroot}
|
|
|
-make %{?_smp_mflags} install DESTDIR=%{buildroot} STRIPBINARIES=no INSTALL="%{__install} -p" CPPROG="cp -p"
|
|
|
+%make_install %{?_smp_mflags} 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
|
|
|
+%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}
|
|
|
-pushd java
|
|
|
-install -d -m 755 %{buildroot}%{_javadir}
|
|
|
-install -pm 644 target/%{name}-java-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
|
|
|
-
|
|
|
-install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
|
|
-cp -rp target/site/apidocs %{buildroot}%{_javadocdir}/%{name}
|
|
|
-
|
|
|
-install -d -m 755 %{buildroot}%{_datadir}/maven2/poms
|
|
|
-install -pm 644 pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP-%{name}.pom
|
|
|
-%add_to_maven_depmap org.apache.maven %{name} %{version} JPP %{name}
|
|
|
|
|
|
+%if !%{without_gtest}
|
|
|
+%check
|
|
|
+%make_build check CXXFLAGS="%{build_cxxflags} -Wno-error=type-limits"
|
|
|
%endif
|
|
|
|
|
|
-%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
|
|
|
-
|
|
|
-%if %{with_java}
|
|
|
-%post java
|
|
|
-%update_maven_depmap
|
|
|
-
|
|
|
-%postun java
|
|
|
-%update_maven_depmap
|
|
|
-%endif
|
|
|
|
|
|
%clean
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
+
|
|
|
%files
|
|
|
%defattr(-, root, root, -)
|
|
|
%{_libdir}/libprotobuf.so.*
|
|
@@ -312,13 +263,13 @@ rm -rf %{buildroot}
|
|
|
%endif
|
|
|
|
|
|
%if %{with_python}
|
|
|
-%files python
|
|
|
+%files -n python3-%{name}
|
|
|
%defattr(-, root, root, -)
|
|
|
-%dir %{python_sitelib}/google
|
|
|
-%{python_sitelib}/google/protobuf/
|
|
|
-%{python_sitelib}/protobuf-%{version}-py*.egg-info/
|
|
|
-%{python_sitelib}/protobuf-%{version}-py*-nspkg.pth
|
|
|
-%doc python/README.txt
|
|
|
+%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
|
|
|
|
|
@@ -327,20 +278,15 @@ rm -rf %{buildroot}
|
|
|
%{_datadir}/vim/vimfiles/ftdetect/proto.vim
|
|
|
%{_datadir}/vim/vimfiles/syntax/proto.vim
|
|
|
|
|
|
-%if %{with_java}
|
|
|
-%files java
|
|
|
-%defattr(-, root, root, -)
|
|
|
-%{_datadir}/maven2/poms/JPP-protobuf.pom
|
|
|
-%{_mavendepmapfragdir}/protobuf
|
|
|
-%{_javadir}/*
|
|
|
-%doc examples/AddPerson.java examples/ListPeople.java
|
|
|
-
|
|
|
-%files javadoc
|
|
|
-%defattr(-, root, root, -)
|
|
|
-%{_javadocdir}/%{name}
|
|
|
-%endif
|
|
|
|
|
|
%changelog
|
|
|
+* Thu Sep 09 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.17.3-1
|
|
|
+- new upstream release.
|
|
|
+- dropped java stuff.
|
|
|
+- dropped ldconfig scriptlets.
|
|
|
+- dropped Patch0 and 1.
|
|
|
+- imported Patch1 from upstream.
|
|
|
+
|
|
|
* Thu Jun 30 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.6.1-1
|
|
|
- updated to 2.6.1.
|
|
|
|