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