]> git.pld-linux.org Git - packages/libxml2.git/blobdiff - libxml2.spec
- updated to 2.8.0
[packages/libxml2.git] / libxml2.spec
index d5a0eed6fe71cc19af5b7405c520e6c8c96fe284..ea62ed7615083b1629837ba5892a24275631eee6 100644 (file)
@@ -1,37 +1,42 @@
+# TODO:
+# - fix build without libxml2-devel (python library uses old headers)
 #
 # Conditional build:
-%bcond_without python  # don't build python module
-%bcond_without static_libs # don't build static libraries
-#
+%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
+%bcond_with    mem_debug       # enable libxml2 memory debuging
+
 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.6.31
+Version:       2.8.0
 Release:       1
 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: 714b0683b1ec4bdc63bc356d729f9b18
-Patch0:                %{name}-amfix.patch
-Patch1:                %{name}-man_fixes.patch
-Patch2:                %{name}-open.gz.patch
-Patch3:                %{name}-DESTDIR.patch
+# Source0-md5: c62106f02ee00b6437f0fb9d370c1093
+Patch0:                %{name}-man_fixes.patch
+Patch1:                %{name}-open.gz.patch
+Patch2:                %{name}-largefile.patch
 URL:           http://xmlsoft.org/
-BuildRequires: autoconf >= 2.2
-BuildRequires: automake
+BuildRequires: autoconf >= 2.59
+BuildRequires: automake >= 1.4
 BuildRequires: libtool >= 1:1.4.2-9
 %{?with_python:BuildRequires:  python-devel}
 %{?with_python:BuildRequires:  python-modules}
 %{?with_python:BuildRequires:  rpm-pythonprov}
-BuildRequires: sed >= 4.0
-BuildRequires: zlib-devel
+BuildRequires: rpmbuild(macros) >= 1.219
+%{?with_zlib:BuildRequires:    zlib-devel >= 1.2.3.3}
 # history support in xmllint is disabled by default
 #BuildRequires:        ncurses-devel
 #BuildRequires:        readline-devel >= 4.2
+Requires:      zlib >= 1.2.3.3
 Obsoletes:     xml-common
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -133,11 +138,10 @@ Moduły języka Python dla biblioteki libxml2.
 %prep
 %setup -q
 %patch0 -p1
+%if %{with zlib}
 %patch1 -p1
+%endif
 %patch2 -p1
-%patch3 -p1
-
-sed -i -e 's,-L/usr/lib64,-L/usr/%{_lib},' xml2-config.in
 
 %build
 %{__libtoolize}
@@ -146,8 +150,11 @@ sed -i -e 's,-L/usr/lib64,-L/usr/%{_lib},' xml2-config.in
 %{__autoheader}
 %{__automake}
 %configure \
-       %{!?with_static_libs:--enable-static=no} \
-       %{!?with_python:--without-python}
+       --disable-silent-rules \
+       %{!?with_static_libs:--disable-static=no} \
+       %{!?with_python:--without-python} \
+       %{!?with_zlib:--without-zlib} \
+       --with%{!?with_mem_debug:out}-mem-debug
 
 %{__make}
 
@@ -156,6 +163,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT \
+       DEVHELP_DIR=%{_gtkdocdir}/libxml2 \
        m4datadir=%{_aclocaldir} \
        pkgconfigdir=%{_pkgconfigdir}
 
@@ -164,9 +172,16 @@ install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-devel-%{version} \
        $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
 mv $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/examples/* \
        $RPM_BUILD_ROOT%{_examplesdir}/%{name}-devel-%{version}
+
 %if %{with python}
 mv -f $RPM_BUILD_ROOT%{_docdir}/%{name}-python-%{version}/examples/* \
        $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
+
+%if "%{py_ver}" > "2.4"
+cd python
+./setup.py install_egg_info --install-dir=$RPM_BUILD_ROOT%{py_sitedir}
+cd ..
+%endif
 %endif
 
 # move html doc to -devel package
@@ -175,10 +190,6 @@ mv -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html \
        $RPM_BUILD_ROOT%{_docdir}/%{name}-devel-%{version}
 rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
 
-# deal with gtk-doc files
-install -d $RPM_BUILD_ROOT%{_gtkdocdir}
-mv -f $RPM_BUILD_ROOT%{_datadir}/gtk-doc/html/* $RPM_BUILD_ROOT%{_gtkdocdir}
-
 # install catalog file
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/xml
 LD_LIBRARY_PATH=.libs ./xmlcatalog --create \
@@ -187,8 +198,8 @@ LD_LIBRARY_PATH=.libs ./xmlcatalog --create \
 %if %{with python}
 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
-
-rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{py,la,a}
+%py_postclean
+rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}
 %endif
 
 %clean
@@ -205,7 +216,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man3/libxml.3*
 
 %dir %{_sysconfdir}/xml
-%config(noreplace) %verify(not md5 mtime) %{_sysconfdir}/xml/catalog
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xml/catalog
 
 %files devel
 %defattr(644,root,root,755)
@@ -213,6 +224,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/xml2-config
 %attr(755,root,root) %{_libdir}/libxml2.so
 %{_libdir}/libxml2.la
+%attr(755,root,root) %{_libdir}/xml2Conf.sh
 %{_pkgconfigdir}/libxml-2.0.pc
 %{_aclocaldir}/libxml.m4
 %{_includedir}/libxml2
@@ -225,9 +237,11 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libxml2.a
 %endif
 
+%if %{with apidocs}
 %files apidocs
 %defattr(644,root,root,755)
 %{_gtkdocdir}/libxml2
+%endif
 
 %files progs
 %defattr(644,root,root,755)
@@ -239,7 +253,11 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python}
 %files -n python-%{name}
 %defattr(644,root,root,755)
-%doc %{_examplesdir}/python-%{name}-%{version}
 %attr(755,root,root) %{py_sitedir}/libxml2mod.so
-%{py_sitedir}/*libxml2.py[co]
+%{py_sitedir}/drv_libxml2.py[co]
+%{py_sitedir}/libxml2.py[co]
+%if "%{py_ver}" > "2.4"
+%{py_sitedir}/libxml2_python-*.egg-info
+%endif
+%{_examplesdir}/python-%{name}-%{version}
 %endif
This page took 0.067951 seconds and 4 git commands to generate.