Summary: Library providing the XSLT engine Name: libxslt Version: 1.1.5 Release: 2 License: IBM_ILA Group: Development/Libraries Source0: ftp://xmlsoft.org/%{name}-%{version}.tar.bz2 Patch0: %{name}-date.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root URL: http://xmlsoft.org/XSLT/ Requires: libxml2 >= 2.6.8 BuildRequires: libxml2-devel >= 2.6.8 Prefix: %{_prefix} Docdir: %{_docdir} %define DEFCC /usr/vac/bin/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 C library allows to transform XML files into other XML files (or HTML, text, ...) using the standard XSLT stylesheet transformation mechanism. To use it you need to have a version of libxml2 >= 2.6.8 installed. The xsltproc command is a command line interface to the XSLT engine %package devel Summary: Libraries, includes, etc. to embed the XSLT engine Group: Development/Libraries Requires: libxslt = %{version} Requires: libxml2-devel >= 2.6.8 %description devel This C library allows to transform XML files into other XML files (or HTML, text, ...) using the standard XSLT stylesheet transformation mechanism. To use it you need to have a version of libxml2 >= 2.6.8 installed. %prep %setup -q %patch -p0 -b .date # Put License into place cat $RPM_SOURCE_DIR/IBM_ILA Copyright > 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 bzip2 -dc %{SOURCE0} |tar -xf - cd %{name}-%{version} %patch -p0 -b .date %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::'` #export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -ma -qlanglvl=extended" export RPM_OPT_FLAGS="$RPM_OPT_FLAGS" export CFLAGS="$RPM_OPT_FLAGS" fi export OBJECT_MODE=32 ./configure --prefix=%{prefix} --sysconfdir="%{prefix}/etc" \ --mandir=%{_mandir} --disable-static make %if %{BUILD64} == 1 # Now build again as 64bit ########################### cd 64bit/%{name}-%{version} export OBJECT_MODE=64 ./configure --prefix=%{prefix} --sysconfdir="%{prefix}/etc" --mandir=%{_mandir} \ --disable-static --without-python make # Go back to 32-bit library and add our 64bit shared objects # into same archives cd ../.. /usr/bin/ar -q libxslt/.libs/libxslt.a \ 64bit/%{name}-%{version}/libxslt/.libs/libxslt.so.1 /usr/bin/ar -q libexslt/.libs/libexslt.a \ 64bit/%{name}-%{version}/libexslt/.libs/libexslt.so.0 %endif #BUILD64 %install rm -rf $RPM_BUILD_ROOT export OBJECT_MODE=32 %makeinstall /usr/bin/strip $RPM_BUILD_ROOT%{prefix}/bin/* || : # Make links ( cd $RPM_BUILD_ROOT for dir in bin include lib do mkdir -p usr/$dir cd usr/$dir ln -sf ../..%{prefix}/$dir/* . cd - done ) %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 # The make install recreated the libexslt.a library instead of copying # it as it was; that means the 64-bit member gets left out. Why does it # do that? libxslt.a doesn't do that. Anyway, copy the one with the 64-bit # member into place cp ./libexslt/.libs/libexslt.a $RPM_BUILD_ROOT%{prefix}/lib/libexslt.a %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-, root, root) %doc AUTHORS ChangeLog NEWS README Copyright TODO FEATURES LICENSE %doc %{_mandir}/man1/* %{prefix}/lib/*.a %{prefix}/bin/xsltproc # links /usr/lib/*.a /usr/bin/xsltproc %if %{BUILD64} == 1 %attr(755, bin, bin) %dir %{prefix64} %attr(755, bin, bin) %dir %{prefix64}/lib %{prefix64}/lib/lib*.a %endif %files devel %defattr(-, root, root) %doc AUTHORS ChangeLog NEWS README Copyright TODO FEATURES LICENSE %doc doc/libxslt-api.xml %doc doc/*.html doc/html doc/tutorial doc/*.gif %doc %{_mandir}/man3/* %{prefix}/lib/*.a %{prefix}/lib/*.sh %{prefix}/share/aclocal/libxslt.m4 %{prefix}/include/* %{prefix}/bin/xslt-config %dir %{prefix}/lib/pkgconfig %{prefix}/lib/pkgconfig/*.pc # links /usr/lib/*.a /usr/lib/*.sh /usr/include/* /usr/bin/xslt-config /usr/lib/pkgconfig/*.pc %changelog * Thu Jun 03 2004 David Clissold 1.1.5-2 - 64-bit member of libexslt.a was getting clobbered. - - Was missing libexslt.pc. * Fri Apr 30 2004 David Clissold 1.1.5-1 - Update to version 1.1.5 * Tue Feb 24 2004 David Clissold 1.0.32-2 - build 64-bit library members * Thu Oct 23 2003 David Clissold - Update to 1.0.32 * Wed Feb 13 2002 Reza Arbab - Modified for AIX freeware distribution. * Fri Feb 8 2002 Daniel.Veillard - added the python module -changed the Licence to MIT * Sat Nov 10 2001 Daniel.Veillard - cleaned up the specfile * Mon Jan 22 2001 Daniel.Veillard - created based on libxml2 spec file