Summary: A library for parsing XML. Name: expat Version: 1.95.2 Release: 4 Group: System Environment/Libraries Source: http://download.sourceforge.net/expat/expat-%{version}.tar.gz Source1: IBM_ILA Patch0: %{name}-%{version}-destdir.patch License: IBM_ILA URL: http://sourceforge.net/projects/expat Prefix: %{_prefix} BuildRoot: %{_tmppath}/%{name}-root BuildRequires: libtool >= 1.3.5 %define DEFCC xlc # Use --define 'no64 1' on the command line to disable 64bit build %{!?no64:%define BUILD64 1} %{?no64:%define BUILD64 0} %define prefix64 %{prefix}/64 %description This is expat, the C library for parsing XML, written by James Clark. Expat is a stream oriented XML parser. This means that you register handlers with the parser prior to starting the parse. These handlers are called when the parser discovers the associated structures in the document being parsed. A start tag is an example of the kind of structures for which you may register handlers. %package devel Summary: Libraries and include files to develop XML applications with expat. Group: Development/Libraries PreReq: expat = %{version} %description devel The expat-devel package contains the libraries, include files and documentation to develop XML applications with expat. %prep %setup -q %patch0 -p1 -b .destdir # Add license info cat $RPM_SOURCE_DIR/IBM_ILA > LICENSE cat COPYING >> LICENSE %if %{BUILD64} == 1 # Prep 64-bit build in 64bit subdirectory ########################################## # Test whether we can run a 64bit command so we don't waste our time /usr/bin/locale64 >/dev/null 2>&1 mkdir 64bit cd 64bit gzip -dc %{SOURCE0} |tar -xf - cd %{name}-%{version} %patch0 -p1 -b .destdir %endif %build # Use the default compiler for this platform - gcc otherwise if [[ -z "$CC" ]] then if test "X`type %{DEFCC} 2>/dev/null`" != 'X'; then export CC=%{DEFCC} else export CC=gcc fi fi if test "X$CC" != "Xgcc" then export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's:-fsigned-char::'` else export CFLAGS64="-maix64" fi export CFLAGS="$RPM_OPT_FLAGS" OBJECT_MODE=32 #just to make sure libtoolize --copy --force aclocal -I conftools autoconf %configure --disable-static make # Strip the binary if unstripped /usr/bin/strip xmlwf/xmlwf || : %if %{BUILD64} == 1 # Now build again as 64bit ########################### cd 64bit/%{name}-%{version} export OBJECT_MODE=64 export CC="$CC $CFLAGS64" libtoolize --copy --force aclocal -I conftools autoconf %configure --prefix=%{prefix64} --disable-static make # Strip the binary if unstripped /usr/bin/strip xmlwf/xmlwf || : # Go back to 32-bit library and add our 64bit shared object # into same archive cd ../../lib/.libs /usr/bin/ar -q \ libexpat.a ../../64bit/%{name}-%{version}/lib/.libs/libexpat.so.0 %endif #BUILD64 %install rm -rf ${RPM_BUILD_ROOT} make DESTDIR=$RPM_BUILD_ROOT install ( cd $RPM_BUILD_ROOT for dir in include bin do mkdir -p usr/$dir || : cd usr/$dir ln -sf ../..%{prefix}/$dir/* . cd - done mkdir -p usr/lib cd usr/lib ln -sf ../..%{prefix}/lib/* . cd - ) %if %{BUILD64} == 1 #Add links for 64-bit library members ( mkdir -p $RPM_BUILD_ROOT/%{prefix64}/lib cd $RPM_BUILD_ROOT/%{prefix64}/lib ln -s ../../lib/*.a . ) %endif %clean rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,root) %doc README COPYING LICENSE %{prefix}/lib/*.a /usr/lib/*.a %{prefix}/bin/* /usr/bin/* %if %{BUILD64} == 1 %dir %{prefix64} %dir %{prefix64}/lib %{prefix64}/lib/lib*.a %endif %files devel %defattr(-,root,root) %doc doc examples LICENSE %{prefix}/lib/lib*.la %{_includedir}/*.h /usr/lib/*.la /usr/include/*.h %changelog * Mon Feb 16 2004 David Clissold 1.95.2-4 - Build 64-bit libexpat also. - Add xmlwf. Build with VAC. * Fri Nov 22 2002 David Clissold - Add IBM ILA license. * Wed Oct 24 2001 David Clissold - No functional change. Modify SPEC for compat w/ newer libtool. * Mon Oct 08 2001 David Clissold - Update to 1.95.2 - Added patch, DESTDIR in lib/Makefile.in (level 1.95.1 was fine) * Thu May 31 2001 Marc Stephenson - Initial version for AIX Toolbox * Tue Oct 24 2000 Jeff Johnson - update to 1.95.1 * Sun Oct 8 2000 Jeff Johnson - Create.