packages: thrift/thrift.spec, thrift/thrift-cpp_link_fix.patch (NEW) - Fix...

matkor matkor at pld-linux.org
Wed Apr 13 13:51:27 CEST 2011


Author: matkor                       Date: Wed Apr 13 11:51:27 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:

- Fixed cpp libs build. Split to devel libs and static.
  Needs cpp libarary testing.

---- Files affected:
packages/thrift:
   thrift.spec (1.12 -> 1.13) , thrift-cpp_link_fix.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/thrift/thrift.spec
diff -u packages/thrift/thrift.spec:1.12 packages/thrift/thrift.spec:1.13
--- packages/thrift/thrift.spec:1.12	Sun Jan 23 20:15:47 2011
+++ packages/thrift/thrift.spec	Wed Apr 13 13:51:21 2011
@@ -1,7 +1,6 @@
 # $Revision$, $Date$
 # TODO
 # - BR for java, ruby, perl, more general BR
-# - package -libs & ldconfig
 # - Separate packages per each language
 # - fix perl: missing vendordir on install
 # - fix java: not installing to %{_javadir}
@@ -9,20 +8,22 @@
 # - Fix ruby install
 # - Fix PHP build
 # - Add Mono
-# - Fix c++ - libthriftnb.so lacks some libs when linking
-# - Consider rename current -devel to thrift-cpp ?
+# - Fix parallel build make.
 
 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:	3
+Release:	3.9
 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
 Patch0:		%{name}-Werror_strlcpy_fix.patch
+Patch1:		%{name}-cpp_link_fix.patch
 URL:		http://incubator.apache.org/thrift/
+BuildRequires:	autoconf
+BuildRequires:	automake
 BuildRequires:	bison
 BuildRequires:	boost-devel >= 1.33.1
 BuildRequires:	flex
@@ -48,17 +49,45 @@
 Pythonem, PHP, Rybym, Erlangiem, Perlem, Haskellem, C#, Cocoa,
 Smalltalikiem i Ocamlem.
 
-# %package devel
-# Summary:	C++ interface for thrift
-# Summary(pl.UTF-8):	Pliki nagłówkowe i bibliotek iterfejsu C++ thrift
-# Group:		Development/Libraries
-# Requires:	%{name} = %{version}-%{release}
 
-# %description devel
-# Header and libarary files for C++ thrift inteface.
+%package devel
+Summary:	C++ header files
+Summary(pl.UTF-8):	Pliki nagłówkowe i bibliotek iterfejsu C++ thrift
+Group:		Development/Libraries
+Requires:	%{name}-cpp = %{version}-%{release}
+
+%description devel
+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
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static libarary files for C++ thrift inteface.
+
+%description static -l pl.UTF-8
+Statyczne biblioteki iterfejsu C++ thrift.
+
+
+%package -n %{name}-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
+C++ thrift interface libraries
+
+%description -n %{name}-libs -l pl.UTF-8
+Biblioteki interfejsu thrift dla C++.
 
-# %description devel -l pl.UTF-8
-# Pliki nagłówkowe i bibliotek iterfejsu C++ thrift.
 
 %package -n python-%{name}
 Summary:	Python thrift interface
@@ -75,10 +104,14 @@
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
+# %{__aclocal}
+# %{__autoconf}
+%{__autoheader}
+%{__automake}
 %configure \
-	--without-cpp \
 	--without-csharp \
 	--without-erlang \
 	--without-haskell \
@@ -88,7 +121,7 @@
 	--without-php_extension \
 	--without-ruby
 
-%{__make}
+%{__make} -j1
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -103,20 +136,40 @@
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post   libs -p /sbin/ldconfig
+%postun libs -p /sbin/ldconfig
+
 %files
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/thrift
 
-# %files devel
-# %defattr(644,root,root,755)
-# %{_libdir}/libthrift.so
-# %{_libdir}/libthrift.la
-# %{_libdir}/libthriftz.so
-# %{_libdir}/libthriftz.la
-# %{_includedir}/%{name}
-# %{_pkgconfigdir}/thrift-nb.pc
-# %{_pkgconfigdir}/thrift-z.pc
-# %{_pkgconfigdir}/thrift.pc
+%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}
+%{_pkgconfigdir}/thrift-nb.pc
+%{_pkgconfigdir}/thrift-z.pc
+%{_pkgconfigdir}/thrift.pc
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libthrift.a
+%{_libdir}/libthriftz.a
+%{_libdir}/libthriftnb.a
+
+%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
 
 %files -n python-%{name}
 %defattr(644,root,root,755)
@@ -139,6 +192,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.13  2011/04/13 11:51:21  matkor
+
+- Fixed cpp libs build. Split to devel libs and static.
+  Needs cpp libarary testing.
+
 Revision 1.12  2011/01/23 19:15:47  sparky
 - removed %dir %{py_sitedir} from python files
 - release: 3, STBR

================================================================
Index: packages/thrift/thrift-cpp_link_fix.patch
diff -u /dev/null packages/thrift/thrift-cpp_link_fix.patch:1.1
--- /dev/null	Wed Apr 13 13:51:27 2011
+++ packages/thrift/thrift-cpp_link_fix.patch	Wed Apr 13 13:51:21 2011
@@ -0,0 +1,14 @@
+--- 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
++libthriftnb_la_LIBADD = -levent -lthrift
+ 
+ libthriftz_la_SOURCES = src/transport/TZlibTransport.cpp
+-
++libthriftz_la_LIBADD = -lz -lthrift
+ 
+ # Flags for the various libraries
+ libthriftnb_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBEVENT_CPPFLAGS)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/thrift/thrift.spec?r1=1.12&r2=1.13&f=u



More information about the pld-cvs-commit mailing list