[packages/thrift] up to 0.9.1, bconds for each language
glen
glen at pld-linux.org
Sun Oct 6 01:48:20 CEST 2013
commit ba0896eb604c7a39061cf52e8632d8668e6364ff
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun Oct 6 02:47:54 2013 +0300
up to 0.9.1, bconds for each language
thrift-Werror_strlcpy_fix.patch | 15 +++--
thrift-cpp_link_fix.patch | 19 +++----
thrift.spec | 121 +++++++++++++++++++++++++---------------
3 files changed, 92 insertions(+), 63 deletions(-)
---
diff --git a/thrift.spec b/thrift.spec
index 9bb17eb..14ef31e 100644
--- a/thrift.spec
+++ b/thrift.spec
@@ -1,4 +1,6 @@
# TODO
+# - rename -libs to -cpp, -devel to -cpp-devel, -static to -cpp-static?
+# - no SONAME ext in -libs, enforce some?
# - BR for java, ruby, perl, more general BR
# - Separate packages per each language
# - fix perl: missing vendordir on install
@@ -8,19 +10,40 @@
# - Fix PHP build
# - Add Mono
# - Fix parallel build make.
+#
+# Conditional build:
+#
+# generic options
+%bcond_with tests # build with tests
+#
+# language options
+%bcond_without cpp # build the C++ library
+%bcond_with qt4 # build the Qt library
+%bcond_with c_glib # build the C (GLib) library
+%bcond_with csharp # build the C# library
+%bcond_with java # build the Java library
+%bcond_with erlang # build the Erlang library
+%bcond_without python # build the Python library
+%bcond_with perl # build the Perl library
+%bcond_with php # build the PHP library
+%bcond_with php_extension # build the PHP_EXTENSION library
+%bcond_with ruby # build the Ruby library
+%bcond_with haskell # build the Haskell library
+%bcond_with go # build the Go library
+%bcond_with d # build the D library
Summary: Framework for scalable cross-language services development
Summary(pl.UTF-8): Szkielet budowania skalowalnych usług dla różnych języków programowania
Name: thrift
-Version: 0.5.0
-Release: 4
+Version: 0.9.1
+Release: 0.1
License: Apache v2.0
Group: Development/Libraries
-Source0: http://ftp.tpnet.pl/vol/d1/apache//incubator/thrift/%{version}-incubating/%{name}-%{version}.tar.gz
-# Source0-md5: 14c97adefb4efc209285f63b4c7f51f2
+Source0: http://www.apache.org/dist/thrift/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: d2e46148f6e800a9492dbd848c66ab6e
Patch0: %{name}-Werror_strlcpy_fix.patch
Patch1: %{name}-cpp_link_fix.patch
-URL: http://incubator.apache.org/thrift/
+URL: http://thrift.apache.org/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
@@ -35,11 +58,11 @@ BuildRequires: zlib-devel >= 1.2.3
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-Software framework for scalable cross-language services development.
-It combines a software stack with a code generation engine to build
-services that work efficiently and seamlessly between C++, Java,
-Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, Smalltalk, and
-OCaml.
+The Apache Thrift software framework, for scalable cross-language
+services development, combines a software stack with a code generation
+engine to build services that work efficiently and seamlessly between
+C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa,
+JavaScript, Node.js, Smalltalk, OCaml and Delphi and other languages.
%description -l pl.UTF-8
Programowy szkielet dla rozwoju skalowanych usług dla różnych języków
@@ -48,7 +71,6 @@ do tworzenie usług które spawnie działają pomiędzy C++, Javą,
Pythonem, PHP, Rybym, Erlangiem, Perlem, Haskellem, C#, Cocoa,
Smalltalikiem i Ocamlem.
-
%package devel
Summary: C++ header files
Summary(pl.UTF-8): Pliki nagłówkowe i bibliotek iterfejsu C++ thrift
@@ -61,7 +83,6 @@ Header and libarary files for C++ thrift inteface.
%description devel -l pl.UTF-8
Pliki nagłówkowe i bibliotek iterfejsu C++ thrift.
-
%package static
Summary: Thrift C++ static libraries
Summary(pl.UTF-8): Biblioteki statyczne iterfejsu C++ thrift
@@ -74,20 +95,18 @@ Static libarary files for C++ thrift inteface.
%description static -l pl.UTF-8
Statyczne biblioteki iterfejsu C++ thrift.
-
-%package -n %{name}-libs
+%package libs
Summary: C++ thrift interface libraries
Summary(pl.UTF-8): Interfejs thrift dla C++
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
-%description -n %{name}-libs
+%description libs
C++ thrift interface libraries
-%description -n %{name}-libs -l pl.UTF-8
+%description libs -l pl.UTF-8
Biblioteki interfejsu thrift dla C++.
-
%package -n python-%{name}
Summary: Python thrift interface
Summary(pl.UTF-8): Interfejs thrift dla Pythona
@@ -102,23 +121,34 @@ Interfejs thrift dla Pythona.
%prep
%setup -q
-%patch0 -p1
-%patch1 -p1
+#%patch0 -p1
+#%patch1 -p1
%build
-# %{__aclocal}
-# %{__autoconf}
+%{__aclocal} -I aclocal
+%{__autoconf}
%{__autoheader}
%{__automake}
%configure \
- --without-csharp \
- --without-erlang \
- --without-haskell \
- --without-java \
- --without-perl \
- --without-php \
- --without-php_extension \
- --without-ruby
+ %{__with_without cpp} \
+ %{__with_without qt4} \
+ %{__with_without c_glib} \
+ %{__with_without csharp} \
+ %{__with_without java} \
+ %{__with_without erlang} \
+ %{__with_without python} \
+ %{__with_without bcond_without} \
+ %{__with_without perl} \
+ %{__with_without php} \
+ %{__with_without php_extension} \
+ %{__with_without ruby} \
+ %{__with_without haskell} \
+ %{__with_without go} \
+ %{__with_without d} \
+ --with-boost \
+ --with-libevent \
+ --with-zlib \
+ %{__with_without tests}
%{__make} -j1
@@ -142,15 +172,22 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/thrift
+%if %{with cpp}
+%files libs
+%defattr(644,root,root,755)
+%{_libdir}/libthrift-%{version}.so
+%{_libdir}/libthriftnb-%{version}.so
+%{_libdir}/libthriftz-%{version}.so
+
%files devel
%defattr(644,root,root,755)
%{_libdir}/libthrift.la
-%{_libdir}/libthriftz.la
%{_libdir}/libthriftnb.la
-%attr(755,root,root) %{_libdir}/libthrift.so
-%attr(755,root,root) %{_libdir}/libthriftz.so
-%attr(755,root,root) %{_libdir}/libthriftnb.so
-%{_includedir}/%{name}
+%{_libdir}/libthriftz.la
+%{_libdir}/libthrift.so
+%{_libdir}/libthriftnb.so
+%{_libdir}/libthriftz.so
+%{_includedir}/thrift
%{_pkgconfigdir}/thrift-nb.pc
%{_pkgconfigdir}/thrift-z.pc
%{_pkgconfigdir}/thrift.pc
@@ -158,18 +195,11 @@ rm -rf $RPM_BUILD_ROOT
%files static
%defattr(644,root,root,755)
%{_libdir}/libthrift.a
-%{_libdir}/libthriftz.a
%{_libdir}/libthriftnb.a
+%{_libdir}/libthriftz.a
+%endif
-%files libs
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libthrift.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libthrift.so.0
-%attr(755,root,root) %{_libdir}/libthriftz.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libthriftz.so.0
-%attr(755,root,root) %{_libdir}/libthriftnb.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libthriftnb.so.0
-
+%if %{with python}
%files -n python-%{name}
%defattr(644,root,root,755)
%dir %{py_sitedir}/%{name}
@@ -182,5 +212,6 @@ rm -rf $RPM_BUILD_ROOT
%{py_sitedir}/%{name}/transport/*.py[co]
%{py_sitedir}/%{name}/*.py[co]
%if "%{py_ver}" > "2.4"
-%{py_sitedir}/Thrift-*.egg-info
+%{py_sitedir}/thrift-%{version}-py*.egg-info
+%endif
%endif
diff --git a/thrift-Werror_strlcpy_fix.patch b/thrift-Werror_strlcpy_fix.patch
index 139fab2..e635863 100644
--- a/thrift-Werror_strlcpy_fix.patch
+++ b/thrift-Werror_strlcpy_fix.patch
@@ -1,12 +1,11 @@
-diff -urN thrift-0.2.0.org//lib/rb/ext/extconf.rb thrift-0.2.0/lib/rb/ext/extconf.rb
---- thrift-0.2.0.org//lib/rb/ext/extconf.rb 2009-03-20 05:21:39.000000000 +0100
-+++ thrift-0.2.0/lib/rb/ext/extconf.rb 2010-03-28 22:31:42.000000000 +0200
-@@ -19,7 +19,7 @@
+--- thrift-0.9.1/lib/rb/ext/extconf.rb~ 2013-08-15 17:04:29.000000000 +0300
++++ thrift-0.9.1/lib/rb/ext/extconf.rb 2013-10-06 02:22:38.662385994 +0300
+@@ -24,7 +24,7 @@
- require 'mkmf'
+ $ARCH_FLAGS = Config::CONFIG['CFLAGS'].scan( /(-arch )(\S+)/ ).map{|x,y| x + y + ' ' }.join('')
--$CFLAGS = "-g -O2 -Wall -Werror"
-+$CFLAGS = "-g -O2 -Wall"
+- $CFLAGS = "-fsigned-char -g -O2 -Wall -Werror " + $ARCH_FLAGS
++ $CFLAGS = "-fsigned-char -g -O2 -Wall " + $ARCH_FLAGS
- have_func("strlcpy", "string.h")
+ have_func("strlcpy", "string.h")
diff --git a/thrift-cpp_link_fix.patch b/thrift-cpp_link_fix.patch
index a90aaf2..5a3872d 100644
--- a/thrift-cpp_link_fix.patch
+++ b/thrift-cpp_link_fix.patch
@@ -1,14 +1,13 @@
---- thrift-0.5.0/lib/cpp/Makefile.am.cpp-link-fix 2011-04-13 11:46:42.019642012 +0200
-+++ thrift-0.5.0/lib/cpp/Makefile.am 2011-04-13 11:51:04.054913018 +0200
-@@ -73,9 +73,10 @@ libthrift_la_SOURCES = src/Thrift.cpp \
- src/processor/PeekProcessor.cpp
-
- libthriftnb_la_SOURCES = src/server/TNonblockingServer.cpp
+--- thrift-0.9.1/lib/cpp/Makefile.am~ 2013-08-16 02:19:40.000000000 +0300
++++ thrift-0.9.1/lib/cpp/Makefile.am 2013-10-06 02:24:00.209500307 +0300
+@@ -101,8 +101,10 @@
+ src/thrift/async/TAsyncProtocolProcessor.cpp \
+ src/thrift/async/TEvhttpServer.cpp \
+ src/thrift/async/TEvhttpClientChannel.cpp
+libthriftnb_la_LIBADD = -levent -lthrift
- libthriftz_la_SOURCES = src/transport/TZlibTransport.cpp
--
+ libthriftz_la_SOURCES = src/thrift/transport/TZlibTransport.cpp
+libthriftz_la_LIBADD = -lz -lthrift
- # Flags for the various libraries
- libthriftnb_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBEVENT_CPPFLAGS)
+ libthriftqt_la_MOC = src/thrift/qt/moc_TQTcpServer.cpp
+ libthriftqt_la_SOURCES = $(libthriftqt_la_MOC) \
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/thrift.git/commitdiff/ba0896eb604c7a39061cf52e8632d8668e6364ff
More information about the pld-cvs-commit
mailing list