3 # - rename -libs to -cpp, -devel to -cpp-devel, -static to -cpp-static?
4 # - no SONAME ext in -libs, enforce some?
5 # - BR for java, ruby, perl, more general BR
6 # - Separate packages per each language
7 # - fix perl: missing vendordir on install
8 # - fix java: not installing to %{_javadir}
9 # - avoid downloading from net when build building java
12 # - Fix parallel build make.
15 # TODO (2) - fix or disable
16 # - java - br, build, files - icedtea7 ?
17 # - erlang - build, files
18 # - php_extension - br, build
19 # - ruby - build, files, some gems required for build?
20 # - haskell - build, files
21 # - d - needs working dmd or gdm to build
29 %bcond_with tests # build with tests
32 %bcond_without cpp # build the C++ library
33 %bcond_with qt4 # build the Qt4 library
34 %bcond_with qt5 # build the Qt5 library
35 %bcond_without c_glib # build the C (GLib) library
36 %bcond_with csharp # build the C# library
37 %bcond_with java # build the Java library
38 %bcond_with erlang # build the Erlang library
39 %bcond_with nodejs # build nodejs library
40 %bcond_with lua # build Lua library
41 %bcond_without python # build the Python library
42 %bcond_with perl # build the Perl library
43 %bcond_with php # build the PHP library
44 %bcond_with php_extension # build the PHP_EXTENSION library
45 %bcond_with ruby # build the Ruby library
46 %bcond_with haskell # build the Haskell library
47 %bcond_with go # build the Go library
48 %bcond_with d # build the D library
55 %define php_name php72
58 %define php_min_version 5.3.0
59 Summary: Framework for scalable cross-language services development
60 Summary(pl.UTF-8): Szkielet budowania skalowalnych usług dla różnych języków programowania
65 Group: Development/Libraries
66 Source0: http://www.apache.org/dist/thrift/%{version}/%{name}-%{version}.tar.gz
67 # Source0-md5: 0be59730ebce071eceaf6bfdb8d3a20e
68 Patch0: no_bundler_use.patch
69 Patch1: no_grunt.patch
71 URL: http://thrift.apache.org/
72 BuildRequires: autoconf >= 2.65
73 BuildRequires: automake >= 1:1.13
74 BuildRequires: bison >= 2.5
75 BuildRequires: boost-devel >= 1.54.0
77 BuildRequires: libevent-devel >= 1.0
78 BuildRequires: libstdc++-devel
79 BuildRequires: openssl-devel
80 BuildRequires: pkgconfig
81 BuildRequires: python-devel >= 1:2.4
82 BuildRequires: rpm-pythonprov
83 BuildRequires: rpmbuild(macros) >= 1.219
84 BuildRequires: zlib-devel >= 1.2.3
86 BuildRequires: QtCore-devel >= 4.3
87 BuildRequires: QtNetwork-devel >= 4.3
88 BuildRequires: qt4-build >= 4.3
91 BuildRequires: Qt5Core-devel >= 5.0
92 BuildRequires: Qt5Network-devel >= 5.0
93 BuildRequires: qt5-build >= 5.0
96 BuildRequires: glib2-devel >= 2.0
99 BuildRequires: mono-csharp >= 2.11.0
100 BuildRequires: mono-devel >= 2.11.0
103 BuildRequires: ant >= 1.7
104 BuildRequires: java-gcj-compat-devel
105 BuildRequires: java-ivy
108 BuildRequires: lua52-devel >= 5.2
111 BuildRequires: nodejs
115 BuildRequires: python >= 1:2.6
116 BuildRequires: python-twisted
119 BuildRequires: perl-Bit-Vector
120 BuildRequires: perl-Class-Accessor
121 BuildRequires: perl-base
124 BuildRequires: %{php_name}-cli
125 BuildRequires: %{php_name}-devel
126 BuildRequires: phpunit
129 BuildRequires: erlang
133 BuildRequires: ruby-bundler
137 BuildRequires: ghc-haskell-platform
140 BuildRequires: golang
145 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
147 # library use symbols provided by the glib2 libraries
148 %define skip_post_check_so libthrift_c_glib.so.*
151 The Apache Thrift software framework, for scalable cross-language
152 services development, combines a software stack with a code generation
153 engine to build services that work efficiently and seamlessly between
154 C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa,
155 JavaScript, Node.js, Smalltalk, OCaml and Delphi and other languages.
157 %description -l pl.UTF-8
158 Programowy szkielet dla rozwoju skalowanych usług dla różnych języków
159 programowania. Zawiera oprogramowanie wraz silnikiem generowania kodu
160 do tworzenie usług które spawnie działają pomiędzy C++, Javą,
161 Pythonem, PHP, Rybym, Erlangiem, Perlem, Haskellem, C#, Cocoa,
162 Smalltalikiem i Ocamlem.
165 Summary: C++ Thrift interface libraries
166 Summary(pl.UTF-8): Interfejs Thrift dla C++
167 Group: Development/Libraries
168 Requires: %{name} = %{version}-%{release}
171 C++ Thrift interface libraries
173 %description libs -l pl.UTF-8
174 Biblioteki interfejsu Thrift dla C++.
177 Summary: C++ Thrift interface header files
178 Summary(pl.UTF-8): Pliki nagłówkowe interfejsu C++ Thrift
179 Group: Development/Libraries
180 Requires: %{name}-libs = %{version}-%{release}
183 Header files for C++ Thrift interface.
185 %description devel -l pl.UTF-8
186 Pliki nagłówkowe interfejsu C++ Thrift.
189 Summary: Thrift C++ static libraries
190 Summary(pl.UTF-8): Biblioteki statyczne interfejsu C++ Thrift
191 Group: Development/Libraries
192 Requires: %{name}-devel = %{version}-%{release}
195 Static library files for C++ Thrift interface.
197 %description static -l pl.UTF-8
198 Statyczne biblioteki interfejsu C++ Thrift.
200 %package -n php-%{name}
201 Summary: PHP Thrift interface
202 Summary(pl.UTF-8): Interfejs Thrift dla PHP
203 Group: Development/Languages/PHP
204 Requires: %{name} = %{version}-%{release}
205 Requires: php(core) >= %{php_min_version}
207 %description -n php-%{name}
208 PHP Thrift interface.
210 %description -n php-%{name} -l pl.UTF-8
211 Interfejs Thrift dla PHP.
213 %package -n python-%{name}
214 Summary: Python Thrift interface
215 Summary(pl.UTF-8): Interfejs Thrift dla Pythona
216 Group: Development/Languages/Python
217 Requires: %{name} = %{version}-%{release}
219 %description -n python-%{name}
220 Python Thrift interface.
222 %description -n python-%{name} -l pl.UTF-8
223 Interfejs Thrift dla Pythona.
225 %package -n perl-Thrift
226 Summary: Perl Thrift interface
227 Summary(pl.UTF-8): Interfejs Thrift dla Perla
228 Group: Development/Languages/Perl
229 Requires: %{name} = %{version}-%{release}
231 %description -n perl-Thrift
232 Perl Thrift interface.
234 %description -n perl-Thrift -l pl.UTF-8
235 Interfejs Thrift dla Perla.
244 %{__aclocal} -I aclocal
249 PHP_PREFIX=%{php_data_dir} \
251 PERL_PREFIX=%{perl_vendorlib} \
252 TRIAL=/usr/bin/trial-2 \
257 %{__with_without c_glib} \
258 %{__with_without csharp} \
259 %{__with_without cpp} \
260 %{__with_without d} \
261 %{__with_without erlang} \
262 %{__with_without go} \
263 %{__with_without java} \
264 %{__with_without haskell} \
266 %{__with_without lua} \
267 %{__with_without nodejs} \
268 %{__with_without python} \
269 %{__with_without perl} \
270 %{__with_without php} \
271 %{__with_without php_extension} \
272 %{__with_without qt4} \
273 %{__with_without qt5} \
275 %{__with_without ruby} \
276 %{__with_without tests} \
282 rm -rf $RPM_BUILD_ROOT
284 DESTDIR=$RPM_BUILD_ROOT
287 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
288 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
293 %{__mv} $RPM_BUILD_ROOT%{perl_vendorlib}/lib/perl5/Thrift{,.pm} $RPM_BUILD_ROOT%{perl_vendorlib}
296 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
299 rm -rf $RPM_BUILD_ROOT
301 %post libs -p /sbin/ldconfig
302 %postun libs -p /sbin/ldconfig
305 %defattr(644,root,root,755)
306 %attr(755,root,root) %{_bindir}/thrift
310 %defattr(644,root,root,755)
311 %{_libdir}/libthrift-%{version}.so
312 %{_libdir}/libthriftnb-%{version}.so
313 %{_libdir}/libthriftz-%{version}.so
315 %{_libdir}/libthriftqt-%{version}.so
318 %{_libdir}/libthriftqt5-%{version}.so
321 %{_libdir}/libthrift_c_glib.so.*
325 %defattr(644,root,root,755)
326 %{_libdir}/libthrift.so
327 %{_libdir}/libthriftnb.so
328 %{_libdir}/libthriftz.so
329 %{_includedir}/thrift
330 %{_pkgconfigdir}/thrift-nb.pc
331 %{_pkgconfigdir}/thrift-z.pc
332 %{_pkgconfigdir}/thrift.pc
334 %{_libdir}/libthriftqt.so
335 %{_pkgconfigdir}/thrift-qt.pc
338 %{_libdir}/libthriftqt5.so
339 %{_pkgconfigdir}/thrift-qt5.pc
342 %{_libdir}/libthrift_c_glib.so
343 %{_pkgconfigdir}/thrift_c_glib.pc
347 %defattr(644,root,root,755)
348 %{_libdir}/libthrift.a
349 %{_libdir}/libthriftnb.a
350 %{_libdir}/libthriftz.a
352 %{_libdir}/libthriftqt.a
355 %{_libdir}/libthriftqt5.a
358 %{_libdir}/libthrift_c_glib.a
363 %files -n php-%{name}
364 %defattr(644,root,root,755)
365 %{php_data_dir}/Thrift
369 %files -n python-%{name}
370 %defattr(644,root,root,755)
371 %dir %{py_sitedir}/%{name}
372 %dir %{py_sitedir}/%{name}/protocol
373 %{py_sitedir}/%{name}/protocol/*.py[co]
374 %attr(755,root,root) %{py_sitedir}/%{name}/protocol/fastbinary.so
375 %dir %{py_sitedir}/%{name}/server
376 %{py_sitedir}/%{name}/server/*.py[co]
377 %dir %{py_sitedir}/%{name}/transport
378 %{py_sitedir}/%{name}/transport/*.py[co]
379 %{py_sitedir}/%{name}/*.py[co]
380 %if "%{py_ver}" > "2.4"
381 %{py_sitedir}/thrift-%{version}-py*.egg-info
386 %files -n perl-Thrift
387 %defattr(644,root,root,755)
388 %dir %{perl_vendorlib}/Thrift
389 %{perl_vendorlib}/Thrift.pm
390 %{perl_vendorlib}/Thrift/*.pm