forked from pool/thrift
195 lines
5.2 KiB
RPMSpec
195 lines
5.2 KiB
RPMSpec
#
|
|
# spec file for package thrift
|
|
#
|
|
# Copyright (c) 2014 SUSE LINUX Products 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/
|
|
#
|
|
|
|
|
|
%bcond_with perl
|
|
%bcond_with python
|
|
|
|
Name: thrift
|
|
Version: 0.9.1
|
|
%define libversion 0_9_1
|
|
%define libname %{version}
|
|
Release: 0
|
|
Source: http://apache.openmirror.de/thrift/0.9.1/%{name}-%{version}.tar.gz
|
|
Patch1: 0001-Add-missing-limits-header.patch
|
|
Patch2: 0002-TNonblockingServer-TLibEventTransport.patch
|
|
Patch3: 0003-TDenseProtocol.patch
|
|
Summary: Framework for scalable cross-language services development in C++, Java, Python, PHP, and Ruby
|
|
License: Apache-2.0
|
|
Group: Development/Libraries/C and C++
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: boost-devel
|
|
BuildRequires: gcc-c++
|
|
# we build the gem separately
|
|
#BuildRequires: ruby-devel
|
|
#BuildRequires: java-devel
|
|
|
|
#%if %{with python}
|
|
BuildRequires: python-devel
|
|
#%endif
|
|
|
|
%if %{with perl}
|
|
BuildRequires: perl
|
|
%endif
|
|
|
|
BuildRequires: bison
|
|
BuildRequires: flex
|
|
BuildRequires: libevent-devel
|
|
BuildRequires: openssl-devel
|
|
BuildRequires: pkg-config
|
|
|
|
%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
|
|
|
|
%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
|
|
|
|
%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
|
|
%patch1 -p1
|
|
%patch2 -p1
|
|
%patch3 -p1
|
|
|
|
%build
|
|
export CXXFLAGS="%{optflags} -fPIC"
|
|
export LDFLAGS="-Wl,--hash-style=sysv"
|
|
%{configure} --without-ruby
|
|
# ln -s fixes 0.9.1 build, should not be requires later
|
|
ln -s . test/cpp/.libs
|
|
make -j1
|
|
#%{?jobs:-j%jobs}
|
|
|
|
%install
|
|
pushd compiler/cpp
|
|
%makeinstall
|
|
popd
|
|
pushd lib/cpp
|
|
%makeinstall
|
|
popd
|
|
|
|
%if %{with python}
|
|
pushd lib/py
|
|
%makeinstall
|
|
popd
|
|
%endif
|
|
|
|
%if %{with perl}
|
|
pushd lib/perl
|
|
perl Makefile.PL
|
|
%perl_make_install
|
|
%perl_process_packlist
|
|
rm -rf %{buildroot}%{perl_vendorarch}/auto
|
|
popd
|
|
%endif
|
|
|
|
%clean
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc CHANGES LICENSE NOTICE README
|
|
%{_bindir}/thrift
|
|
|
|
%files -n libthrift%{libversion}
|
|
%defattr(-,root,root)
|
|
%{_libdir}/*-%{libname}.so
|
|
|
|
%files -n libthrift-devel
|
|
%defattr(-,root,root)
|
|
%{_includedir}/thrift
|
|
%{_libdir}/*.a
|
|
%{_libdir}/*.la
|
|
%{_libdir}/*.so
|
|
%exclude %{_libdir}/*-%{libname}.so
|
|
%{_libdir}/pkgconfig/*.pc
|
|
|
|
%if %{with perl}
|
|
%files -n perl-thrift
|
|
%defattr(-,root,root)
|
|
%{perl_vendorlib}/Thrift
|
|
%{perl_vendorlib}/Thrift.pm
|
|
/var/adm/perl-modules/thrift
|
|
%endif
|
|
|
|
%if %{with python}
|
|
%files -n python-thrift
|
|
%defattr(-,root,root)
|
|
%{py_sitedir}/*
|
|
%endif
|
|
|
|
%changelog
|