Projects
home:pandora:RobinOS23
protobuf
_service:download_src_package:protobuf.spec
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:download_src_package:protobuf.spec of Package protobuf
%define anolis_release 1 %define googletest_ver 5ec7f0c4a113e2f18ac2c6cc7df51ad6afc24081 %bcond_without python %bcond_without java Name: protobuf Version: 3.19.4 Release: %{anolis_release}%{?dist} Summary: Protocol Buffers - Google's data interchange format License: BSD URL: https://github.com/protocolbuffers/protobuf Source0: https://github.com/protocolbuffers/protobuf/archive/refs/tags/%{name}-%{version}-all.tar.gz # For tests (using exactly the same version as the release) Source1: https://github.com/google/googletest/archive/%{googletest_ver}.zip Source2: ftdetect-proto.vim Source3: protobuf-init.el # https://bugzilla.redhat.com/show_bug.cgi?id=2051202 Patch1: protobuf-3.19.4-jre17-add-opens.patch BuildRequires: make BuildRequires: autoconf BuildRequires: automake BuildRequires: emacs emacs-common 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 python} %package -n python3-%{name} Summary: Python 3 bindings for Google Protocol Buffers BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-wheel Requires: python3-six >= 1.9 Conflicts: %{name}-compiler > %{version} Conflicts: %{name}-compiler < %{version} Provides: %{name}-python3 = %{version}-%{release} %{?python_provide:%python_provide python3-%{name}} %description -n python3-%{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 %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(com.google.guava:guava-testlib) BuildRequires: mvn(com.google.truth:truth) 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} Obsoletes: %{name}-javanano < 3.6.0 %description java This package contains Java Protocol Buffers runtime library. %package javalite Summary: Java Protocol Buffers lite runtime library BuildArch: noarch %description javalite This package contains Java Protocol Buffers lite 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 parent Summary: Protocol Buffer Parent POM BuildArch: noarch %description parent Protocol Buffer Parent POM. %package bom Summary: Protocol Buffer BOM POM BuildArch: noarch %description bom Protocol Buffer BOM POM. %endif %package emacs Summary: Emacs mode for Google Protocol Buffers descriptions BuildArch: noarch Requires: emacs-filesystem >= %{_emacs_version} Obsoletes: protobuf-emacs-el < 3.6.1-4 %description emacs This package contains syntax highlighting for Google Protocol Buffers descriptions in the Emacs editor. %prep %autosetup -n %{name}-%{version} -p1 -a 1 mv googletest-%{googletest_ver}/* third_party/googletest/ find -name \*.cc -o -name \*.h | xargs chmod -x chmod 644 examples/* %if %{with java} %pom_remove_dep com.google.errorprone:error_prone_annotations java/util/pom.xml %pom_remove_dep com.google.j2objc:j2objc-annotations java/util/pom.xml # Remove annotation libraries we don't have annotations=$( find -name '*.java' | xargs grep -h -e '^import com\.google\.errorprone\.annotation' \ -e '^import com\.google\.j2objc\.annotations' | sort -u | sed 's/.*\.\([^.]*\);/\1/' | paste -sd\| ) find -name '*.java' | xargs sed -ri \ "s/^import .*\.($annotations);//;s/@($annotations)"'\>\s*(\((("[^"]*")|([^)]*))\))?//g' # 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} %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 # -Wno-error=type-limits: # 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 %py3_build popd %endif %if %{with java} %pom_disable_module kotlin java/pom.xml %pom_disable_module kotlin-lite java/pom.xml %mvn_build -s -- -f java/pom.xml %endif %{_emacs_bytecompile} editors/protobuf-mode.el %install %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 %py3_install find %{buildroot}%{python3_sitelib} -name \*.py | xargs sed -i -e '1{\@^#!@d}' popd %endif install -p -m 644 -D %{SOURCE2} %{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 %{buildroot}%{_emacs_sitelispdir}/%{name} install -p -m 0644 editors/protobuf-mode.el %{buildroot}%{_emacs_sitelispdir}/%{name} install -p -m 0644 editors/protobuf-mode.elc %{buildroot}%{_emacs_sitelispdir}/%{name} mkdir -p %{buildroot}%{_emacs_sitestartdir} install -p -m 0644 %{SOURCE3} %{buildroot}%{_emacs_sitestartdir} %check fail=1 %make_build check CXXFLAGS="%{build_cxxflags} -Wno-error=type-limits" || exit $fail %ldconfig_scriptlets %ldconfig_scriptlets lite %ldconfig_scriptlets compiler %files %license LICENSE %doc CHANGES.txt CONTRIBUTORS.txt README.md %{_libdir}/libprotobuf.so.30* %files compiler %doc README.md %license LICENSE %{_bindir}/protoc %{_libdir}/libprotoc.so.30* %files devel %doc examples/add_person.cc examples/addressbook.proto %doc examples/list_people.cc examples/Makefile examples/README.md %dir %{_includedir}/google %{_includedir}/google/protobuf/ %{_libdir}/libprotobuf.so %{_libdir}/libprotoc.so %{_libdir}/pkgconfig/protobuf.pc %files emacs %{_emacs_sitelispdir}/%{name}/ %{_emacs_sitestartdir}/protobuf-init.el %files static %{_libdir}/libprotobuf.a %{_libdir}/libprotoc.a %files lite %{_libdir}/libprotobuf-lite.so.30* %files lite-devel %{_libdir}/libprotobuf-lite.so %{_libdir}/pkgconfig/protobuf-lite.pc %files lite-static %{_libdir}/libprotobuf-lite.a %if %{with python} %files -n python3-protobuf %doc python/README.md %doc examples/add_person.py examples/list_people.py examples/addressbook.proto %dir %{python3_sitelib}/google %{python3_sitelib}/google/protobuf/ %{python3_sitelib}/protobuf-%{version}%{?rcver}-py3.*.egg-info/ %{python3_sitelib}/protobuf-%{version}%{?rcver}-py3.*-nspkg.pth %endif %files vim %{_datadir}/vim/vimfiles/ftdetect/proto.vim %{_datadir}/vim/vimfiles/syntax/proto.vim %if %{with java} %files java -f .mfiles-protobuf-java %license LICENSE %doc examples/AddPerson.java examples/ListPeople.java %doc java/README.md %files java-util -f .mfiles-protobuf-java-util %files javadoc -f .mfiles-javadoc %license LICENSE %files parent -f .mfiles-protobuf-parent %license LICENSE %files bom -f .mfiles-protobuf-bom %license LICENSE %files javalite -f .mfiles-protobuf-javalite %license LICENSE %endif %changelog * Wed Apr 27 2022 happy_orange <songnannan@linux.alibaba.com> - 3.19.4-1 - init from upstream
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2