-# TODO: BR for java, ruby, perl, more general BR
-# TODO: Separate packages per each lang ?
-# TODO: Fix ruby install
-# TODO: Add Mono ?
-# TODO: thrift-python -> python-trift ?
+# TODO
+# - BR for java, ruby, perl, more general BR
+# - package -libs & ldconfig
+# - Separate packages per each language
+# - fix perl: missing vendordir on install
+# - fix java: not installing to %{_javadir}
+# - avoid downloading from net when build building java
+# - Fix ruby install
+# - Fix PHP build
+# - Add Mono
+# - libthriftnb.so lacks some libs when linking
Summary: Framework for scalable cross-language services development
Summary(pl.UTF-8): Szkielet budowania skalowalnych usług dla różnych języków programowania
Name: thrift
-Version: 0.2.0
-Release: 0.2
-License: - enter GPL/GPL v2/GPL v3/LGPL/BSD/BSD-like/other license name here)
+Version: 0.5.0
+Release: 0.1
+License: Apache v2.0
Group: Development/Libraries
-# http://www.apache.net.pl/incubator/thrift/0.2.0-incubating/thrift-0.2.0-incubating.tar.gz
-Source0: http://www.apache.net.pl/incubator/thrift/%{version}-incubating/%{name}-%{version}-incubating.tar.gz
-# Source0-md5: 9958c57c402c02171ba0bcc96183505c
+Source0: http://ftp.tpnet.pl/vol/d1/apache//incubator/thrift/%{version}-incubating/thrift-%{version}.tar.gz
+# Source0-md5: 14c97adefb4efc209285f63b4c7f51f2
Patch0: %{name}-Werror_strlcpy_fix.patch
URL: http://incubator.apache.org/thrift/
+BuildRequires: bison
BuildRequires: boost-devel >= 1.33.1
-BuildRequires: python-devel >= 2.4
+BuildRequires: flex
+BuildRequires: libevent-devel
+BuildRequires: pkgconfig
+BuildRequires: python-devel >= 1:2.4
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.219
BuildRequires: zlib-devel >= 1.2.3
-#Requires: -
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Pythonem, PHP, Rybym, Erlangiem, Perlem, Heskellem, C#, Cocoa,
Smalltalikiem i Ocamlem.
-
%package devel
Summary: Header files for thrift
Summary(pl.UTF-8): Pliki nagłówkowe thrift
%description devel -l pl.UTF-8
Pliki nagłówkowe thrift.
-
-%package python
+%package -n python-%{name}
Summary: Python thrift interface
Summary(pl.UTF-8): Interfejs thrift dla Pythona
Group: Development/Languages/Python
Requires: %{name} = %{version}-%{release}
-%description python
+%description -n python-%{name}
Python thrift interface.
-%description python -l pl.UTF-8
+%description -n python-%{name} -l pl.UTF-8
Interfejs thrift dla Pythona.
-
%prep
%setup -q
%patch0 -p1
%build
%configure \
- --without-ruby
+ --without-ruby \
+ --without-php \
+ --without-java \
+ --without-php_extension
+
%{__make}
%install
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
+%py_comp $RPM_BUILD_ROOT%{py_sitedir}
+%py_postclean
+
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-# %doc AUTHORS CREDITS ChangeLog NEWS README THANKS TODO
-%attr(755,root,root) %{_bindir}/*
+%attr(755,root,root) %{_bindir}/thrift
%files devel
%defattr(644,root,root,755)
-# %doc devel-doc/*
-%{_libdir}/lib%{name}.so
-%{_libdir}/lib%{name}.la
-%{_libdir}/lib%{name}z.so
-%{_libdir}/lib%{name}z.la
+%{_libdir}/libthrift.so
+%{_libdir}/libthrift.la
+%{_libdir}/libthriftz.so
+%{_libdir}/libthriftz.la
%{_includedir}/%{name}
-# %{_aclocaldir}/*.m4
-# %{_pkgconfigdir}/*.pc
-
+%{_pkgconfigdir}/thrift-nb.pc
+%{_pkgconfigdir}/thrift-z.pc
+%{_pkgconfigdir}/thrift.pc
-%files python
+%files -n python-%{name}
%defattr(644,root,root,755)
-# %doc AUTHORS CREDITS ChangeLog NEWS README THANKS TODO
-# change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
-%{py_sitedir}/%{name}
-# %{py_sitedir}/*.py[co]
-# %attr(755,root,root) %{py_sitedir}/*.so
+%dir %{py_sitedir}
+%dir %{py_sitedir}/%{name}
+%dir %{py_sitedir}/%{name}/protocol
+%{py_sitedir}/%{name}/protocol/*.py[co]
+%attr(755,root,root) %{py_sitedir}/%{name}/protocol/fastbinary.so
+%dir %{py_sitedir}/%{name}/server
+%{py_sitedir}/%{name}/server/*.py[co]
+%dir %{py_sitedir}/%{name}/transport
+%{py_sitedir}/%{name}/transport/*.py[co]
+%{py_sitedir}/%{name}/*.py[co]
%if "%{py_ver}" > "2.4"
%{py_sitedir}/Thrift-*.egg-info
%endif