You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jf...@apache.org on 2013/06/09 03:27:34 UTC

git commit: Thrift-1733: Fix RPM build issues on RHEL6 Client: contrib Patch: Kirby Files

Updated Branches:
  refs/heads/master 0e07ec816 -> 765bbfb55


Thrift-1733: Fix RPM build issues on RHEL6
Client: contrib
Patch: Kirby Files

Updating thrift.spec for RHEL6 compatability.


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/765bbfb5
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/765bbfb5
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/765bbfb5

Branch: refs/heads/master
Commit: 765bbfb551e72aa0207871ef1b8cfc7769d3578c
Parents: 0e07ec8
Author: Jake Farrell <jf...@apache.org>
Authored: Sat Jun 8 21:25:48 2013 -0400
Committer: Jake Farrell <jf...@apache.org>
Committed: Sat Jun 8 21:25:48 2013 -0400

----------------------------------------------------------------------
 contrib/thrift.spec | 84 +++++++++++++++++-------------------------------
 1 file changed, 30 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/765bbfb5/contrib/thrift.spec
----------------------------------------------------------------------
diff --git a/contrib/thrift.spec b/contrib/thrift.spec
index ecee631..b0bccb2 100644
--- a/contrib/thrift.spec
+++ b/contrib/thrift.spec
@@ -17,40 +17,31 @@
 # under the License.
 #
 
-# TODO(dreiss): Have a Python build with and without the extension.
 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
-# TODO(dreiss): Where is this supposed to go?
-%{!?thrift_erlang_root: %define thrift_erlang_root /opt/thrift-erl}
 
 Name:           thrift
 License:        Apache License v2.0
 Group:          Development
 Summary:        RPC and serialization framework
-Version:        20080529svn
-Epoch:          1
-Release:        1
-URL:            http://developers.facebook.com/thrift
-Packager:       David Reiss <dr...@facebook.com>
+Version:        0.9.0
+Release:        0
+URL:            http://thrift.apache.org
+Packager:       Thrift Developers <de...@thrift.apache.org>
 Source0:        %{name}-%{version}.tar.gz
 
 BuildRequires:  gcc >= 3.4.6
 BuildRequires:  gcc-c++
 
-# TODO(dreiss): Can these be moved into the individual packages?
-%if %{!?without_java: 1}
+%if 0%{!?without_java:1}
 BuildRequires:  java-devel >= 0:1.5.0
 BuildRequires:  ant >= 0:1.6.5
 %endif
 
-%if %{!?without_python: 1}
+%if 0%{!?without_python:1}
 BuildRequires:  python-devel
 %endif
 
-%if %{!?without_erlang: 1}
-BuildRequires:  erlang
-%endif
-
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 %description
@@ -75,6 +66,7 @@ C++ libraries for Thrift.
 %files lib-cpp
 %defattr(-,root,root)
 %{_libdir}/libthrift*.so.*
+%{_libdir}/libthrift*.so
 
 
 %package lib-cpp-devel
@@ -82,10 +74,10 @@ Summary:   Thrift C++ library development files
 Group:     Libraries
 Requires:  %{name} = %{version}-%{release}
 Requires:  boost-devel
-%if %{!?without_libevent: 1}
+%if 0%{!?without_libevent:1}
 Requires:  libevent-devel >= 1.2
 %endif
-%if %{!?without_zlib: 1}
+%if 0%{!?without_zlib:1}
 Requires:  zlib-devel
 %endif
 
@@ -96,11 +88,10 @@ C++ static libraries and headers for Thrift.
 %defattr(-,root,root)
 %{_includedir}/thrift/
 %{_libdir}/libthrift*.*a
-%{_libdir}/libthrift*.so
 %{_libdir}/pkgconfig/thrift*.pc
 
 
-%if %{!?without_java: 1}
+%if 0%{!?without_java:1}
 %package lib-java
 Summary:   Thrift Java library
 Group:     Libraries
@@ -115,7 +106,7 @@ Java libraries for Thrift.
 %endif
 
 
-%if %{!?without_python: 1}
+%if 0%{!?without_python:1}
 %package lib-python
 Summary: Thrift Python library
 Group:   Libraries
@@ -129,78 +120,63 @@ Python libraries for Thrift.
 %endif
 
 
-%if %{!?without_erlang: 1}
-%package lib-erlang
-Summary:  Thrift Python library
-Group:    Libraries
-Requires: erlang
-
-%description lib-erlang
-Erlang libraries for Thrift.
-
-%files lib-erlang
-%defattr(-,root,root)
-%{thrift_erlang_root}
-%endif
-
-
 %prep
 %setup -q
 
 %build
-# TODO(dreiss): Implement a single --without-build-kludges.
 %configure \
   %{?without_libevent: --without-libevent } \
   %{?without_zlib:     --without-zlib     } \
   --without-java \
   --without-csharp \
-  --without-py \
+  --without-python \
   --without-erlang \
 
 make
 
-%if %{!?without_java: 1}
+%if 0%{!?without_java:1}
 cd lib/java
 %ant
 cd ../..
 %endif
 
-%if %{!?without_python: 1}
+%if 0%{!?without_python:1}
 cd lib/py
 CFLAGS="%{optflags}" %{__python} setup.py build
 cd ../..
 %endif
 
-%if %{!?without_erlang: 1}
-cd lib/erl
-make
-cd ../..
-%endif
-
 %install
 %makeinstall
+ln -s libthrift-%{version}.so ${RPM_BUILD_ROOT}%{_libdir}/libthrift.so.0
+ln -s libthriftnb-%{version}.so ${RPM_BUILD_ROOT}%{_libdir}/libthriftnb.so.0
+ln -s libthriftz-%{version}.so ${RPM_BUILD_ROOT}%{_libdir}/libthriftz.so.0
 
-%if %{!?without_java: 1}
+%if 0%{!?without_java:1}
 mkdir -p $RPM_BUILD_ROOT%{_javadir}
 cp -p lib/java/*.jar $RPM_BUILD_ROOT%{_javadir}
 %endif
 
-%if %{!?without_python: 1}
+%if 0%{!?without_python:1}
 cd lib/py
 %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
 cd ../..
 %endif
 
-%if %{!?without_erlang: 1}
-mkdir -p ${RPM_BUILD_ROOT}%{thrift_erlang_root}
-cp -r lib/erl/ebin ${RPM_BUILD_ROOT}%{thrift_erlang_root}
-%endif
-
 
 %clean
 rm -rf ${RPM_BUILD_ROOT}
 
 
+%post
+umask 007
+/sbin/ldconfig > /dev/null 2>&1
+
+
+%postun
+umask 007
+/sbin/ldconfig > /dev/null 2>&1
+
 %changelog
-* Wed May 28 2008 David Reiss <dr...@facebook.com> - 20080529svn
-- Initial build, based on the work of Kevin Smith and Ben Maurer.
+* Wed Oct 10 2012 Thrift Dev <de...@thrift.apache.org> 
+- Thrift 0.9.0 release.