2 # Licensed to the Apache Software Foundation (ASF) under one
3 # or more contributor license agreements. See the NOTICE file
4 # distributed with this work for additional information
5 # regarding copyright ownership. The ASF licenses this file
6 # to you under the Apache License, Version 2.0 (the
7 # "License"); you may not use this file except in compliance
8 # with the License. You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing,
13 # software distributed under the License is distributed on an
14 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 # KIND, either express or implied. See the License for the
16 # specific language governing permissions and limitations
20 %define without_java
1
21 %define without_python
1
22 %define without_tests
1
24 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
25 %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
28 License: Apache
License v2.0
30 Summary: RPC and serialization framework
33 URL: http
://thrift.apache.org
34 Packager: Thrift Developers
<dev@thrift.apache.org
>
35 Source0: %{name}-%{version}.tar.gz
37 BuildRequires
: gcc
>= 3.4.6
38 BuildRequires
: gcc
-c
++
40 %if 0%{!?without_java:1}
41 BuildRequires
: java
-devel
>= 0:1.5.0
42 BuildRequires
: ant
>= 0:1.6.5
45 %if 0%{!?without_python:1}
46 BuildRequires
: python
-devel
49 %if 0%{!?without_ruby:1}
50 %define gem_name
%{name}
51 BuildRequires
: ruby
-devel
52 BuildRequires
: rubygems
-devel
55 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n
)
58 Thrift is a software framework
for scalable cross
-language services
59 development. It combines a powerful software stack with a code generation
60 engine to build services that work efficiently and seamlessly between C
++,
61 Java
, C
#, Python, Ruby, Perl, PHP, Smalltalk, Erlang, OCaml, Haskell, and
70 Summary: Thrift C
++ library
74 C
++ libraries
for Thrift.
78 %{_libdir}/libthrift
*.so.
*
79 %{_libdir}/libthrift
*.so
82 %package lib
-cpp
-devel
83 Summary: Thrift C
++ library development files
85 Requires: %{name} = %{version}-%{release}
87 %if 0%{!?without_libevent:1}
88 Requires: libevent
-devel
>= 1.2
90 %if 0%{!?without_zlib:1}
94 %description lib
-cpp
-devel
95 C
++ static libraries and headers
for Thrift.
99 %{_includedir}/thrift
/
100 %{_libdir}/libthrift
*.
*a
101 %{_libdir}/pkgconfig
/thrift
*.pc
104 %if 0%{!?without_java:1}
106 Summary: Thrift Java library
108 Requires: java
>= 0:1.5.0
110 %description lib
-java
111 Java libraries
for Thrift.
114 %defattr(-,root
,root
)
119 %if 0%{!?without_python:1}
121 Summary: Thrift Python library
124 %description lib
-python
125 Python libraries
for Thrift.
128 %defattr(-,root
,root
)
133 %if 0%{!?without_ruby:1}
134 %package -n rubygem
-%{gem_name}
135 Summary: Thrift Ruby library
137 Obsoletes
: %{name}-lib
-ruby
139 %description -n rubygem
-%{gem_name}
140 Ruby libraries
for Thrift.
142 %files -n rubygem
-%{gem_name}
143 %defattr(-,root
,root
)
148 %if 0%{!?without_php:1}
150 Summary: Thrift PHP library
154 PHP libraries
for Thrift.
157 %defattr(-,root
,root
)
166 [[ -e Makefile.
in ]] || .
/bootstrap.sh
167 export GEM_HOME
=$
{PWD
}/.gem
-home
168 export RUBYLIB
=$
{PWD
}/lib
/rb
/lib
170 %{?without_libevent: --without-libevent } \
171 %{?without_zlib: --without-zlib } \
172 %{?without_tests: --without-tests } \
173 %{?without_java: --without-java } \
174 %{?without_python: --without-python } \
175 %{?without_ruby: --without-ruby } \
176 %{?without_php: --without-php } \
177 %{!?without_php: PHP_PREFIX=${RPM_BUILD_ROOT}/usr/lib/php } \
181 %if 0%{!?without_ruby:1}
182 eval $
(grep "^WITH_RUBY_TRUE" config.log
)
183 if [[ "$
{WITH_RUBY_TRUE
}"
!= ""
]]; then
186 echo "configure determined that ruby requirements are missing
(bundler gem?
), either
install missing components"
>&2
187 echo "or disable the ruby sub
-packages as follows
:"
>&2
188 echo " rpmbuild
-D'
%without_ruby 1' ..."
>&2
196 %if 0%{!?without_java:1}
202 %if 0%{!?without_python:1}
204 CFLAGS
="
%{optflags}" %{__python} setup.py build
208 %if 0%{!?without_ruby:1}
209 %gem_install -n lib
/rb
/thrift
*.gem
213 export GEM_HOME
=$
{PWD
}/.gem
-home
214 export RUBYLIB
=$
{PWD
}/lib
/rb
/lib
216 ln
-s libthrift
-%{version}.so ${RPM_BUILD_ROOT}%{_libdir}/libthrift.so
.0
217 ln
-s libthriftnb
-%{version}.so ${RPM_BUILD_ROOT}%{_libdir}/libthriftnb.so
.0
218 ln
-s libthriftz
-%{version}.so ${RPM_BUILD_ROOT}%{_libdir}/libthriftz.so
.0
220 %if 0%{!?without_java:1}
221 mkdir -p $RPM_BUILD_ROOT
%{_javadir}
222 cp
-p lib
/java
/build
/*.jar $RPM_BUILD_ROOT
%{_javadir}
225 %if 0%{!?without_python:1}
227 %{__python} setup.py
install -O1
--skip
-build
--root $RPM_BUILD_ROOT
231 %if 0%{!?without_ruby:1}
232 mkdir -p
%{buildroot}%{gem_dir}
233 cp
-a .
/%{gem_dir}/* %{buildroot}%{gem_dir}/
237 rm -rf $
{RPM_BUILD_ROOT
}
242 /sbin
/ldconfig
> /dev
/null
2>&1
247 /sbin
/ldconfig
> /dev
/null
2>&1
250 * Wed Aug
21 2013 Thrift Dev
<dev@thrift.apache.org
>
251 - Thrift
0.9.1 release.
252 * Wed Oct
10 2012 Thrift Dev
<dev@thrift.apache.org
>
253 - Thrift
0.9.0 release.