2 # - rename -libs to -cpp, -devel to -cpp-devel, -static to -cpp-static?
3 # - no SONAME ext in -libs, enforce some?
4 # - BR for java, ruby, perl, more general BR
5 # - Separate packages per each language
6 # - fix perl: missing vendordir on install
7 # - fix java: not installing to %{_javadir}
8 # - avoid downloading from net when build building java
11 # - Fix parallel build make.
16 %bcond_with tests # build with tests
19 %bcond_without cpp # build the C++ library
20 %bcond_with qt4 # build the Qt library
21 %bcond_with c_glib # build the C (GLib) library
22 %bcond_with csharp # build the C# library
23 %bcond_with java # build the Java library
24 %bcond_with erlang # build the Erlang library
25 %bcond_without python # build the Python library
26 %bcond_with perl # build the Perl library
27 %bcond_without php # build the PHP library
28 %bcond_with php_extension # build the PHP_EXTENSION library
29 %bcond_with ruby # build the Ruby library
30 %bcond_with haskell # build the Haskell library
31 %bcond_with go # build the Go library
32 %bcond_with d # build the D library
34 %define php_min_version 5.3.0
35 Summary: Framework for scalable cross-language services development
36 Summary(pl.UTF-8): Szkielet budowania skalowalnych usług dla różnych języków programowania
41 Group: Development/Libraries
42 Source0: http://www.apache.org/dist/thrift/%{version}/%{name}-%{version}.tar.gz
43 # Source0-md5: d2e46148f6e800a9492dbd848c66ab6e
44 Patch0: %{name}-Werror_strlcpy_fix.patch
45 Patch1: %{name}-cpp_link_fix.patch
46 URL: http://thrift.apache.org/
47 BuildRequires: autoconf
48 BuildRequires: automake
50 BuildRequires: boost-devel >= 1.33.1
52 BuildRequires: libevent-devel
53 BuildRequires: pkgconfig
54 BuildRequires: python-devel >= 1:2.4
55 BuildRequires: rpm-pythonprov
56 BuildRequires: rpmbuild(macros) >= 1.219
57 BuildRequires: zlib-devel >= 1.2.3
58 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61 The Apache Thrift software framework, for scalable cross-language
62 services development, combines a software stack with a code generation
63 engine to build services that work efficiently and seamlessly between
64 C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa,
65 JavaScript, Node.js, Smalltalk, OCaml and Delphi and other languages.
67 %description -l pl.UTF-8
68 Programowy szkielet dla rozwoju skalowanych usług dla różnych języków
69 programowania. Zawiera oprogramowanie wraz silnikiem generowania kodu
70 do tworzenie usług które spawnie działają pomiędzy C++, Javą,
71 Pythonem, PHP, Rybym, Erlangiem, Perlem, Haskellem, C#, Cocoa,
72 Smalltalikiem i Ocamlem.
75 Summary: C++ header files
76 Summary(pl.UTF-8): Pliki nagłówkowe i bibliotek iterfejsu C++ thrift
77 Group: Development/Libraries
78 Requires: %{name}-libs = %{version}-%{release}
81 Header and libarary files for C++ thrift inteface.
83 %description devel -l pl.UTF-8
84 Pliki nagłówkowe i bibliotek iterfejsu C++ thrift.
87 Summary: Thrift C++ static libraries
88 Summary(pl.UTF-8): Biblioteki statyczne iterfejsu C++ thrift
89 Group: Development/Libraries
90 Requires: %{name}-devel = %{version}-%{release}
93 Static libarary files for C++ thrift inteface.
95 %description static -l pl.UTF-8
96 Statyczne biblioteki iterfejsu C++ thrift.
99 Summary: C++ thrift interface libraries
100 Summary(pl.UTF-8): Interfejs thrift dla C++
101 Group: Development/Libraries
102 Requires: %{name} = %{version}-%{release}
105 C++ thrift interface libraries
107 %description libs -l pl.UTF-8
108 Biblioteki interfejsu thrift dla C++.
110 %package -n php-%{name}
111 Summary: PHP Thrift interface
112 Summary(pl.UTF-8): Interfejs Thrift dla PHP
113 Group: Development/Languages/PHP
114 Requires: %{name} = %{version}-%{release}
115 Requires: php(core) >= %{php_min_version}
117 %description -n php-%{name}
118 PHP Thrift interface.
120 %package -n python-%{name}
121 Summary: Python thrift interface
122 Summary(pl.UTF-8): Interfejs thrift dla Pythona
123 Group: Development/Languages/Python
124 Requires: %{name} = %{version}-%{release}
126 %description -n python-%{name}
127 Python thrift interface.
129 %description -n python-%{name} -l pl.UTF-8
130 Interfejs thrift dla Pythona.
138 %{__aclocal} -I aclocal
143 PHP_PREFIX=%{php_data_dir} \
144 %{__with_without cpp} \
145 %{__with_without qt4} \
146 %{__with_without c_glib} \
147 %{__with_without csharp} \
148 %{__with_without java} \
149 %{__with_without erlang} \
150 %{__with_without python} \
151 %{__with_without bcond_without} \
152 %{__with_without perl} \
153 %{__with_without php} \
154 %{__with_without php_extension} \
155 %{__with_without ruby} \
156 %{__with_without haskell} \
157 %{__with_without go} \
158 %{__with_without d} \
162 %{__with_without tests}
167 rm -rf $RPM_BUILD_ROOT
170 DESTDIR=$RPM_BUILD_ROOT
172 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
173 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
177 rm -rf $RPM_BUILD_ROOT
179 %post libs -p /sbin/ldconfig
180 %postun libs -p /sbin/ldconfig
183 %defattr(644,root,root,755)
184 %attr(755,root,root) %{_bindir}/thrift
187 %defattr(644,root,root,755)
188 %{_libdir}/libthrift-%{version}.so
189 %{_libdir}/libthriftnb-%{version}.so
190 %{_libdir}/libthriftz-%{version}.so
193 %defattr(644,root,root,755)
194 %{_libdir}/libthrift.la
195 %{_libdir}/libthriftnb.la
196 %{_libdir}/libthriftz.la
197 %{_libdir}/libthrift.so
198 %{_libdir}/libthriftnb.so
199 %{_libdir}/libthriftz.so
200 %{_includedir}/thrift
201 %{_pkgconfigdir}/thrift-nb.pc
202 %{_pkgconfigdir}/thrift-z.pc
203 %{_pkgconfigdir}/thrift.pc
206 %defattr(644,root,root,755)
207 %{_libdir}/libthrift.a
208 %{_libdir}/libthriftnb.a
209 %{_libdir}/libthriftz.a
213 %files -n php-%{name}
214 %defattr(644,root,root,755)
215 %{php_data_dir}/Thrift
219 %files -n python-%{name}
220 %defattr(644,root,root,755)
221 %dir %{py_sitedir}/%{name}
222 %dir %{py_sitedir}/%{name}/protocol
223 %{py_sitedir}/%{name}/protocol/*.py[co]
224 %attr(755,root,root) %{py_sitedir}/%{name}/protocol/fastbinary.so
225 %dir %{py_sitedir}/%{name}/server
226 %{py_sitedir}/%{name}/server/*.py[co]
227 %dir %{py_sitedir}/%{name}/transport
228 %{py_sitedir}/%{name}/transport/*.py[co]
229 %{py_sitedir}/%{name}/*.py[co]
230 %if "%{py_ver}" > "2.4"
231 %{py_sitedir}/thrift-%{version}-py*.egg-info