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