2014-02-20 22:57:35 +01:00
|
|
|
#
|
|
|
|
# spec file for package thrift
|
|
|
|
#
|
2023-12-29 19:12:14 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2014-02-20 22:57:35 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-04-10 13:02:16 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-02-20 22:57:35 +01:00
|
|
|
#
|
|
|
|
|
2013-09-25 16:04:58 +02:00
|
|
|
|
2022-12-05 18:35:12 +01:00
|
|
|
%global libversion 0_17_0
|
2022-06-14 12:40:45 +02:00
|
|
|
%global libgversion 0
|
2015-03-06 16:04:20 +01:00
|
|
|
%bcond_without perl
|
|
|
|
%bcond_without c
|
2017-11-10 14:53:44 +01:00
|
|
|
%bcond_without python2
|
|
|
|
%bcond_without python3
|
2014-02-22 21:05:33 +01:00
|
|
|
%bcond_with java
|
|
|
|
%bcond_with ruby
|
2017-06-17 19:33:22 +02:00
|
|
|
%bcond_with qt5
|
2019-04-10 13:02:16 +02:00
|
|
|
%define skip_python2 1
|
|
|
|
%if %{without python3}
|
|
|
|
%define skip_python3 1
|
|
|
|
%endif
|
2014-02-20 22:57:35 +01:00
|
|
|
Name: thrift
|
2022-12-05 18:35:12 +01:00
|
|
|
Version: 0.17.0
|
2014-02-22 21:05:33 +01:00
|
|
|
Release: 0
|
2016-04-16 23:40:18 +02:00
|
|
|
Summary: Framework for scalable cross-language services development
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Libraries/C and C++
|
2019-04-10 13:35:29 +02:00
|
|
|
URL: https://thrift.apache.org
|
2023-12-29 19:12:14 +01:00
|
|
|
Source0: https://archive.apache.org/dist/%{name}/%{version}/%{name}-%{version}.tar.gz
|
|
|
|
Source1: https://archive.apache.org/dist/%{name}/%{version}/%{name}-%{version}.tar.gz.asc
|
2015-03-03 23:11:19 +01:00
|
|
|
Source2: %{name}.keyring
|
2016-04-16 23:40:18 +02:00
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: bison
|
2017-06-14 09:22:10 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: flex
|
|
|
|
BuildRequires: gcc-c++
|
2019-04-15 15:53:45 +02:00
|
|
|
BuildRequires: libboost_headers-devel
|
2017-06-14 09:22:10 +02:00
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: pkgconfig(libevent)
|
|
|
|
BuildRequires: pkgconfig(openssl)
|
2019-09-14 09:27:01 +02:00
|
|
|
BuildRequires: pkgconfig(zlib)
|
2017-06-14 09:22:10 +02:00
|
|
|
%if %{with qt5}
|
|
|
|
BuildRequires: pkgconfig(Qt5Core)
|
|
|
|
BuildRequires: pkgconfig(Qt5Network)
|
2014-02-22 21:05:33 +01:00
|
|
|
%endif
|
|
|
|
%if %{with c}
|
2017-06-14 09:22:10 +02:00
|
|
|
BuildRequires: pkgconfig(glib-2.0)
|
2014-02-22 21:05:33 +01:00
|
|
|
%endif
|
|
|
|
%if %{with java}
|
2016-04-16 23:40:18 +02:00
|
|
|
BuildRequires: ant
|
2014-02-22 21:05:33 +01:00
|
|
|
BuildRequires: java-devel
|
|
|
|
%endif
|
|
|
|
%if %{with ruby}
|
|
|
|
BuildRequires: ruby-devel
|
2016-04-16 23:40:18 +02:00
|
|
|
BuildRequires: rubygem(bundler)
|
2014-02-22 21:05:33 +01:00
|
|
|
%endif
|
2013-09-25 16:04:58 +02:00
|
|
|
%if %{with perl}
|
2014-02-20 22:57:35 +01:00
|
|
|
BuildRequires: perl
|
2014-02-22 21:05:33 +01:00
|
|
|
BuildRequires: perl(Bit::Vector)
|
2015-03-03 23:11:19 +01:00
|
|
|
BuildRequires: perl(Class::Accessor)
|
2013-09-25 16:04:58 +02:00
|
|
|
%endif
|
2022-06-14 12:40:45 +02:00
|
|
|
%if %{with python3}
|
2021-01-04 10:03:51 +01:00
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
BuildRequires: python-rpm-macros
|
2022-01-17 08:34:36 +01:00
|
|
|
%if 0%{?suse_version} >= 1550
|
|
|
|
# if python multiflavor is available, use it to generate subpackages
|
2021-01-04 10:03:51 +01:00
|
|
|
%define python_subpackage_only 1
|
|
|
|
%python_subpackages
|
|
|
|
%else
|
|
|
|
%define python_sitearch %python3_sitearch
|
|
|
|
%define python_files() -n python3-%{**}
|
|
|
|
%endif
|
|
|
|
%endif
|
2013-09-25 16:04:58 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
Thrift is a software framework for scalable cross-language services
|
2019-04-16 09:17:51 +02:00
|
|
|
development. It combines a software stack with a code generation
|
|
|
|
engine to build services that work between C++, Java, C#, Python,
|
|
|
|
Ruby, Perl, PHP, Objective C/Cocoa, Smalltalk, Erlang, Objective
|
|
|
|
Caml, and Haskell.
|
2013-09-25 16:04:58 +02:00
|
|
|
|
2015-03-03 23:11:19 +01:00
|
|
|
%package -n libthrift-%{libversion}
|
2019-04-16 09:17:51 +02:00
|
|
|
Summary: C++ API for the Thrift software framework
|
2014-02-20 22:57:35 +01:00
|
|
|
Group: System/Libraries
|
|
|
|
|
2015-03-03 23:11:19 +01:00
|
|
|
%description -n libthrift-%{libversion}
|
2019-04-16 09:17:51 +02:00
|
|
|
Shared library providing the C++ API for the Thrift software framework.
|
2013-09-25 16:04:58 +02:00
|
|
|
|
|
|
|
Thrift is a software framework for scalable cross-language services
|
2019-04-16 09:17:51 +02:00
|
|
|
development. It combines a software stack with a code generation
|
|
|
|
engine to build services that work between C++, Java, C#, Python,
|
|
|
|
Ruby, Perl, PHP, Objective C/Cocoa, Smalltalk, Erlang, Objective
|
|
|
|
Caml, and Haskell.
|
2013-09-25 16:04:58 +02:00
|
|
|
|
2019-04-15 15:53:45 +02:00
|
|
|
%package -n libthriftnb-%{libversion}
|
2019-04-16 09:17:51 +02:00
|
|
|
Summary: Thrift non-blocking server library
|
2019-04-15 15:53:45 +02:00
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n libthriftnb-%{libversion}
|
2019-04-16 09:17:51 +02:00
|
|
|
Shared library providing the non-blocking server component of the
|
|
|
|
Thrift software framework.
|
2019-04-15 15:53:45 +02:00
|
|
|
|
|
|
|
%package -n libthriftz-%{libversion}
|
2019-04-16 09:17:51 +02:00
|
|
|
Summary: Thrift Zlib API
|
2019-04-15 15:53:45 +02:00
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n libthriftz-%{libversion}
|
2019-04-16 09:17:51 +02:00
|
|
|
A shared library from the Thrift software framework.
|
2019-04-15 15:53:45 +02:00
|
|
|
|
|
|
|
%package -n libthrift_c_glib%{libgversion}
|
2019-04-16 09:17:51 +02:00
|
|
|
Summary: C API for the Thrift software framework
|
2019-04-15 15:53:45 +02:00
|
|
|
Group: System/Libraries
|
|
|
|
Conflicts: libthrift-0_11_0
|
|
|
|
|
|
|
|
%description -n libthrift_c_glib%{libgversion}
|
2019-04-16 09:17:51 +02:00
|
|
|
Shared library providing the C API for the Thrift software framework.
|
2013-09-25 16:04:58 +02:00
|
|
|
|
|
|
|
%package -n libthrift-devel
|
2014-02-20 22:57:35 +01:00
|
|
|
Summary: Thrift C++ library development files
|
2017-06-14 09:22:10 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2015-03-03 23:11:19 +01:00
|
|
|
Requires: libthrift-%{libversion} = %{version}
|
2019-04-15 15:53:45 +02:00
|
|
|
Requires: libthrift_c_glib%{libgversion} = %{version}
|
|
|
|
Requires: libthriftnb-%{libversion} = %{version}
|
|
|
|
Requires: libthriftz-%{libversion} = %{version}
|
2014-02-20 22:57:35 +01:00
|
|
|
|
2013-09-25 16:04:58 +02:00
|
|
|
%description -n libthrift-devel
|
|
|
|
Thrift C++ library development files
|
|
|
|
|
|
|
|
Thrift is a software framework for scalable cross-language services
|
2019-04-16 09:17:51 +02:00
|
|
|
development. It combines a software stack with a code generation
|
|
|
|
engine to build services that work between C++, Java, C#, Python,
|
|
|
|
Ruby, Perl, PHP, Objective C/Cocoa, Smalltalk, Erlang, Objective
|
|
|
|
Caml, and Haskell.
|
2013-09-25 16:04:58 +02:00
|
|
|
|
|
|
|
%package -n perl-thrift
|
2019-04-16 09:17:51 +02:00
|
|
|
Summary: Perl bindings to the Thrift software framework
|
2014-02-20 22:57:35 +01:00
|
|
|
Group: Development/Libraries/Perl
|
2015-03-03 23:11:19 +01:00
|
|
|
%{perl_requires}
|
2014-02-20 22:57:35 +01:00
|
|
|
|
2013-09-25 16:04:58 +02:00
|
|
|
%description -n perl-thrift
|
2019-04-16 09:17:51 +02:00
|
|
|
Thrift Perl library
|
2013-09-25 16:04:58 +02:00
|
|
|
|
|
|
|
Thrift is a software framework for scalable cross-language services
|
2019-04-16 09:17:51 +02:00
|
|
|
development. It combines a software stack with a code generation
|
|
|
|
engine to build services that work between C++, Java, C#, Python,
|
|
|
|
Ruby, Perl, PHP, Objective C/Cocoa, Smalltalk, Erlang, Objective
|
|
|
|
Caml, and Haskell.
|
2013-09-25 16:04:58 +02:00
|
|
|
|
2019-04-10 13:02:16 +02:00
|
|
|
%define oldpython python
|
2019-04-10 13:35:29 +02:00
|
|
|
|
2021-01-04 10:03:51 +01:00
|
|
|
%if 0%{?python_subpackage_only}
|
|
|
|
%package -n python-thrift
|
|
|
|
Summary: Python %{python_version} bindings for the Thrift software framework
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
Requires: python-six >= 1.7.2
|
|
|
|
Suggests: python-Twisted
|
|
|
|
Suggests: python-tornado >= 4.0
|
|
|
|
%if %{python_version_nodots} <= 34 && %{python_version_nodots} > 30
|
|
|
|
Recommends: python-backports.ssl_match_hostname >= 3.5
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description -n python-thrift
|
|
|
|
Thrift Python %{python_version} library
|
|
|
|
|
|
|
|
Thrift is a software framework for scalable cross-language services
|
|
|
|
development. It combines a software stack with a code generation
|
|
|
|
engine to build services that work between C++, Java, C#, Python,
|
|
|
|
Ruby, Perl, PHP, Objective C/Cocoa, Smalltalk, Erlang, Objective
|
|
|
|
Caml, and Haskell.
|
|
|
|
|
|
|
|
%else
|
2022-01-17 08:34:36 +01:00
|
|
|
|
2017-11-10 14:53:44 +01:00
|
|
|
%package -n python3-thrift
|
2019-04-16 09:17:51 +02:00
|
|
|
Summary: Python3 bindings for the Thrift software framework
|
2017-11-10 14:53:44 +01:00
|
|
|
Group: Development/Libraries/Python
|
2020-03-04 14:51:27 +01:00
|
|
|
Requires: python3-six >= 1.7.2
|
|
|
|
Suggests: python3-Twisted
|
|
|
|
Suggests: python3-tornado >= 4.0
|
2020-03-04 20:29:05 +01:00
|
|
|
%if %{python3_version_nodots} <= 34
|
2020-03-04 14:51:27 +01:00
|
|
|
Recommends: python3-backports.ssl_match_hostname >= 3.5
|
2019-04-10 13:02:16 +02:00
|
|
|
%endif
|
2017-11-10 14:53:44 +01:00
|
|
|
|
|
|
|
%description -n python3-thrift
|
2019-04-16 09:17:51 +02:00
|
|
|
Thrift Python3 library
|
2013-09-25 16:04:58 +02:00
|
|
|
|
|
|
|
Thrift is a software framework for scalable cross-language services
|
2019-04-16 09:17:51 +02:00
|
|
|
development. It combines a software stack with a code generation
|
|
|
|
engine to build services that work between C++, Java, C#, Python,
|
|
|
|
Ruby, Perl, PHP, Objective C/Cocoa, Smalltalk, Erlang, Objective
|
|
|
|
Caml, and Haskell.
|
2021-01-04 10:03:51 +01:00
|
|
|
%endif
|
2013-09-25 16:04:58 +02:00
|
|
|
|
|
|
|
%prep
|
2022-01-17 08:34:36 +01:00
|
|
|
%autosetup -p1
|
2013-09-25 16:04:58 +02:00
|
|
|
|
|
|
|
%build
|
2022-06-14 12:40:45 +02:00
|
|
|
# https://issues.apache.org/jira/browse/THRIFT-5498
|
|
|
|
%global _lto_cflags %{nil}
|
2013-09-25 16:04:58 +02:00
|
|
|
export CXXFLAGS="%{optflags} -fPIC"
|
2015-03-03 23:11:19 +01:00
|
|
|
|
|
|
|
# tests require static boost library
|
|
|
|
%configure \
|
|
|
|
--disable-tests \
|
|
|
|
--enable-static=no
|
2017-06-14 09:22:10 +02:00
|
|
|
make %{?_smp_mflags}
|
2013-09-25 16:04:58 +02:00
|
|
|
|
2022-06-14 12:40:45 +02:00
|
|
|
%if %{with python3}
|
2019-04-10 13:02:16 +02:00
|
|
|
pushd lib/py
|
|
|
|
%python_build
|
|
|
|
popd
|
2021-01-04 10:03:51 +01:00
|
|
|
%endif
|
2019-04-10 13:02:16 +02:00
|
|
|
|
2013-09-25 16:04:58 +02:00
|
|
|
%install
|
2017-06-14 09:22:10 +02:00
|
|
|
%make_install
|
2013-09-25 16:04:58 +02:00
|
|
|
pushd compiler/cpp
|
2015-03-03 23:11:19 +01:00
|
|
|
%make_install
|
2013-09-25 16:04:58 +02:00
|
|
|
popd
|
|
|
|
pushd lib/cpp
|
2015-03-03 23:11:19 +01:00
|
|
|
%make_install
|
2013-09-25 16:04:58 +02:00
|
|
|
popd
|
|
|
|
|
2022-06-14 12:40:45 +02:00
|
|
|
%if %{with python3}
|
2017-11-10 14:53:44 +01:00
|
|
|
pushd lib/py
|
2019-04-10 13:02:16 +02:00
|
|
|
%python_install
|
2017-11-10 14:53:44 +01:00
|
|
|
popd
|
2021-01-04 10:03:51 +01:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
2013-09-25 16:04:58 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{with perl}
|
|
|
|
pushd lib/perl
|
|
|
|
perl Makefile.PL
|
|
|
|
%perl_make_install
|
|
|
|
%perl_process_packlist
|
2017-06-14 09:22:10 +02:00
|
|
|
mv %{buildroot}%{_prefix}/local/lib/perl5 \
|
|
|
|
%{buildroot}%{_perl_vendorlib}
|
2013-09-25 16:04:58 +02:00
|
|
|
popd
|
|
|
|
%endif
|
|
|
|
|
2017-06-14 09:22:10 +02:00
|
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
2013-09-25 16:04:58 +02:00
|
|
|
|
2019-04-15 15:53:45 +02:00
|
|
|
%post -n libthrift-%{libversion} -p /sbin/ldconfig
|
|
|
|
%post -n libthriftnb-%{libversion} -p /sbin/ldconfig
|
|
|
|
%post -n libthriftz-%{libversion} -p /sbin/ldconfig
|
|
|
|
%post -n libthrift_c_glib%{libgversion} -p /sbin/ldconfig
|
|
|
|
%postun -n libthrift-%{libversion} -p /sbin/ldconfig
|
|
|
|
%postun -n libthriftnb-%{libversion} -p /sbin/ldconfig
|
|
|
|
%postun -n libthriftz-%{libversion} -p /sbin/ldconfig
|
|
|
|
%postun -n libthrift_c_glib%{libgversion} -p /sbin/ldconfig
|
|
|
|
|
2013-09-25 16:04:58 +02:00
|
|
|
%files
|
2020-03-06 15:41:05 +01:00
|
|
|
%doc CHANGES.md
|
2019-04-10 13:02:16 +02:00
|
|
|
%license LICENSE NOTICE
|
2013-09-25 16:04:58 +02:00
|
|
|
%{_bindir}/thrift
|
|
|
|
|
2015-03-03 23:11:19 +01:00
|
|
|
%files -n libthrift-%{libversion}
|
|
|
|
%{_libdir}/libthrift-*.so
|
2019-04-15 15:53:45 +02:00
|
|
|
|
|
|
|
%files -n libthriftnb-%{libversion}
|
2015-03-03 23:11:19 +01:00
|
|
|
%{_libdir}/libthriftnb-*.so
|
2019-04-15 15:53:45 +02:00
|
|
|
|
|
|
|
%files -n libthriftz-%{libversion}
|
2015-03-03 23:11:19 +01:00
|
|
|
%{_libdir}/libthriftz-*.so
|
2019-04-15 15:53:45 +02:00
|
|
|
|
|
|
|
%files -n libthrift_c_glib%{libgversion}
|
2017-06-14 09:22:10 +02:00
|
|
|
%{_libdir}/libthrift_c_glib.so.*
|
2013-09-25 16:04:58 +02:00
|
|
|
|
|
|
|
%files -n libthrift-devel
|
|
|
|
%{_includedir}/thrift
|
2015-03-03 23:11:19 +01:00
|
|
|
%{_libdir}/libthrift.so
|
|
|
|
%{_libdir}/libthriftnb.so
|
|
|
|
%{_libdir}/libthriftz.so
|
2017-06-14 09:22:10 +02:00
|
|
|
%{_libdir}/libthrift_c_glib.so
|
2013-09-25 16:04:58 +02:00
|
|
|
%{_libdir}/pkgconfig/*.pc
|
|
|
|
|
|
|
|
%if %{with perl}
|
|
|
|
%files -n perl-thrift
|
2019-04-10 13:02:16 +02:00
|
|
|
%license LICENSE NOTICE
|
|
|
|
%doc lib/perl/README.md
|
2013-09-25 16:04:58 +02:00
|
|
|
%{perl_vendorlib}/Thrift.pm
|
2015-03-03 23:11:19 +01:00
|
|
|
%{perl_vendorlib}/Thrift
|
2013-09-25 16:04:58 +02:00
|
|
|
%endif
|
|
|
|
|
2022-06-14 12:40:45 +02:00
|
|
|
%if %{with python3}
|
2021-01-04 10:03:51 +01:00
|
|
|
%files %{python_files thrift}
|
2019-04-10 13:02:16 +02:00
|
|
|
%license LICENSE NOTICE
|
|
|
|
%doc lib/py/README.md
|
2021-01-04 10:03:51 +01:00
|
|
|
%{python_sitearch}/thrift
|
|
|
|
%{python_sitearch}/thrift-%{version}*-info
|
2017-11-10 14:53:44 +01:00
|
|
|
%endif
|
|
|
|
|
2013-09-25 16:04:58 +02:00
|
|
|
%changelog
|