Name: thrift Version: 0.7.0 Release: 1%{?dist} Summary: Multi-language RPC and serialization framework License: ASL 2.0 Url: http://thrift.apache.org/ Source0: http://www.apache.org/dist/thrift/%{version}/%{name}-%{version}.tar.gz Source1: http://repo1.maven.org/maven2/org/apache/thrift/lib%{name}/%{version}/lib%{name}-%{version}.pom # wget -O thrift-0.7.0-bootstrap.sh http://svn.apache.org/repos/asf/thrift/attic/tags/thrift-0.7.0/bootstrap.sh # wget -O thrift-0.7.0-cleanup.sh http://svn.apache.org/repos/asf/thrift/attic/tags/thrift-0.7.0/cleanup.sh Source2: %{name}-%{version}-bootstrap.sh Source3: %{name}-%{version}-cleanup.sh # add system java libraries # remove maven-ant-tasks references Patch0: %{name}-%{version}-build-xml.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: byacc BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: boost-devel BuildRequires: libtool BuildRequires: libevent-devel BuildRequires: openssl-devel BuildRequires: zlib-devel BuildRequires: glib2-devel # java stuff BuildRequires: java-devel BuildRequires: jpackage-utils BuildRequires: ant BuildRequires: apache-commons-codec BuildRequires: apache-commons-lang BuildRequires: apache-commons-logging BuildRequires: httpcomponents-client BuildRequires: httpcomponents-core BuildRequires: junit BuildRequires: log4j # BuildRequires: maven-ant-tasks BuildRequires: slf4j BuildRequires: tomcat-servlet-3.0-api # perl stuff BuildRequires: perl-devel BuildRequires: perl-Bit-Vector BuildRequires: python-devel BuildRequires: python-twisted-core # Building C# Library .......... : no # Building Ruby Library ........ : no # Building Haskell Library ..... : no # Building PHP Library ......... : no # Building Erlang Library ...... : no # Building Go Library .......... : no %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. This package contains the Thrift compiler that is used for translating from .thrift files (containing the definitions) to the language binding for the supported languages. %package -n java-lib%{name} Summary: Java bindings for the Apache Thrift RPC system Requires: apache-commons-lang Requires: apache-commons-logging Requires: httpcomponents-client Requires: slf4j Requires: tomcat-servlet-3.0-api Requires: jpackage-utils Requires: java BuildArch: noarch %description -n java-lib%{name} This package contains the Java bindings for Thrift. You will need the thrift tool (in the thrift-compiler package) to compile your definition to Java classes, and then the modules in this package will allow you to use those classes in your programs. %package -n java-lib%{name}-javadoc Summary: Javadoc for %{name} BuildArch: noarch %description -n java-lib%{name}-javadoc This package contains javadoc for java-lib%{name}. %package -n lib%{name} Summary: Thrift C++ library Requires: %{name} = %{version}-%{release} %description -n lib%{name} This package contains the run-time libraries needed for C++ applications. %package -n lib%{name}-devel Summary: Thrift C++ library (development headers) Requires: lib%{name} = %{version}-%{release} %description -n lib%{name}-devel This package contains the development libraries required for writing C++ applications. %package -n perl-%{name} Summary: Perl bindings for the Apache Thrift RPC system Requires: perl(Bit::Vector) Requires: perl(Encode) Requires: perl(HTTP::Request) Requires: perl(IO::Select) Requires: perl(IO::Socket::INET) Requires: perl(IO::String) Requires: perl(LWP::UserAgent) Requires: perl(POSIX) Requires: perl(base) Requires: perl(constant) Requires: perl(strict) Requires: perl(utf8) Requires: perl(warnings) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) BuildArch: noarch %description -n perl-%{name} This package contains the Perl bindings for Thrift. You will need the thrift tool (in the thrift-compiler package) to compile your definition to Perl classes, and then the modules in this package will allow you to use those classes in your programs. %package -n python-%{name} Summary: Python bindings for the Apache Thrift RPC system Requires: python-twisted-core %description -n python-%{name} This package contains the Python bindings for Thrift. You will need the thrift tool (in the thrift-compiler package) to compile your definition to Python classes, and then the modules in this package will allow you to use those classes in your programs. %prep %setup -q find -name "*.bat" -delete find -name "*.class" -delete find -name "*.dll" -delete find -name "*.exe" -delete find -name "*.jar" -delete find -name "*.jnilib" -delete find -name "*.so" -delete %patch0 -p0 sed -i 's|-Dinstall.javadoc.path=$(DESTDIR)$(docdir)/java|-Dinstall.javadoc.path=$(DESTDIR)%{_javadocdir}/%{name}|' lib/java/Makefile.* sed -i 's|${thrift.artifactid}-${version}|${thrift.artifactid}|' lib/java/build.xml # fix incomplete build directory mkdir -p lib/java/build cp -p %{SOURCE1} lib/java/build/libthrift-%{version}.pom cp -p %{SOURCE2} bootstrap.sh cp -p %{SOURCE3} cleanup.sh %build chmod 755 bootstrap.sh cleanup.sh sh ./bootstrap.sh export JAVA_HOME=%{_jvmdir}/java %configure \ --disable-static \ --without-csharp \ --without-erlang \ --without-perl \ --without-php \ --without-python \ --without-ruby \ --with-c_glib \ JAVA_PREFIX=%{_javadir} # dont build with jN > 1 make LIBS='-lrt -lpthread -lssl ' LDFLAGS='-lssl' -j1 ( cd lib/perl %{__perl} Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor make %{?_smp_mflags} ) ( cd lib/py CFLAGS="%{optflags}" %{__python} setup.py build ) %install make DESTDIR=%{buildroot} install ( cd lib/perl make install PREFIX=%{buildroot}%{_prefix} find %{buildroot} -type f -name .packlist -exec rm -f {} ';' find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';' rm -r %{buildroot}%{_libdir}/perl5 ) ( cd lib/py %{__python} setup.py install -O1 --skip-build --root %{buildroot} ) mkdir -p %{buildroot}%{_mavenpomdir} install -pm 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-lib%{name}.pom %add_maven_depmap JPP-lib%{name}.pom lib%{name}.jar rm -rf %{buildroot}%{_javadir}/lib*-javadoc.jar find %{buildroot} -name '*.la' -delete %files %{_bindir}/%{name} %doc CHANGES CONTRIBUTORS DISCLAIMER LICENSE NEWS NOTICE README %files -n java-lib%{name} %{_javadir}/lib%{name}.jar %{_mavenpomdir}/JPP-lib%{name}.pom %{_mavendepmapfragdir}/%{name} %doc LICENSE NOTICE %files -n java-lib%{name}-javadoc %{_javadocdir}/%{name} %doc LICENSE NOTICE %post -n lib%{name} -p /sbin/ldconfig %postun -n lib%{name} -p /sbin/ldconfig %files -n lib%{name} %{_libdir}/lib%{name}*.so.* %doc LICENSE NOTICE %files -n lib%{name}-devel %{_includedir}/%{name} %{_libdir}/lib%{name}*.so %{_libdir}/pkgconfig/%{name}*.pc %doc LICENSE NOTICE %files -n perl-%{name} %{perl_vendorlib}/Thrift.pm %dir %{perl_vendorlib}/Thrift %{perl_vendorlib}/Thrift/*.pm %doc LICENSE NOTICE %files -n python-%{name} %{python_sitearch}/Thrift-%{version}-py%{python_version}.egg-info %dir %{python_sitearch}/%{name} %{python_sitearch}/%{name}/*.py* %dir %{python_sitearch}/%{name}/protocol %{python_sitearch}/%{name}/protocol/*.py* %{python_sitearch}/%{name}/protocol/fastbinary.so %{python_sitearch}/%{name}/server %{python_sitearch}/%{name}/transport %doc LICENSE NOTICE %changelog * Sun Sep 30 2012 gil cattaneo 0.7.0-1 - initial rpm