LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File thrift.spec of Package thrift (Project home:jblunck:messaging)

%bcond_with perl
%bcond_with python

Name: thrift
Version: 0.9.0
Release: 0
Group: Development/Libraries/C and C++
License: Apache License
Source0: %{name}-%{version}.tar.bz2
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
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++
BuildRequires: boost-devel
# 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: pkg-config
BuildRequires: openssl-devel
BuildRequires: libevent-devel

%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 libthrift0_9_0
Summary: Thrift shared library
Group: System/Libraries
%description -n libthrift0_9_0
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 libthrift0_9_0 -p /sbin/ldconfig
%postun -n libthrift0_9_0 -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
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 CONTRIBUTORS DISCLAIMER LICENSE NOTICE NEWS
%{_bindir}/thrift

%files -n libthrift0_9_0
%defattr(-,root,root)
%{_libdir}/*-0.9.0.so

%files -n libthrift-devel
%defattr(-,root,root)
#%dir %{_includedir}/thrift
%{_includedir}/thrift
%{_libdir}/*.a
%{_libdir}/*.la
%{_libdir}/*.so
%exclude %{_libdir}/*-0.9.0.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