2014-02-20 22:57:35 +01:00
|
|
|
#
|
|
|
|
# spec file for package thrift
|
|
|
|
#
|
2017-02-02 17:36:32 +01:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
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.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2013-09-25 16:04:58 +02:00
|
|
|
|
2017-06-14 09:22:10 +02:00
|
|
|
%define libversion 0_10_0
|
2016-04-16 23:40:18 +02:00
|
|
|
%define libname %{version}
|
2015-03-06 16:04:20 +01:00
|
|
|
%bcond_without perl
|
|
|
|
%bcond_without c
|
|
|
|
%bcond_without python
|
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
|
2014-02-20 22:57:35 +01:00
|
|
|
Name: thrift
|
2017-06-14 09:22:10 +02:00
|
|
|
Version: 0.10.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++
|
2015-03-03 23:11:19 +01:00
|
|
|
Url: https://thrift.apache.org
|
|
|
|
Source0: https://www.apache.org/dist/thrift/%{version}/%{name}-%{version}.tar.gz
|
|
|
|
Source1: https://www.apache.org/dist/thrift/%{version}/%{name}-%{version}.tar.gz.asc
|
|
|
|
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++
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: pkgconfig(libevent)
|
|
|
|
BuildRequires: pkgconfig(openssl)
|
2017-02-02 17:36:32 +01:00
|
|
|
%if 0%{?suse_version} > 1325
|
|
|
|
BuildRequires: libboost_headers-devel
|
|
|
|
%else
|
2014-02-20 22:57:35 +01:00
|
|
|
BuildRequires: boost-devel
|
2017-02-02 17:36:32 +01:00
|
|
|
%endif
|
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 python}
|
2017-06-14 09:22:10 +02:00
|
|
|
BuildRequires: pkgconfig(python2)
|
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
|
|
|
|
|
|
|
|
%description
|
|
|
|
Thrift is a software framework for scalable cross-language services
|
|
|
|
development. It combines a powerful software stack with a code generation
|
|
|
|
engine to build services that work efficiently and seamlessly between C++,
|
|
|
|
Java, C#, Python, Ruby, Perl, PHP, Objective C/Cocoa, Smalltalk, Erlang,
|
|
|
|
Objective Caml, and Haskell.
|
|
|
|
|
2015-03-03 23:11:19 +01:00
|
|
|
%package -n libthrift-%{libversion}
|
2014-02-20 22:57:35 +01:00
|
|
|
Summary: Thrift shared library
|
|
|
|
Group: System/Libraries
|
|
|
|
|
2015-03-03 23:11:19 +01:00
|
|
|
%description -n libthrift-%{libversion}
|
2013-09-25 16:04:58 +02:00
|
|
|
Thrift shared library
|
|
|
|
|
|
|
|
Thrift is a software framework for scalable cross-language services
|
|
|
|
development. It combines a powerful software stack with a code generation
|
|
|
|
engine to build services that work efficiently and seamlessly between C++,
|
|
|
|
Java, C#, Python, Ruby, Perl, PHP, Objective C/Cocoa, Smalltalk, Erlang,
|
|
|
|
Objective Caml, and Haskell.
|
|
|
|
|
2015-03-03 23:11:19 +01:00
|
|
|
%post -n libthrift-%{libversion} -p /sbin/ldconfig
|
|
|
|
%postun -n libthrift-%{libversion} -p /sbin/ldconfig
|
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}
|
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
|
|
|
|
development. It combines a powerful software stack with a code generation
|
|
|
|
engine to build services that work efficiently and seamlessly between C++,
|
|
|
|
Java, C#, Python, Ruby, Perl, PHP, Objective C/Cocoa, Smalltalk, Erlang,
|
|
|
|
Objective Caml, and Haskell.
|
|
|
|
|
|
|
|
%if %{with perl}
|
|
|
|
%package -n perl-thrift
|
2014-02-20 22:57:35 +01:00
|
|
|
Summary: Thrift perl library
|
|
|
|
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
|
|
|
|
Thrift perl library
|
|
|
|
|
|
|
|
Thrift is a software framework for scalable cross-language services
|
|
|
|
development. It combines a powerful software stack with a code generation
|
|
|
|
engine to build services that work efficiently and seamlessly between C++,
|
|
|
|
Java, C#, Python, Ruby, Perl, PHP, Objective C/Cocoa, Smalltalk, Erlang,
|
|
|
|
Objective Caml, and Haskell.
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{with python}
|
|
|
|
%package -n python-thrift
|
2014-02-20 22:57:35 +01:00
|
|
|
Summary: Thrift python library
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
|
2013-09-25 16:04:58 +02:00
|
|
|
%description -n python-thrift
|
|
|
|
Thrift python library
|
|
|
|
|
|
|
|
Thrift is a software framework for scalable cross-language services
|
|
|
|
development. It combines a powerful software stack with a code generation
|
|
|
|
engine to build services that work efficiently and seamlessly between C++,
|
|
|
|
Java, C#, Python, Ruby, Perl, PHP, Objective C/Cocoa, Smalltalk, Erlang,
|
|
|
|
Objective Caml, and Haskell.
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
2017-06-14 09:22:10 +02:00
|
|
|
%setup -q
|
2013-09-25 16:04:58 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
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
|
|
|
|
|
|
|
%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
|
|
|
|
|
|
|
|
%if %{with python}
|
|
|
|
pushd lib/py
|
2014-02-22 21:05:33 +01:00
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
|
|
%fdupes %{buildroot}%{python_sitearch}
|
2013-09-25 16:04:58 +02:00
|
|
|
popd
|
|
|
|
%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
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2015-03-03 23:11:19 +01:00
|
|
|
%doc CHANGES LICENSE NOTICE
|
2013-09-25 16:04:58 +02:00
|
|
|
%{_bindir}/thrift
|
|
|
|
|
2015-03-03 23:11:19 +01:00
|
|
|
%files -n libthrift-%{libversion}
|
2013-09-25 16:04:58 +02:00
|
|
|
%defattr(-,root,root)
|
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.*
|
|
|
|
%{_libdir}/libthriftc.so.*
|
2013-09-25 16:04:58 +02:00
|
|
|
|
|
|
|
%files -n libthrift-devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_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
|
|
|
|
%{_libdir}/libthriftc.so
|
2013-09-25 16:04:58 +02:00
|
|
|
%{_libdir}/pkgconfig/*.pc
|
|
|
|
|
|
|
|
%if %{with perl}
|
|
|
|
%files -n perl-thrift
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{perl_vendorlib}/Thrift.pm
|
2015-03-03 23:11:19 +01:00
|
|
|
%{perl_vendorlib}/Thrift
|
2013-09-25 16:04:58 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{with python}
|
|
|
|
%files -n python-thrift
|
|
|
|
%defattr(-,root,root)
|
2015-03-03 23:11:19 +01:00
|
|
|
%{py_sitedir}/*
|
|
|
|
%{python_sitearch}/*
|
2013-09-25 16:04:58 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%changelog
|