]> git.pld-linux.org Git - packages/thrift.git/blob - thrift.spec
- updated some BRs, descriptions and todos
[packages/thrift.git] / thrift.spec
1 # TODO
2 # - python3 interface
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
10 # - Fix ruby install
11 # - Add Mono
12 # - Fix parallel build make.
13 # - dart?
14 #
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
22 # - golang
23 # - rust (>= 1.13)
24 # - haxe (>= 3.1.3)
25 #
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
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
49
50 %if %{with perl}
51 %define         pdir    Thrift
52 %endif
53
54 %if 0%{!?php_name:1}
55 %define         php_name        php72
56 %endif
57
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
61 Name:           thrift
62 Version:        0.11.0
63 Release:        5
64 License:        Apache v2.0
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
70 Patch2:         no_pom.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
76 BuildRequires:  flex
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
85 %if %{with qt4}
86 BuildRequires:  QtCore-devel >= 4.3
87 BuildRequires:  QtNetwork-devel >= 4.3
88 BuildRequires:  qt4-build >= 4.3
89 %endif
90 %if %{with qt5}
91 BuildRequires:  Qt5Core-devel >= 5.0
92 BuildRequires:  Qt5Network-devel >= 5.0
93 BuildRequires:  qt5-build >= 5.0
94 %endif
95 %if %{with c_glib}
96 BuildRequires:  glib2-devel >= 2.0
97 %endif
98 %if %{with csharp}
99 BuildRequires:  mono-csharp >= 2.11.0
100 BuildRequires:  mono-devel >= 2.11.0
101 %endif
102 %if %{with java}
103 BuildRequires:  ant >= 1.7
104 BuildRequires:  java-gcj-compat-devel
105 BuildRequires:  java-ivy
106 %endif
107 %if %{with lua}
108 BuildRequires:  lua52-devel >= 5.2
109 %endif
110 %if %{with nodejs}
111 BuildRequires:  nodejs
112 BuildRequires:  npm
113 %endif
114 %if %{with python}
115 BuildRequires:  python >= 1:2.6
116 BuildRequires:  python-twisted
117 %endif
118 %if %{with perl}
119 BuildRequires:  perl-Bit-Vector
120 BuildRequires:  perl-Class-Accessor
121 BuildRequires:  perl-base
122 %endif
123 %if %{with php}
124 BuildRequires:  %{php_name}-cli
125 BuildRequires:  %{php_name}-devel
126 BuildRequires:  phpunit
127 %endif
128 %if %{with erlang}
129 BuildRequires:  erlang
130 %endif
131 %if %{with ruby}
132 BuildRequires:  ruby
133 BuildRequires:  ruby-bundler
134 %endif
135 %if %{with haskell}
136 BuildRequires:  ghc
137 BuildRequires:  ghc-haskell-platform
138 %endif
139 %if %{with go}
140 BuildRequires:  golang
141 %endif
142 %if %{with d}
143 BuildRequires:  dmd
144 %endif
145 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
146
147 # library use symbols provided by the glib2 libraries
148 %define         skip_post_check_so      libthrift_c_glib.so.*
149
150 %description
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.
156
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.
163
164 %package libs
165 Summary:        C++ Thrift interface libraries
166 Summary(pl.UTF-8):      Interfejs Thrift dla C++
167 Group:          Development/Libraries
168 Requires:       %{name} = %{version}-%{release}
169
170 %description libs
171 C++ Thrift interface libraries
172
173 %description libs -l pl.UTF-8
174 Biblioteki interfejsu Thrift dla C++.
175
176 %package devel
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}
181
182 %description devel
183 Header files for C++ Thrift interface.
184
185 %description devel -l pl.UTF-8
186 Pliki nagłówkowe interfejsu C++ Thrift.
187
188 %package static
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}
193
194 %description static
195 Static library files for C++ Thrift interface.
196
197 %description static -l pl.UTF-8
198 Statyczne biblioteki interfejsu C++ Thrift.
199
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}
206
207 %description -n php-%{name}
208 PHP Thrift interface.
209
210 %description -n php-%{name} -l pl.UTF-8
211 Interfejs Thrift dla PHP.
212
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}
218
219 %description -n python-%{name}
220 Python Thrift interface.
221
222 %description -n python-%{name} -l pl.UTF-8
223 Interfejs Thrift dla Pythona.
224
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}
230
231 %description -n perl-Thrift
232 Perl Thrift interface.
233
234 %description -n perl-Thrift -l pl.UTF-8
235 Interfejs Thrift dla Perla.
236
237 %prep
238 %setup -q
239 %patch0 -p1
240 %patch1 -p1
241 %patch2 -p1
242
243 %build
244 %{__aclocal} -I aclocal
245 %{__autoconf}
246 %{__autoheader}
247 %{__automake}
248 %configure \
249         PHP_PREFIX=%{php_data_dir} \
250         PHP=%{__php} \
251         PERL_PREFIX=%{perl_vendorlib} \
252         TRIAL=/usr/bin/trial-2 \
253         --enable-libs \
254         --disable-tutorial \
255         --disable-tests \
256         --with-boost \
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} \
265         --with-libevent \
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} \
274         --without-rs \
275         %{__with_without ruby} \
276         %{__with_without tests} \
277         --with-zlib
278
279 %{__make} -j1
280
281 %install
282 rm -rf $RPM_BUILD_ROOT
283 %{__make} install \
284         DESTDIR=$RPM_BUILD_ROOT
285
286 %if %{with python}
287 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
288 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
289 %py_postclean
290 %endif
291
292 %if %{with perl}
293 %{__mv} $RPM_BUILD_ROOT%{perl_vendorlib}/lib/perl5/Thrift{,.pm} $RPM_BUILD_ROOT%{perl_vendorlib}
294 %endif
295
296 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
297
298 %clean
299 rm -rf $RPM_BUILD_ROOT
300
301 %post   libs -p /sbin/ldconfig
302 %postun libs -p /sbin/ldconfig
303
304 %files
305 %defattr(644,root,root,755)
306 %attr(755,root,root) %{_bindir}/thrift
307
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
314 %if %{with qt4}
315 %{_libdir}/libthriftqt-%{version}.so
316 %endif
317 %if %{with qt5}
318 %{_libdir}/libthriftqt5-%{version}.so
319 %endif
320 %if %{with c_glib}
321 %{_libdir}/libthrift_c_glib.so.*
322 %endif
323
324 %files devel
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
333 %if %{with qt4}
334 %{_libdir}/libthriftqt.so
335 %{_pkgconfigdir}/thrift-qt.pc
336 %endif
337 %if %{with qt5}
338 %{_libdir}/libthriftqt5.so
339 %{_pkgconfigdir}/thrift-qt5.pc
340 %endif
341 %if %{with c_glib}
342 %{_libdir}/libthrift_c_glib.so
343 %{_pkgconfigdir}/thrift_c_glib.pc
344 %endif
345
346 %files static
347 %defattr(644,root,root,755)
348 %{_libdir}/libthrift.a
349 %{_libdir}/libthriftnb.a
350 %{_libdir}/libthriftz.a
351 %if %{with qt4}
352 %{_libdir}/libthriftqt.a
353 %endif
354 %if %{with qt5}
355 %{_libdir}/libthriftqt5.a
356 %endif
357 %if %{with c_glib}
358 %{_libdir}/libthrift_c_glib.a
359 %endif
360 %endif
361
362 %if %{with php}
363 %files -n php-%{name}
364 %defattr(644,root,root,755)
365 %{php_data_dir}/Thrift
366 %endif
367
368 %if %{with python}
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
382 %endif
383 %endif
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.120479 seconds and 3 git commands to generate.