File libxml2.spec of Package libxml2

#
# spec file for package libxml2 (Version 2.7.1)
#
# Copyright (c) 2010 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:        X11/MIT
Group:          System/Libraries
Summary:        A Library to Manipulate XML Files
Version:        2.7.1
Release:        9.<RELEASE13>
# bug437293
%ifarch ppc64
Obsoletes:      libxml2-64bit
%endif
%ifarch  ppc
Obsoletes:      libxml2-32bit
%endif
#
Source:         %{name}-%{version}.tar.bz2
# PATCH-FIX-OPENSUSE libxml2-2.7.1-printf.patch
Patch0:         %{name}-%{version}-printf.patch
# PATCH-FIX-OPENSUSE libxml2-2.7.1-alloc_size.patch meissner@novell.com
Patch1:         %{name}-%{version}-alloc_size.patch
# PATCH-FIX-UPSTREAM libxml2-2.7.1-CVE-2008-4409.patch [bgo#554660] [bnc#432486]
Patch2:         %{name}-%{version}-CVE-2008-4409.patch
# PATCH-FIX-UPSTREAM libxml2-2.7.1-CVE-2008-4226.patch [bnc#441368]
Patch3:         %{name}-%{version}-CVE-2008-4226.patch
# PATCH-FIX-UPSTREAM libxml2-2.7.1-CVE-2008-4225.patch [bnc#445677]
Patch4:         %{name}-%{version}-CVE-2008-4225.patch
# PATCH-FIX-OPENSUSE libxml2-2.7.1-xmlsave.patch [bnc#437203]
Patch5:         %{name}-%{version}-xmlsave.patch
# PATCH-FIX-OPENSUSE libxml2-2.7.1-oldsax.patch [bnc#457056]
Patch6:         %{name}-%{version}-oldsax.patch
# PATCH-FIX-OPENSUSE libxml2-2.7.1-CVE-2009-2414_CVE-2009-2616.patch [bnc#528007]
Patch7:         %{name}-%{version}-CVE-2009-2414_CVE-2009-2616.patch
# PATCH-FIX-OPENSUSE libxml2-xpath-ns-attr-axis.patch [bnc#648277]
Patch8:         libxml2-xpath-ns-attr-axis.patch
Patch9:         libxml2-CVE-2010-4494.patch
Patch10:        libxml2-CVE-2011-1944.patch
Patch11:        libxml2-CVE-2011-2821.patch
# PATCH-FIX-UPSTREAM CVE-2011-3919 (bnc#739894)
Patch12:        libxml2-CVE-2011-3919.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Url:            http://xmlsoft.org

%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.


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

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


%package doc
License:        X11/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.


%prep
%setup -q
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%patch7
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -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
openSUSE Build Service is sponsored by