]> git.pld-linux.org Git - packages/thrift.git/blame - thrift.spec
Release 2. Disabled lua.
[packages/thrift.git] / thrift.spec
CommitLineData
466f7706 1# TODO
ba0896eb
ER
2# - rename -libs to -cpp, -devel to -cpp-devel, -static to -cpp-static?
3# - no SONAME ext in -libs, enforce some?
466f7706 4# - BR for java, ruby, perl, more general BR
0fa812fd 5# - Separate packages per each language
dac4dddf
ER
6# - fix perl: missing vendordir on install
7# - fix java: not installing to %{_javadir}
0fa812fd 8# - avoid downloading from net when build building java
466f7706 9# - Fix ruby install
dac4dddf 10# - Add Mono
22ccc465 11# - Fix parallel build make.
ba0896eb 12#
c5ce9bf5
MGB
13# TODO (2) - fix or disable
14# - java - br, build, files - icedtea7 ?
15# - erlang - build, files
16# - php_extension - br, build
17# - ruby - build, files, some gems required for build?
18# - haskell - build, files
19# - d - needs working dmd or gdm to build
43a116e0 20# - bcond_without qt5 # build the Qt5 library
c5ce9bf5 21#
ba0896eb
ER
22# Conditional build:
23#
24# generic options
25%bcond_with tests # build with tests
26#
27# language options
28%bcond_without cpp # build the C++ library
43a116e0
MK
29%bcond_without qt4 # build the Qt4 library
30# %%bcond_without qt5 # build the Qt5 library
c5ce9bf5
MGB
31%bcond_without c_glib # build the C (GLib) library
32%bcond_without csharp # build the C# library
ba0896eb
ER
33%bcond_with java # build the Java library
34%bcond_with erlang # build the Erlang library
9efeafcc 35%bcond_with nodejs # build nodejs library
deebd499 36%bcond_without lua # build Lua library
ba0896eb 37%bcond_without python # build the Python library
c5ce9bf5 38%bcond_without perl # build the Perl library
a46efa23 39%bcond_without php # build the PHP library
ba0896eb
ER
40%bcond_with php_extension # build the PHP_EXTENSION library
41%bcond_with ruby # build the Ruby library
42%bcond_with haskell # build the Haskell library
c5ce9bf5 43%bcond_without go # build the Go library
ba0896eb 44%bcond_with d # build the D library
202172b4 45
6a7ec041
ER
46%if %{with perl}
47%define pdir Thrift
48%endif
49
72a57785
ER
50%if 0%{!?php_name:1}
51%define php_name php55
52%endif
c5ce9bf5 53
1fbdddd8 54%define php_min_version 5.3.0
72a57785 55%include /usr/lib/rpm/macros.perl
7f1934de 56Summary: Framework for scalable cross-language services development
5e6bb28c 57Summary(pl.UTF-8): Szkielet budowania skalowalnych usług dla różnych języków programowania
7f1934de 58Name: thrift
43a116e0 59Version: 0.9.3
deebd499 60Release: 2
dac4dddf 61License: Apache v2.0
5e6bb28c 62Group: Development/Libraries
ba0896eb 63Source0: http://www.apache.org/dist/thrift/%{version}/%{name}-%{version}.tar.gz
43a116e0 64# Source0-md5: 88d667a8ae870d5adeca8cb7d6795442
5e6bb28c 65Patch0: %{name}-Werror_strlcpy_fix.patch
22ccc465 66Patch1: %{name}-cpp_link_fix.patch
ba0896eb 67URL: http://thrift.apache.org/
22ccc465 68BuildRequires: autoconf
9efeafcc
ER
69BuildRequires: automake >= 1:1.13
70BuildRequires: bison >= 2.5
71BuildRequires: boost-devel >= 1.54.0
cfcf9423 72BuildRequires: flex
73BuildRequires: libevent-devel
74BuildRequires: pkgconfig
466f7706 75BuildRequires: python-devel >= 1:2.4
dac4dddf
ER
76BuildRequires: rpm-pythonprov
77BuildRequires: rpmbuild(macros) >= 1.219
92ebbd7d 78BuildRequires: zlib-devel >= 1.2.3
c5ce9bf5
MGB
79%if %{with qt4}
80BuildRequires: QtNetwork-devel
81%endif
82%if %{with c_glib}
83BuildRequires: glib2-devel
84%endif
85%if %{with csharp}
c5ce9bf5 86BuildRequires: mono-csharp
72a57785 87BuildRequires: mono-devel
c5ce9bf5
MGB
88%endif
89%if %{with java}
90BuildRequires: java-gcj-compat-devel
91BuildRequires: java-ivy
92%endif
9efeafcc
ER
93%if %{with lua}
94BuildRequires: lua51-devel
95%endif
96%if %{with nodejs}
97BuildRequires: nodejs
98BuildRequires: npm
99%endif
c5ce9bf5
MGB
100%if %{with python}
101BuildRequires: python
102BuildRequires: python-TwistedCore
103%endif
104%if %{with perl}
c5ce9bf5 105BuildRequires: perl-Bit-Vector
9efeafcc 106BuildRequires: perl-Class-Accessor
72a57785 107BuildRequires: perl-base
c5ce9bf5
MGB
108%endif
109%if %{with php}
72a57785
ER
110BuildRequires: %{php_name}-cli
111BuildRequires: %{php_name}-devel
112BuildRequires: phpunit
c5ce9bf5
MGB
113%endif
114%if %{with erlang}
115BuildRequires: erlang
116%endif
117%if %{with ruby}
118BuildRequires: ruby
c5ce9bf5
MGB
119BuildRequires: ruby-bundler
120%endif
121%if %{with haskell}
122BuildRequires: ghc
123BuildRequires: ghc-haskell-platform
124%endif
125%if %{with go}
126BuildRequires: golang
127%endif
128%if %{with d}
129BuildRequires: dmd
130%endif
7f1934de
MK
131BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
132
c5ce9bf5
MGB
133# library use symbols provided by the glib2 libraries
134%define skip_post_check_so libthrift_c_glib.so.*
135
7f1934de 136%description
ba0896eb
ER
137The Apache Thrift software framework, for scalable cross-language
138services development, combines a software stack with a code generation
139engine to build services that work efficiently and seamlessly between
140C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa,
141JavaScript, Node.js, Smalltalk, OCaml and Delphi and other languages.
7f1934de
MK
142
143%description -l pl.UTF-8
5e6bb28c
MK
144Programowy szkielet dla rozwoju skalowanych usług dla różnych języków
145programowania. Zawiera oprogramowanie wraz silnikiem generowania kodu
146do tworzenie usług które spawnie działają pomiędzy C++, Javą,
f1f9dec1 147Pythonem, PHP, Rybym, Erlangiem, Perlem, Haskellem, C#, Cocoa,
5e6bb28c 148Smalltalikiem i Ocamlem.
7f1934de 149
22ccc465
MK
150%package devel
151Summary: C++ header files
152Summary(pl.UTF-8): Pliki nagłówkowe i bibliotek iterfejsu C++ thrift
153Group: Development/Libraries
783da2ed 154Requires: %{name}-libs = %{version}-%{release}
22ccc465
MK
155
156%description devel
157Header and libarary files for C++ thrift inteface.
158
159%description devel -l pl.UTF-8
160Pliki nagłówkowe i bibliotek iterfejsu C++ thrift.
161
22ccc465
MK
162%package static
163Summary: Thrift C++ static libraries
164Summary(pl.UTF-8): Biblioteki statyczne iterfejsu C++ thrift
165Group: Development/Libraries
166Requires: %{name}-devel = %{version}-%{release}
167
168%description static
169Static libarary files for C++ thrift inteface.
170
171%description static -l pl.UTF-8
172Statyczne biblioteki iterfejsu C++ thrift.
173
ba0896eb 174%package libs
22ccc465
MK
175Summary: C++ thrift interface libraries
176Summary(pl.UTF-8): Interfejs thrift dla C++
177Group: Development/Libraries
178Requires: %{name} = %{version}-%{release}
179
ba0896eb 180%description libs
22ccc465
MK
181C++ thrift interface libraries
182
ba0896eb 183%description libs -l pl.UTF-8
22ccc465 184Biblioteki interfejsu thrift dla C++.
368a393e 185
a46efa23
ER
186%package -n php-%{name}
187Summary: PHP Thrift interface
188Summary(pl.UTF-8): Interfejs Thrift dla PHP
189Group: Development/Languages/PHP
190Requires: %{name} = %{version}-%{release}
1fbdddd8 191Requires: php(core) >= %{php_min_version}
a46efa23
ER
192
193%description -n php-%{name}
194PHP Thrift interface.
195
dac4dddf 196%package -n python-%{name}
368a393e
MK
197Summary: Python thrift interface
198Summary(pl.UTF-8): Interfejs thrift dla Pythona
5e6bb28c 199Group: Development/Languages/Python
368a393e
MK
200Requires: %{name} = %{version}-%{release}
201
dac4dddf 202%description -n python-%{name}
368a393e
MK
203Python thrift interface.
204
dac4dddf 205%description -n python-%{name} -l pl.UTF-8
368a393e
MK
206Interfejs thrift dla Pythona.
207
c5ce9bf5
MGB
208%package -n perl-Thrift
209Summary: Perl thrift interface
210Summary(pl.UTF-8): Interfejs thrift dla Perla
211Group: Development/Languages/Perl
212Requires: %{name} = %{version}-%{release}
213
214%description -n perl-Thrift
215Perl thrift interface.
216
217%description -n perl-Thrift -l pl.UTF-8
218Interfejs thrift dla Perla.
219
7f1934de
MK
220%prep
221%setup -q
ba0896eb
ER
222#%patch0 -p1
223#%patch1 -p1
7f1934de
MK
224
225%build
ba0896eb
ER
226%{__aclocal} -I aclocal
227%{__autoconf}
22ccc465
MK
228%{__autoheader}
229%{__automake}
92ebbd7d 230%configure \
a46efa23 231 PHP_PREFIX=%{php_data_dir} \
72a57785 232 PHP=%{__php} \
c5ce9bf5 233 PERL_PREFIX=%{perl_vendorlib} \
ba0896eb
ER
234 %{__with_without cpp} \
235 %{__with_without qt4} \
236 %{__with_without c_glib} \
237 %{__with_without csharp} \
238 %{__with_without java} \
239 %{__with_without erlang} \
240 %{__with_without python} \
241 %{__with_without bcond_without} \
242 %{__with_without perl} \
243 %{__with_without php} \
244 %{__with_without php_extension} \
245 %{__with_without ruby} \
246 %{__with_without haskell} \
247 %{__with_without go} \
248 %{__with_without d} \
9efeafcc 249 --enable-libs \
ba0896eb
ER
250 --with-boost \
251 --with-libevent \
252 --with-zlib \
9efeafcc
ER
253 --disable-tutorial \
254 --disable-tests \
ba0896eb 255 %{__with_without tests}
f13e5a53 256
72a57785 257%{__make} -j1
7f1934de
MK
258
259%install
260rm -rf $RPM_BUILD_ROOT
7f1934de
MK
261%{__make} install \
262 DESTDIR=$RPM_BUILD_ROOT
263
72a57785 264%if %{with python}
dac4dddf
ER
265%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
266%py_comp $RPM_BUILD_ROOT%{py_sitedir}
267%py_postclean
72a57785 268%endif
dac4dddf 269
c5ce9bf5
MGB
270%if %{with perl}
271%{__mv} $RPM_BUILD_ROOT%{perl_vendorlib}/lib/perl5/Thrift{,.pm} $RPM_BUILD_ROOT%{perl_vendorlib}
272%endif
273
7f1934de
MK
274%clean
275rm -rf $RPM_BUILD_ROOT
276
22ccc465
MK
277%post libs -p /sbin/ldconfig
278%postun libs -p /sbin/ldconfig
279
7f1934de
MK
280%files
281%defattr(644,root,root,755)
dac4dddf 282%attr(755,root,root) %{_bindir}/thrift
72a57785 283
ba0896eb
ER
284%if %{with cpp}
285%files libs
286%defattr(644,root,root,755)
287%{_libdir}/libthrift-%{version}.so
288%{_libdir}/libthriftnb-%{version}.so
289%{_libdir}/libthriftz-%{version}.so
43a116e0 290%{_libdir}/libthriftqt5-%{version}.so
c5ce9bf5
MGB
291%if %{with qt4}
292%{_libdir}/libthriftqt-%{version}.so
293%endif
294%if %{with c_glib}
295%{_libdir}/libthrift_c_glib.so.*
296%endif
ba0896eb 297
22ccc465
MK
298%files devel
299%defattr(644,root,root,755)
300%{_libdir}/libthrift.la
22ccc465 301%{_libdir}/libthriftnb.la
ba0896eb
ER
302%{_libdir}/libthriftz.la
303%{_libdir}/libthrift.so
304%{_libdir}/libthriftnb.so
305%{_libdir}/libthriftz.so
306%{_includedir}/thrift
22ccc465
MK
307%{_pkgconfigdir}/thrift-nb.pc
308%{_pkgconfigdir}/thrift-z.pc
309%{_pkgconfigdir}/thrift.pc
c5ce9bf5
MGB
310%if %{with qt4}
311%{_libdir}/libthriftqt.so
312%{_libdir}/libthriftqt.la
313%{_pkgconfigdir}/thrift-qt.pc
314%endif
43a116e0
MK
315%{_libdir}/libthriftqt5.so
316%{_libdir}/libthriftqt5.la
317%{_pkgconfigdir}/thrift-qt5.pc
318
c5ce9bf5
MGB
319%if %{with c_glib}
320%{_libdir}/libthrift_c_glib.so
321%{_libdir}/libthrift_c_glib.la
322%{_pkgconfigdir}/thrift_c_glib.pc
323%endif
22ccc465
MK
324
325%files static
326%defattr(644,root,root,755)
327%{_libdir}/libthrift.a
22ccc465 328%{_libdir}/libthriftnb.a
ba0896eb 329%{_libdir}/libthriftz.a
c5ce9bf5
MGB
330%if %{with qt4}
331%{_libdir}/libthriftqt.a
332%endif
43a116e0 333%{_libdir}/libthriftqt5.a
c5ce9bf5
MGB
334%if %{with c_glib}
335%{_libdir}/libthrift_c_glib.a
336%endif
ba0896eb 337%endif
22ccc465 338
a46efa23
ER
339%if %{with php}
340%files -n php-%{name}
341%defattr(644,root,root,755)
342%{php_data_dir}/Thrift
343%endif
344
ba0896eb 345%if %{with python}
dac4dddf 346%files -n python-%{name}
368a393e 347%defattr(644,root,root,755)
dac4dddf
ER
348%dir %{py_sitedir}/%{name}
349%dir %{py_sitedir}/%{name}/protocol
350%{py_sitedir}/%{name}/protocol/*.py[co]
351%attr(755,root,root) %{py_sitedir}/%{name}/protocol/fastbinary.so
352%dir %{py_sitedir}/%{name}/server
353%{py_sitedir}/%{name}/server/*.py[co]
354%dir %{py_sitedir}/%{name}/transport
355%{py_sitedir}/%{name}/transport/*.py[co]
356%{py_sitedir}/%{name}/*.py[co]
368a393e 357%if "%{py_ver}" > "2.4"
ba0896eb
ER
358%{py_sitedir}/thrift-%{version}-py*.egg-info
359%endif
368a393e 360%endif
c5ce9bf5
MGB
361
362%if %{with perl}
363%files -n perl-Thrift
364%defattr(644,root,root,755)
365%dir %{perl_vendorlib}/Thrift
366%{perl_vendorlib}/Thrift.pm
367%{perl_vendorlib}/Thrift/*.pm
368%endif
This page took 0.140904 seconds and 4 git commands to generate.