Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 73ce69967ea31820954a2c239dd632b0 > files > 3

sablotron-1.0.3-2mdv2008.0.src.rpm

%define name sablotron
%define version 1.0.3
%define release %mkrel 2

%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
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
perl -pi -e 's,SABLOT_LIBS="-L\$sab_base/lib",SABLOT_LIBS="-L\$sab_base/%{_lib}",' SabTest-%{version}/configure{.in,}

%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
* Thu Jun 07 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 1.0.3-2mdv2008.0
+ Revision: 36950
- rebuild for expat


* Tue Feb 13 2007 Olivier Blin <oblin@mandriva.com> 1.0.3-1mdv2007.0
+ Revision: 120628
- use a perl one-liner to replace previous patch for lib64 tests
- don't require expat package
- 1.0.3 (and drop now useless patches)
- Import sablotron

* Wed Aug 24 2005 Gwenole Beauchesne <gbeauchesne@mandriva.com> 1.0.2-2mdk
- lib64 fixes

* Sun May 22 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

* Sat Jul 17 2004 Christiaan Welvaart <cjw@daneel.dyndns.org> 1.0.1-6mdk
- add BuildRequires: perl-XML-Parser

* Tue Jul 13 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.0.1-5mdk
- rebuild

* Wed Jun 09 2004 Götz Waschk <waschk@linux-mandrake.com> 1.0.1-4mdk
- patch for new g++

* Sun May 23 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.0.1-3mdk
- might as well let it provide sablotron-devel

* Sun May 23 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.0.1-2mdk
- disable readline support

* Fri May 21 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