packages: tinyxml/tinyxml.spec - use libtool to build library, use 0:0:0 as...

sparky sparky at pld-linux.org
Mon Dec 6 16:27:56 CET 2010


Author: sparky                       Date: Mon Dec  6 15:27:56 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- use libtool to build library, use 0:0:0 as its version
- BR: libstdc++-devel, libtool

---- Files affected:
packages/tinyxml:
   tinyxml.spec (1.5 -> 1.6) 

---- Diffs:

================================================================
Index: packages/tinyxml/tinyxml.spec
diff -u packages/tinyxml/tinyxml.spec:1.5 packages/tinyxml/tinyxml.spec:1.6
--- packages/tinyxml/tinyxml.spec:1.5	Mon Dec  6 16:09:14 2010
+++ packages/tinyxml/tinyxml.spec	Mon Dec  6 16:27:51 2010
@@ -11,6 +11,8 @@
 # Source0-md5:	60f92af4f43364ab0c6d5b655e804bd3
 Patch0:		%{name}-flags.patch
 URL:		http://www.grinninglizard.com/tinyxml/
+BuildRequires:	libstdc++-devel
+BuildRequires:	libtool
 BuildRequires:	unzip
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -48,18 +50,17 @@
 
 # Not really designed to be build as lib
 for i in tinyxml.cpp tinystr.cpp tinyxmlerror.cpp tinyxmlparser.cpp; do
-	%{__cxx} %{rpmcxxflags} -fPIC -o $i.o -c $i
+	libtool --tag=CXX --mode=compile %{__cxx} %{rpmldflags} %{rpmcxxflags} -o $i.lo -c $i
 done
-%{__cxx} %{rpmcxxflags} %{rpmldflags} -shared -o libtinyxml.so.0.%{version} *.cpp.o
+libtool --tag=CXX --mode=link %{__cxx} %{rpmcxxflags} %{rpmldflags} -shared -rpath %{_libdir} -version-info 0:0:0 -o libtinyxml.la *.cpp.lo
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}}
 
 cp -a xmltest $RPM_BUILD_ROOT%{_bindir}
-cp -a libtinyxml.so.0.%{version} $RPM_BUILD_ROOT%{_libdir}
 cp -a tiny*.h $RPM_BUILD_ROOT%{_includedir}
-ln -s libtinyxml.so.0.%{version} $RPM_BUILD_ROOT%{_libdir}/libtinyxml.so
+libtool --mode=install %{__install} -c libtinyxml.la $RPM_BUILD_ROOT%{_libdir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -84,6 +85,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.6  2010/12/06 15:27:51  sparky
+- use libtool to build library, use 0:0:0 as its version
+- BR: libstdc++-devel, libtool
+
 Revision 1.5  2010/12/06 15:09:14  lisu
 - one more fix
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/tinyxml/tinyxml.spec?r1=1.5&r2=1.6&f=u



More information about the pld-cvs-commit mailing list