Rev 30 | Blame | Compare with Previous | Last modification | View Log | RSS feed
## Licensed to the Apache Software Foundation (ASF) under one# or more contributor license agreements. See the NOTICE file# distributed with this work for additional information# regarding copyright ownership. The ASF licenses this file# to you under the Apache License, Version 2.0 (the# "License"); you may not use this file except in compliance# with the License. You may obtain a copy of the License at## http://www.apache.org/licenses/LICENSE-2.0## Unless required by applicable law or agreed to in writing,# software distributed under the License is distributed on an# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY# KIND, either express or implied. See the License for the# specific language governing permissions and limitations# under the License.## TODO(dreiss): Have a Python build with and without the extension.%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}# TODO(dreiss): Where is this supposed to go?%{!?thrift_erlang_root: %define thrift_erlang_root /opt/thrift-erl}Name: thriftLicense: Apache License v2.0Group: DevelopmentSummary: RPC and serialization frameworkVersion: 20080529svnEpoch: 1Release: 1URL: http://developers.facebook.com/thriftPackager: David Reiss <dreiss@facebook.com>Source0: %{name}-%{version}.tar.gzBuildRequires: gcc >= 3.4.6BuildRequires: gcc-c++# TODO(dreiss): Can these be moved into the individual packages?%if %{!?without_java: 1}BuildRequires: java-devel >= 0:1.5.0BuildRequires: ant >= 0:1.6.5%endif%if %{!?without_python: 1}BuildRequires: python-devel%endif%if %{!?without_erlang: 1}BuildRequires: erlang%endifBuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)%descriptionThrift is a software framework for scalable cross-language servicesdevelopment. It combines a powerful software stack with a code generationengine 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.%files%defattr(-,root,root)%{_bindir}/thrift%package lib-cppSummary: Thrift C++ libraryGroup: Libraries%description lib-cppC++ libraries for Thrift.%files lib-cpp%defattr(-,root,root)%{_libdir}/libthrift*.so.*%package lib-cpp-develSummary: Thrift C++ library development filesGroup: LibrariesRequires: %{name} = %{version}-%{release}Requires: boost-devel%if %{!?without_libevent: 1}Requires: libevent-devel >= 1.2%endif%if %{!?without_zlib: 1}Requires: zlib-devel%endif%description lib-cpp-develC++ static libraries and headers for Thrift.%files lib-cpp-devel%defattr(-,root,root)%{_includedir}/thrift/%{_libdir}/libthrift*.*a%{_libdir}/libthrift*.so%{_libdir}/pkgconfig/thrift*.pc%if %{!?without_java: 1}%package lib-javaSummary: Thrift Java libraryGroup: LibrariesRequires: java >= 0:1.5.0%description lib-javaJava libraries for Thrift.%files lib-java%defattr(-,root,root)%{_javadir}/*%endif%if %{!?without_python: 1}%package lib-pythonSummary: Thrift Python libraryGroup: Libraries%description lib-pythonPython libraries for Thrift.%files lib-python%defattr(-,root,root)%{python_sitearch}/*%endif%if %{!?without_erlang: 1}%package lib-erlangSummary: Thrift Python libraryGroup: LibrariesRequires: erlang%description lib-erlangErlang libraries for Thrift.%files lib-erlang%defattr(-,root,root)%{thrift_erlang_root}%endif%prep%setup -q%build# TODO(dreiss): Implement a single --without-build-kludges.%configure \%{?without_libevent: --without-libevent } \%{?without_zlib: --without-zlib } \--without-java \--without-csharp \--without-py \--without-erlang \make%if %{!?without_java: 1}cd lib/java%antcd ../..%endif%if %{!?without_python: 1}cd lib/pyCFLAGS="%{optflags}" %{__python} setup.py buildcd ../..%endif%if %{!?without_erlang: 1}cd lib/erlmakecd ../..%endif%install%makeinstall%if %{!?without_java: 1}mkdir -p $RPM_BUILD_ROOT%{_javadir}cp -p lib/java/*.jar $RPM_BUILD_ROOT%{_javadir}%endif%if %{!?without_python: 1}cd lib/py%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOTcd ../..%endif%if %{!?without_erlang: 1}mkdir -p ${RPM_BUILD_ROOT}%{thrift_erlang_root}cp -r lib/erl/ebin ${RPM_BUILD_ROOT}%{thrift_erlang_root}%endif%cleanrm -rf ${RPM_BUILD_ROOT}%changelog* Wed May 28 2008 David Reiss <dreiss@facebook.com> - 20080529svn- Initial build, based on the work of Kevin Smith and Ben Maurer.