SHA256
1
0
forked from pool/thrift
thrift/thrift.spec
Martin Pluskal 82f128d752 - Update to version 0.10.0:
* lots of changes, see provided CHANGES for details
  * fixes building with recent openss (boo#1042675)
- Switch from qt4 to qt5

OBS-URL: https://build.opensuse.org/package/show/devel:tools/thrift?expand=0&rev=15
2017-06-14 07:22:10 +00:00

223 lines
6.0 KiB
RPMSpec

#
# spec file for package thrift
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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/
#
%define libversion 0_10_0
%define libname %{version}
%bcond_without perl
%bcond_without c
%bcond_without python
%bcond_with java
%bcond_with ruby
%bcond_without qt5
Name: thrift
Version: 0.10.0
Release: 0
Summary: Framework for scalable cross-language services development
License: Apache-2.0
Group: Development/Libraries/C and C++
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
BuildRequires: automake
BuildRequires: bison
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libevent)
BuildRequires: pkgconfig(openssl)
%if 0%{?suse_version} > 1325
BuildRequires: libboost_headers-devel
%else
BuildRequires: boost-devel
%endif
%if %{with qt5}
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Network)
%endif
%if %{with python}
BuildRequires: pkgconfig(python2)
%endif
%if %{with c}
BuildRequires: pkgconfig(glib-2.0)
%endif
%if %{with java}
BuildRequires: ant
BuildRequires: java-devel
%endif
%if %{with ruby}
BuildRequires: ruby-devel
BuildRequires: rubygem(bundler)
%endif
%if %{with perl}
BuildRequires: perl
BuildRequires: perl(Bit::Vector)
BuildRequires: perl(Class::Accessor)
%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.
%package -n libthrift-%{libversion}
Summary: Thrift shared library
Group: System/Libraries
%description -n libthrift-%{libversion}
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.
%post -n libthrift-%{libversion} -p /sbin/ldconfig
%postun -n libthrift-%{libversion} -p /sbin/ldconfig
%package -n libthrift-devel
Summary: Thrift C++ library development files
Group: Development/Libraries/C and C++
Requires: libthrift-%{libversion} = %{version}
%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
Summary: Thrift perl library
Group: Development/Libraries/Perl
%{perl_requires}
%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
Summary: Thrift python library
Group: Development/Libraries/Python
%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
%setup -q
%build
export CXXFLAGS="%{optflags} -fPIC"
# tests require static boost library
%configure \
--disable-tests \
--enable-static=no
make %{?_smp_mflags}
%install
%make_install
pushd compiler/cpp
%make_install
popd
pushd lib/cpp
%make_install
popd
%if %{with python}
pushd lib/py
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%fdupes %{buildroot}%{python_sitearch}
popd
%endif
%if %{with perl}
pushd lib/perl
perl Makefile.PL
%perl_make_install
%perl_process_packlist
mv %{buildroot}%{_prefix}/local/lib/perl5 \
%{buildroot}%{_perl_vendorlib}
popd
%endif
find %{buildroot} -type f -name "*.la" -delete -print
%files
%defattr(-,root,root)
%doc CHANGES LICENSE NOTICE
%{_bindir}/thrift
%files -n libthrift-%{libversion}
%defattr(-,root,root)
%{_libdir}/libthrift-*.so
%{_libdir}/libthriftnb-*.so
%{_libdir}/libthriftqt5-*.so
%{_libdir}/libthriftz-*.so
%{_libdir}/libthrift_c_glib.so.*
%{_libdir}/libthriftc.so.*
%files -n libthrift-devel
%defattr(-,root,root)
%{_includedir}/thrift
%{_libdir}/libthrift.so
%{_libdir}/libthriftnb.so
%{_libdir}/libthriftqt5.so
%{_libdir}/libthriftz.so
%{_libdir}/libthrift_c_glib.so
%{_libdir}/libthriftc.so
%{_libdir}/pkgconfig/*.pc
%if %{with perl}
%files -n perl-thrift
%defattr(-,root,root)
%{perl_vendorlib}/Thrift.pm
%{perl_vendorlib}/Thrift
%endif
%if %{with python}
%files -n python-thrift
%defattr(-,root,root)
%{py_sitedir}/*
%{python_sitearch}/*
%endif
%changelog