File libxml2.spec of Package libxml2

#
# spec file for package libxml2 (Version 2.7.3)
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           libxml2
BuildRequires:  readline-devel zlib-devel
License:        MIT
Group:          System/Libraries
Summary:        A Library to Manipulate XML Files
Url:            http://xmlsoft.org
Version:        2.7.3
Release:        2.<RELEASE4>
Source:         %{name}-%{version}.tar.bz2
Patch1:         libxml2-xpath-ns-attr-axis.patch
Patch2:         libxml2-CVE-2010-4494.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# bug437293
%ifarch ppc64
Obsoletes:      libxml2-64bit
%endif

%description
The XML C library was initially developed for the GNOME project. It is
now used by many programs to load and save extensible data structures
or manipulate any kind of XML files.

This library implements a number of existing standards related to
markup languages, including the XML standard, name spaces in XML, XML
Base, RFC 2396, XPath, XPointer, HTML4, XInclude, SGML catalogs, and
XML catalogs. In most cases, libxml tries to implement the
specification in a rather strict way. To some extent, it provides
support for the following specifications, but does not claim to
implement them: DOM, FTP client, HTTP client, and SAX.

The library also supports RelaxNG. Support for W3C XML Schemas is in
progress.



Authors:
--------
    Daniel Veillard <Daniel.Veillard@imag.fr>
    Alejandro Forero <bachue@bachue.com>
    Chris Lahey <clahey@umich.edu>
    Christopher Blizzard <blizzard@appliedtheory.com>
    James Henstridge <james@daa.com.au>
    Jody Goldberg <jgoldberg@home.com>
    Manish Vachharajani <mvachhar@vger.rutgers.edu>
    Martin Baulig <baulig@suse.de>
    Michael Meeks <michael@edenproject.org>
    Miguel de Icaza <miguel@nuclecu.unam.mx>
    Nuno Ferreira <nmrf@rnl.ist.utl.pt>
    Raja R Harinath <harinath@cs.umn.edu>
    Ramiro Estrugo <ramiro@eazel.com>
    Raph Levien <raph@acm.org>
    Sven Heinicke <sven@zen.org>
    Timur Bakeyev <mc@bat.ru>
    Tomasz K&#322;oczko <kloczek@pld.org.pl>
    Tom Tromey <tromey@cygnus.com>

%package devel
License:        MIT
Summary:        Include Files and Libraries mandatory for Development
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
Requires:       zlib-devel readline-devel
Requires:       glibc-devel
# bug437293
%ifarch ppc64
Obsoletes:      libxml2-devel-64bit
%endif

%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.



Authors:
--------
    cf. libxml2.

%package doc
License:        MIT
Summary:        A Library to Manipulate XML Files
Group:          System/Libraries
Requires:       %{name} = %{version}

%description doc
The XML C library was initially developed for the GNOME project. It is
now used by many programs to load and save extensible data structures
or manipulate any kind of XML files.

This library implements a number of existing standards related to
markup languages, including the XML standard, name spaces in XML, XML
Base, RFC 2396, XPath, XPointer, HTML4, XInclude, SGML catalogs, and
XML catalogs. In most cases, libxml tries to implement the
specification in a rather strict way. To some extent, it provides
support for the following specifications, but does not claim to
implement them: DOM, FTP client, HTTP client, and SAX.

The library also supports RelaxNG. Support for W3C XML Schemas is in
progress.



Authors:
--------
    Daniel Veillard <Daniel.Veillard@imag.fr>
    Alejandro Forero <bachue@bachue.com>
    Chris Lahey <clahey@umich.edu>
    Christopher Blizzard <blizzard@appliedtheory.com>
    James Henstridge <james@daa.com.au>
    Jody Goldberg <jgoldberg@home.com>
    Manish Vachharajani <mvachhar@vger.rutgers.edu>
    Martin Baulig <baulig@suse.de>
    Michael Meeks <michael@edenproject.org>
    Miguel de Icaza <miguel@nuclecu.unam.mx>
    Nuno Ferreira <nmrf@rnl.ist.utl.pt>
    Raja R Harinath <harinath@cs.umn.edu>
    Ramiro Estrugo <ramiro@eazel.com>
    Raph Levien <raph@acm.org>
    Sven Heinicke <sven@zen.org>
    Timur Bakeyev <mc@bat.ru>
    Tomasz K&#322;oczko <kloczek@pld.org.pl>
    Tom Tromey <tromey@cygnus.com>

%prep
%setup -q
%patch1 -p1
%patch2 -p1	

%build
%configure \
    --with-html-subdir=packages/%{name}/html \
    --with-fexceptions \
    --with-history \
    --without-python \
    --enable-ipv6
make %{?jobs:-j%jobs} DOC_MODULE=packages/%{name}

%check
make check

%install
%makeinstall DOC_MODULE=packages/%{name}
cp -a AUTHORS NEWS README COPYING* Copyright TODO* $RPM_BUILD_ROOT%{_docdir}/%{name}/
ln -s libxml2/libxml $RPM_BUILD_ROOT%{_includedir}/libxml

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%doc %dir %{_docdir}/%{name}
%doc %{_docdir}/%{name}/[ANRCT]*
%{_bindir}/xmllint
%{_bindir}/xmlcatalog
%{_libdir}/lib*.so.*
%doc %{_mandir}/man1/xmllint.1*
%doc %{_mandir}/man1/xmlcatalog.1*

%files devel
%defattr(-, root, root)
%{_bindir}/xml2-config
%{_datadir}/aclocal/libxml.m4
%{_includedir}/libxml
%{_includedir}/libxml2
%{_libdir}/lib*.so
%{_libdir}/*a
%{_libdir}/*.sh
%{_libdir}/pkgconfig/*.pc
%doc %{_mandir}/man1/xml2-config.1*
%doc %{_mandir}/man3/libxml.3*

%files doc
%defattr(-, root, root)
%{_datadir}/gtk-doc/html/*
%doc %{_docdir}/%{name}/examples
%doc %{_docdir}/%{name}/html
# owning these directories prevents gtk-doc <-> libxml2 build loop:
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html

%changelog