%define name sablotron %define version 1.0.2 %define release 2mdk %define altname Sablot %define builddir $RPM_BUILD_DIR/%{altname}-%{version} %define libname_orig libsablotron %define major 0 %define libname %mklibname %{name} %{major} %{!?jscript: %define jscript 1} %{!?readline: %define readline 0} %{!?GPL: %define GPL 0} Summary: XSLT, XPath and DOM processor Name: %{name} Version: %{version} Release: %{release} %if %{GPL} License: GPL %else License: MPL/GPL %endif Group: Development/Other URL: http://www.gingerall.cz Source0: http://download-1.gingerall.cz/download/sablot/%{altname}-%{version}.tar.bz2 Source1: http://download-1.gingerall.cz/download/sablot/SabTest-%{version}.tar.bz2 Patch0: Sablot-1.0.2-libs.diff.bz2 Patch1: sablot-lib-1.0.1-gcc3.4.patch.bz2 Patch2: Sablot-1.0.2-lib64.patch.bz2 Requires: expat >= 1.95.2 BuildRequires: expat-devel >= 1.95.2 BuildRequires: perl-XML-Parser BuildRequires: ncurses-devel BuildRequires: libstdc++-devel BuildRequires: autoconf2.5 BuildRequires: automake1.9 >= 1.9.2 %if %{jscript} BuildRequires: js-devel >= 1.5 %endif %if %{readline} BuildRequires: readline-devel %endif %if %mdkversion >= 1020 BuildRequires: multiarch-utils >= 1.0.3 %endif BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot %description Sablotron is a fast, compact and portable XML toolkit implementing XSLT, DOM and XPath. The goal of this project is to create a lightweight, reliable and fast XML library processor conforming to the W3C specification, which is available for public and can be used as a base for multi-platform XML applications. %package -n %{libname} Summary: Main library for sablotron Group: System/Libraries Provides: %{libname_orig} = %{version}-%{release} %description -n %{libname} Contains the library for sablotron. %package -n %{libname}-devel Summary: The development libraries and header files for Sablotron Requires: sablotron = %{version} Group: System/Libraries Requires(post,preun): %{libname} = %{version} Provides: %{libname_orig}-devel = %{version}-%{release} Provides: sablotron-devel = %{version} %description -n %{libname}-devel These are the development libraries and header files for Sablotron %prep %if %{readline} && !%{GPL} echo "The readline library may not be linked to non GPL'ed programs, so if you want to have readline support in the debugger, you have to choose the GPL from Sablotron license model." exit 1 %endif %setup -q -n %{altname}-%{version} -a1 %patch0 -p1 %patch1 -p1 cd SabTest-%{version} # XXX could have been a one-liner to avoid the aclocal machinery %patch2 -p2 -b .lib64 autoconf cd .. %build %if %{jscript} export CPLUS_INCLUDE_PATH=%{_includedir}/js-1.5 %endif export CXXFLAGS="%{optflags}" %if %{GPL} export SABLOT_GPL=1 %endif %configure2_5x \ %if %{jscript} --enable-javascript \ %endif %if %{GPL} && %{readline} --with-readline \ %endif --enable-debugger %make # make and run the test suite make DESTDIR=`pwd`/SabTest-%{version} install pushd SabTest-%{version} %configure2_5x --with-sablot=`pwd`/usr %make make test make test-js popd %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %makeinstall_std %if %mdkversion >= 1020 %multiarch_binaries %{buildroot}%{_bindir}/sablot-config %endif # nuke installed docs rm -rf %{buildroot}%{_datadir}/doc %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr(755,root,root) %{_bindir}/sabcmd %_mandir/man1/* %files -n %{libname} %defattr(-,root,root) %doc README RELEASE doc/misc/NOTES doc/misc/DEBUGGER %{_libdir}/libsablot.so.* %files -n %{libname}-devel %defattr(-,root,root) %doc doc/apidoc/sablot doc/apidoc/jsdom-ref doc/apidoc/sxp %if %mdkversion >= 1020 %multiarch %{multiarch_bindir}/sablot-config %endif %{_bindir}/sablot-config %{_libdir}/lib*.a %{_libdir}/lib*.la %{_libdir}/lib*.so %{_includedir}/*.h %changelog * Tue Aug 23 2005 Gwenole Beauchesne <gbeauchesne@mandriva.com> 1.0.2-2mdk - lib64 fixes * Sat May 21 2005 Oden Eriksson <oeriksson@mandriva.com> 1.0.2-1mdk - 1.0.2 - rediffed P0 - added the test suite - use new rpm-4.4.x pre,post magic * Wed Mar 16 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 1.0.1-7mdk - make it find the headers - fix deps and conditional %%multiarch * Fri Jul 16 2004 Christiaan Welvaart <cjw@daneel.dyndns.org> 1.0.1-6mdk - add BuildRequires: perl-XML-Parser * Mon Jul 12 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.0.1-5mdk - rebuild * Tue Jun 8 2004 Götz Waschk <waschk@linux-mandrake.com> 1.0.1-4mdk - patch for new g++ * Sat May 22 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.0.1-3mdk - might as well let it provide sablotron-devel * Sat May 22 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.0.1-2mdk - disable readline support * Thu May 20 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.0.1-1mdk - use the %%configure2_5x macro - sync with the spec file by Petr Cimpricg <petr@gingerall.cz> - spec file cleanups * Mon Nov 16 2003 Stefan van der Eijk <stefan@eijk.nu> 0.98-3mdk - rebuild 4 reupload (alpha) * Fri Jul 18 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 0.98-2mdk - rebuild * Mon Jun 2 2003 Damien Chaumette <dchaumette@mandrakesoft.com> 0.98-1mdk - 0.98 - fix patch * Mon Feb 10 2003 Stew Benedict <sbenedict@mandrakesoft.com> 0.97-1mdk - 0.97 - fixes PPC build, %%mklibname, sablot-config * Fri Dec 13 2002 Lenny Cartier <lenny@mandrakesoft.com> 0.96-1mdk - 0.96 * Wed Aug 14 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.95-4mdk - Automated rebuild with gcc 3.2-0.3mdk * Wed Aug 07 2002 Christian Belisle <cbelisle@mandrakesoft.com> 0.95-3mdk - fix Provides (thanx to Olivier). * Thu Jul 25 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.95-2mdk - Automated rebuild with gcc3.2 * Tue Jun 25 2002 Christian Belisle <cbelisle@mandrakesoft.com> 0.95-1mdk - new version 0.95. * Tue May 28 2002 Christian Belisle <cbelisle@mandrakesoft.com> 0.90-2mdk - rebuild with gcc 3.1. * Wed Apr 03 2002 Christian Belisle <cbelisle@mandrakesoft.com> 0.90-1mdk - release 0.90. - patch to add -lexpat and -lstdc++ in libsablot.so (required for php4) * Mon Feb 04 2002 Christian Belisle <cbelisle@mandrakesoft.com> 0.82-1mdk - release 0.82. * Wed Jan 16 2002 Christian Belisle <cbelisle@mandrakesoft.com> 0.81-1mdk - release 0.81. - Removed patch for 0.80. * Tue Jan 15 2002 Christian Belisle <cbelisle@mandrakesoft.com> 0.80-1mdk - release 0.80. * Wed Nov 21 2001 Christian Belisle <cbelisle@mandrakesoft.com> 0.71-1mdk - release 0.71. - bzip2 the source. - remove the patch. * Tue Nov 06 2001 Philippe Libat <philippe@mandrakesoft.com> 0.70-2mdk - %macros - move sabcmd in sablotron rpm * Mon Nov 05 2001 Christian Belisle <cbelisle@mandrakesoft.com> 0.70-1mdk - first mdk release. * Tue Sep 18 2001 Petr Cimprich <petr@gingerall.cz> - sablotron 0.70 RPM release 1 * Wed Aug 15 2001 Petr Cimprich <petr@gingerall.cz> - sablotron 0.65 RPM release 1 * Thu Jun 14 2001 Petr Cimprich <petr@gingerall.cz> - sablotron 0.60 RPM release 1 - build under RedHat 7.1 with rpm 4.0.2 * Wed Apr 22 2001 Petr Cimprich <petr@gingerall.cz> - sablotron 0.52 RPM release 1 - based on 0.51-5 spec by Henri Gomez * Thu Feb 22 2001 Henri Gomez <hgomez@slib.fr> - sablotron 0.51 RPM release 5 - apply patch to add -lexpat and -lstdc++ in libsablot.so REQUIRED for use with PHP4 * Thu Feb 22 2001 Henri Gomez <hgomez@slib.fr> - sablotron 0.51 RPM release 4 - follow Redhat way to dispatch between pack and pack-devel * Tue Feb 20 2001 Henri Gomez <hgomez@slib.fr> - sablotron 0.51 RPM release 3 - added ldconfig is post/preun and cleanup stuff - build under Redhat 6.2 + updates with rpm 3.0.5 * Mon Feb 19 2001 Henri Gomez <hgomez@slib.fr> - sablotron 0.51 RPM release 2 - added Requires expat >= 1.95.1 * Mon Feb 19 2001 Henri Gomez <hgomez@slib.fr> - sablotron 0.51 RPM release 1 - updated spec file