+# TODO:
+# - fix build without libxml2-devel (python library uses old headers)
#
# Conditional build:
+%bcond_without apidocs # do not build and package API docs
%bcond_without python # don't build python module
%bcond_without static_libs # don't build static libraries
%bcond_without zlib # don't use zlib
-#
+
Summary: libXML library
Summary(es.UTF-8): Biblioteca libXML version 2
Summary(pl.UTF-8): Biblioteka libXML wersja 2
Summary(pt_BR.UTF-8): Biblioteca libXML versão 2
Name: libxml2
-Version: 2.7.6
-Release: 5
+Version: 2.7.7
+Release: 3
Epoch: 1
License: MIT
Group: Libraries
#Source0: http://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/%{name}-%{version}.tar.bz2
Source0: ftp://xmlsoft.org/libxml2/%{name}-%{version}.tar.gz
-# Source0-md5: 7740a8ec23878a2f50120e1faa2730f2
+# Source0-md5: 9abc9959823ca9ff904f1fbcf21df066
Patch0: %{name}-amfix.patch
Patch1: %{name}-man_fixes.patch
Patch2: %{name}-open.gz.patch
# history support in xmllint is disabled by default
#BuildRequires: ncurses-devel
#BuildRequires: readline-devel >= 4.2
-Obsoletes: xml-common
Requires: zlib >= 1.2.3.3
+Obsoletes: xml-common
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Group: Development/Libraries
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: zlib-devel
-%{?with_zlib:BuildRequires: zlib-devel}
%description devel
Header files etc you can use to develop libxml2 applications.
%if %{with python}
mv -f $RPM_BUILD_ROOT%{_docdir}/%{name}-python-%{version}/examples/* \
$RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
+cd python
+./setup.py install_egg_info --install-dir=$RPM_BUILD_ROOT%{py_sitedir}
+cd ..
%endif
# move html doc to -devel package
%{_libdir}/libxml2.a
%endif
+%if %{with apidocs}
%files apidocs
%defattr(644,root,root,755)
%{_gtkdocdir}/libxml2
+%endif
%files progs
%defattr(644,root,root,755)
%attr(755,root,root) %{py_sitedir}/libxml2mod.so
%{py_sitedir}/drv_libxml2.py[co]
%{py_sitedir}/libxml2.py[co]
+%{py_sitedir}/libxml2_python-*.egg-info
%{_examplesdir}/python-%{name}-%{version}
%endif