]> git.pld-linux.org Git - packages/libxml2.git/blobdiff - libxml2.spec
up to 2.11.5
[packages/libxml2.git] / libxml2.spec
index 0a2c68932c2688765ac9527ed2532988a79e55d5..c610f916142bbce476ca3da829c48ae77dd0628a 100644 (file)
@@ -2,7 +2,9 @@
 # - fix build without libxml2-devel (python library uses old headers)
 #
 # Conditional build:
-%bcond_without apidocs         # do not build and package API docs
+%bcond_without apidocs         # API documentation
+%bcond_with    ftp             # FTP support
+%bcond_without legacy          # legacy API support
 %bcond_without python2         # CPython 2.x module
 %bcond_without python3         # CPython 3.x module
 %bcond_without static_libs     # static library
@@ -15,43 +17,42 @@ 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.9.10
-Release:       2
+Version:       2.11.5
+Release:       1
 Epoch:         1
 License:       MIT
 Group:         Libraries
-Source0:       ftp://xmlsoft.org/libxml2/%{name}-%{version}.tar.gz
-# Source0-md5: 10942a1dc23137a8aa07f0639cbfece5
-Patch0:                %{name}-man_fixes.patch
-Patch1:                %{name}-open.gz.patch
-Patch2:                %{name}-largefile.patch
-Patch3:                %{name}-libx32.patch
+#Source0:      ftp://xmlsoft.org/libxml2/%{name}-%{version}.tar.gz
+Source0:       https://download.gnome.org/sources/libxml2/2.11/%{name}-%{version}.tar.xz
+# Source0-md5: b2e7332289f5784087448a0717f45ac3
+Patch0:                %{name}-open.gz.patch
+Patch1:                %{name}-largefile.patch
+Patch2:                %{name}-libx32.patch
+Patch3:                %{name}-python-setup.patch
 # Fedora patches
 # https://bugzilla.gnome.org/show_bug.cgi?id=789714
 Patch11:       %{name}-python3-unicode-errors.patch
-# https://gitlab.gnome.org/GNOME/libxml2/commit/0815302dee2b78139832c2080348086a0564836b.patch
-Patch12:       %{name}-fix-relaxed-approach-to-nested-documents.patch
-# https://gitlab.gnome.org/GNOME/libxml2/merge_requests/68
-Patch13:       libxml2-CVE-2019-20388.patch
-# https://gitlab.gnome.org/GNOME/libxml2/merge_requests/63
-Patch14:       libxml2-CVE-2020-7595.patch
-# https://gitlab.gnome.org/GNOME/libxml2/merge_requests/71
-Patch15:       libxml2-parenthesize-type-checks.patch
 URL:           http://xmlsoft.org/
 BuildRequires: autoconf >= 2.68
-BuildRequires: automake >= 1.4
+BuildRequires: automake >= 1:1.16.3
 BuildRequires: libtool >= 2:2.0
+BuildRequires: pkgconfig
 %if %{with python2}
-BuildRequires: python-devel >= 2.0
-BuildRequires: python-modules >= 2.0
+BuildRequires: python-devel >= 1:2.5
+BuildRequires: python-modules >= 1:2.5
+BuildRequires: python-setuptools
 BuildRequires: rpm-pythonprov
 %endif
 %if %{with python3}
 BuildRequires: python3-devel >= 1:3.2
 BuildRequires: python3-modules >= 1:3.2
+BuildRequires: python3-setuptools
 BuildRequires: rpm-pythonprov
 %endif
+BuildRequires: rpm-build >= 4.6
 BuildRequires: rpmbuild(macros) >= 1.714
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
 BuildRequires: xz-devel
 %{?with_zlib:BuildRequires:    zlib-devel >= 1.2.3.3}
 # history support in xmllint is disabled by default
@@ -124,9 +125,7 @@ Summary:    libxml2 API documentation
 Summary(pl.UTF-8):     Dokumentacja API libxml2
 Group:         Documentation
 Requires:      gtk-doc-common
-%if "%{_rpmversion}" >= "4.6"
 BuildArch:     noarch
-%endif
 
 %description apidocs
 libxml2 API documentation.
@@ -152,7 +151,7 @@ Summary(pl.UTF-8):  Moduł libxml2 dla Pythona 2.x
 Group:         Libraries/Python
 Requires:      %{name} = %{epoch}:%{version}-%{release}
 Requires:      python-libs
-Obsoletes:     libxml2-python
+Obsoletes:     libxml2-python < 1:2.6
 
 %description -n python-%{name}
 This is the libxml2 module for Python 2.x, providing access to the
@@ -179,17 +178,13 @@ do biblioteki libxml2.
 
 %prep
 %setup -q
-%patch0 -p1
 %if %{with zlib}
-%patch1 -p1
+%patch0 -p1
 %endif
+%patch1 -p1
 %patch2 -p1
 %patch3 -p1
 %patch11 -p1
-%patch12 -p1
-%patch13 -p1
-%patch14 -p1
-%patch15 -p1
 
 %build
 %{__libtoolize}
@@ -199,11 +194,13 @@ do biblioteki libxml2.
 %{__automake}
 %configure \
        --disable-silent-rules \
-       %{!?with_static_libs:--disable-static=no} \
-       --without-python \
-       %{!?with_zlib:--without-zlib} \
+       %{?with_static_libs:--enable-static} \
+       %{?with_ftp:--with-ftp} \
+       %{?with_legacy:--with-legacy} \
        --with-lzma \
-       --with%{!?with_mem_debug:out}-mem-debug
+       --with-mem-debug%{!?with_mem_debug:=no} \
+       --without-python \
+       %{!?with_zlib:--without-zlib}
 
 %{__make}
 
@@ -213,7 +210,6 @@ cd python
 cd ..
 %endif
 
-
 %if %{with python3}
 cd python
 %py3_build
@@ -229,9 +225,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT \
-       devhelpdir=%{_gtkdocdir}/libxml2 \
-       m4datadir=%{_aclocaldir} \
-       pkgconfigdir=%{_pkgconfigdir}
+       devhelpdir=%{_gtkdocdir}/libxml2
 
 %if %{with python2}
 cd python
@@ -247,11 +241,8 @@ cd python
 cd ..
 %endif
 
-# move html doc to -devel package
-install -d $RPM_BUILD_ROOT%{_docdir}/%{name}-devel-%{version}
-%{__mv} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html \
-       $RPM_BUILD_ROOT%{_docdir}/%{name}-devel-%{version}
-%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+install -d $RPM_BUILD_ROOT%{_examplesdir}
+%{__mv} $RPM_BUILD_ROOT%{_docdir}/libxml2/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
 # install catalog file
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/xml
@@ -266,21 +257,17 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS ChangeLog Copyright NEWS README TODO
+%doc Copyright NEWS README.md
 %attr(755,root,root) %{_libdir}/libxml2.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libxml2.so.2
-%{_mandir}/man3/libxml.3*
-
 %dir %{_sysconfdir}/xml
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xml/catalog
 
 %files devel
 %defattr(644,root,root,755)
-%doc %{_docdir}/%{name}-devel-%{version}
 %attr(755,root,root) %{_bindir}/xml2-config
 %attr(755,root,root) %{_libdir}/libxml2.so
 %{_libdir}/libxml2.la
-%attr(755,root,root) %{_libdir}/xml2Conf.sh
 %{_libdir}/cmake/libxml2
 %{_pkgconfigdir}/libxml-2.0.pc
 %{_aclocaldir}/libxml.m4
@@ -296,7 +283,9 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with apidocs}
 %files apidocs
 %defattr(644,root,root,755)
+%{_docdir}/%{name}
 %{_gtkdocdir}/libxml2
+%{_examplesdir}/%{name}-%{version}
 %endif
 
 %files progs
@@ -312,10 +301,8 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{py_sitedir}/libxml2mod.so
 %{py_sitedir}/drv_libxml2.py[co]
 %{py_sitedir}/libxml2.py[co]
-%if "%{py_ver}" > "2.4"
 %{py_sitedir}/libxml2_python-%{version}-py*.egg-info
 %endif
-%endif
 
 %if %{with python3}
 %files -n python3-%{name}
This page took 0.041225 seconds and 4 git commands to generate.