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