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