3 Summary: Library providing XML and HTML support
6 Release: 1%{?dist}%{?extra_release}
8 Group: Development/Libraries
9 Source: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz
10 BuildRoot: %{_tmppath}/%{name}-%{version}-root
11 BuildRequires: python-devel
13 BuildRequires: python3-devel
15 BuildRequires: zlib-devel
16 BuildRequires: pkgconfig
17 BuildRequires: xz-devel
18 URL: http://xmlsoft.org/
21 This library allows to manipulate XML files. It includes support
22 to read, modify and write XML and HTML files. There is DTDs support
23 this includes parsing and validation even with complex DtDs, either
24 at parse time or later once the document has been modified. The output
25 can be a simple SAX stream or and in-memory DOM like representations.
26 In this case one can use the built-in XPath and XPointer implementation
27 to select sub nodes or ranges. A flexible Input/Output mechanism is
28 available, with existing HTTP and FTP modules and combined to an
32 Summary: Libraries, includes, etc. to develop XML and HTML applications
33 Group: Development/Libraries
34 Requires: libxml2 = %{version}-%{release}
40 Libraries, include files, etc you can use to develop XML applications.
41 This library allows to manipulate XML files. It includes support
42 to read, modify and write XML and HTML files. There is DTDs support
43 this includes parsing and validation even with complex DtDs, either
44 at parse time or later once the document has been modified. The output
45 can be a simple SAX stream or and in-memory DOM like representations.
46 In this case one can use the built-in XPath and XPointer implementation
47 to select sub nodes or ranges. A flexible Input/Output mechanism is
48 available, with existing HTTP and FTP modules and combined to an
52 Summary: Static library for libxml2
53 Group: Development/Libraries
54 Requires: libxml2 = %{version}-%{release}
57 Static library for libxml2 provided for specific uses or shaving a few
58 microseconds when parsing, do not link to them for generic purpose packages.
60 %package -n python-%{name}
61 %{?python_provide:%python_provide python-%{name}}
62 Summary: Python bindings for the libxml2 library
63 Group: Development/Libraries
64 Requires: libxml2 = %{version}-%{release}
65 Obsoletes: %{name}-python < %{version}-%{release}
66 Provides: %{name}-python = %{version}-%{release}
68 %description -n python-%{name}
69 The libxml2-python package contains a Python 2 module that permits applications
70 written in the Python programming language, version 2, to use the interface
71 supplied by the libxml2 library to manipulate XML files.
73 This library allows to manipulate XML files. It includes support
74 to read, modify and write XML and HTML files. There is DTDs support
75 this includes parsing and validation even with complex DTDs, either
76 at parse time or later once the document has been modified.
79 %package -n python3-%{name}
80 Summary: Python 3 bindings for the libxml2 library
81 Group: Development/Libraries
82 Requires: libxml2 = %{version}-%{release}
83 Obsoletes: %{name}-python3 < %{version}-%{release}
84 Provides: %{name}-python3 = %{version}-%{release}
86 %description -n python3-%{name}
87 The libxml2-python3 package contains a Python 3 module that permits
88 applications written in the Python programming language, version 3, to use the
89 interface supplied by the libxml2 library to manipulate XML files.
91 This library allows to manipulate XML files. It includes support
92 to read, modify and write XML and HTML files. There is DTDs support
93 this includes parsing and validation even with complex DTDs, either
94 at parse time or later once the document has been modified.
102 sed -i 's|#!/usr/bin/python |#!%{__python3} |' py3doc/*.py
108 find doc -type f -exec chmod 0644 \{\} \;
113 make install DESTDIR=%{buildroot}
115 %if 0%{?with_python3}
117 %configure --with-python=%{__python3}
118 make install DESTDIR=%{buildroot}
119 %endif # with_python3
122 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
123 rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a
124 rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la
125 rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxml2-%{version}/*
126 rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxml2-python-%{version}/*
127 (cd doc/examples ; make clean ; rm -rf .deps Makefile)
128 gzip -9 -c doc/libxml2-api.xml > doc/libxml2-api.xml.gz
136 %post -p /sbin/ldconfig
138 %postun -p /sbin/ldconfig
141 %defattr(-, root, root)
143 %doc AUTHORS NEWS README Copyright TODO
144 %doc %{_mandir}/man1/xmllint.1*
145 %doc %{_mandir}/man1/xmlcatalog.1*
146 %doc %{_mandir}/man3/libxml.3*
150 %{_bindir}/xmlcatalog
153 %defattr(-, root, root)
155 %doc %{_mandir}/man1/xml2-config.1*
156 %doc AUTHORS NEWS README Copyright
157 %doc doc/*.html doc/html doc/*.gif doc/*.png
158 %doc doc/tutorial doc/libxml2-api.xml.gz
160 %doc %dir %{_datadir}/gtk-doc/html/libxml2
161 %doc %{_datadir}/gtk-doc/html/libxml2/*.devhelp
162 %doc %{_datadir}/gtk-doc/html/libxml2/*.html
163 %doc %{_datadir}/gtk-doc/html/libxml2/*.png
164 %doc %{_datadir}/gtk-doc/html/libxml2/*.css
169 %{_bindir}/xml2-config
170 %{_datadir}/aclocal/libxml.m4
171 %{_libdir}/pkgconfig/libxml-2.0.pc
172 %{_libdir}/cmake/libxml2/libxml2-config.cmake
175 %defattr(-, root, root)
179 %files -n python-%{name}
180 %defattr(-, root, root)
182 %{_libdir}/python2*/site-packages/libxml2.py*
183 %{_libdir}/python2*/site-packages/drv_libxml2.py*
184 %{_libdir}/python2*/site-packages/libxml2mod*
186 %doc python/libxml2class.txt
187 %doc python/tests/*.py
191 %if 0%{?with_python3}
192 %files -n python3-%{name}
193 %defattr(-, root, root)
195 %{_libdir}/python3*/site-packages/libxml2.py*
196 %{_libdir}/python3*/site-packages/drv_libxml2.py*
197 %{_libdir}/python3*/site-packages/__pycache__/*py*
198 %{_libdir}/python3*/site-packages/libxml2mod*
200 %doc python/libxml2class.txt
203 %endif # with_python3
206 * Thu Nov 2 2017 Daniel Veillard <veillard@redhat.com>
207 - upstream release 2.9.7 see http://xmlsoft.org/news.html