2015-02-18 22:47:13 +08:00
%global with_python3 1
2001-09-19 08:06:23 +00:00
Summary : Library providing XML and HTML support
Name : libxml2
2001-11-04 22:13:45 +00:00
Version : @VERSION@
2016-05-09 10:31:09 +08:00
Release : 0rc2%{?dist} %{?extra_release}
2002-02-08 13:28:40 +00:00
License : MIT
2001-09-19 08:06:23 +00:00
Group : Development/Libraries
2016-05-09 10:31:09 +08:00
Source : ftp://xmlsoft.org/libxml2/libxml2-%{version} -rc2.tar.gz
2012-10-11 14:44:22 +08:00
BuildRoot : %{_tmppath} /%{name} -%{version} -root
2015-02-18 22:47:13 +08:00
BuildRequires : python-devel
%if 0%{?with_python3}
BuildRequires : python3-devel
%endif # with_python3
BuildRequires : zlib-devel
BuildRequires : pkgconfig
BuildRequires : xz-devel
2001-09-19 08:06:23 +00:00
URL : http://xmlsoft.org/
1998-09-25 16:58:38 +00:00
%description
2012-10-11 14:44:22 +08:00
This library allows to manipulate XML files. It includes support
2000-10-30 09:27:53 +00:00
to read, modify and write XML and HTML files. There is DTDs support
this includes parsing and validation even with complex DtDs, either
at parse time or later once the document has been modified. The output
can be a simple SAX stream or and in-memory DOM like representations.
In this case one can use the built-in XPath and XPointer implementation
2012-10-11 14:44:22 +08:00
to select sub nodes or ranges. A flexible Input/Output mechanism is
2000-10-30 09:27:53 +00:00
available, with existing HTTP and FTP modules and combined to an
URI library.
1998-09-25 16:58:38 +00:00
%package devel
2001-09-19 08:06:23 +00:00
Summary : Libraries, includes, etc. to develop XML and HTML applications
Group : Development/Libraries
2007-08-01 07:49:06 +00:00
Requires : libxml2 = %{version} -%{release}
2002-05-24 11:10:43 +00:00
Requires : zlib-devel
2012-01-26 16:56:22 +08:00
Requires : xz-devel
2006-06-06 13:27:03 +00:00
Requires : pkgconfig
1998-09-25 16:58:38 +00:00
%description devel
2000-10-30 09:27:53 +00:00
Libraries, include files, etc you can use to develop XML applications.
2012-10-11 14:44:22 +08:00
This library allows to manipulate XML files. It includes support
2000-10-30 09:27:53 +00:00
to read, modify and write XML and HTML files. There is DTDs support
this includes parsing and validation even with complex DtDs, either
at parse time or later once the document has been modified. The output
can be a simple SAX stream or and in-memory DOM like representations.
In this case one can use the built-in XPath and XPointer implementation
2012-10-11 14:44:22 +08:00
to select sub nodes or ranges. A flexible Input/Output mechanism is
2000-10-30 09:27:53 +00:00
available, with existing HTTP and FTP modules and combined to an
URI library.
1998-09-25 16:58:38 +00:00
2012-10-11 14:44:22 +08:00
%package static
Summary : Static library for libxml2
Group : Development/Libraries
Requires : libxml2 = %{version} -%{release}
%description static
Static library for libxml2 provided for specific uses or shaving a few
microseconds when parsing, do not link to them for generic purpose packages.
2002-02-02 09:17:16 +00:00
%package python
Summary : Python bindings for the libxml2 library
Group : Development/Libraries
2007-08-01 07:49:06 +00:00
Requires : libxml2 = %{version} -%{release}
2002-02-02 09:17:16 +00:00
%description python
2015-02-18 22:47:13 +08:00
The libxml2-python package contains a Python 2 module that permits applications
written in the Python programming language, version 2, to use the interface
2002-02-02 09:17:16 +00:00
supplied by the libxml2 library to manipulate XML files.
2012-10-11 14:44:22 +08:00
This library allows to manipulate XML files. It includes support
2002-02-02 09:17:16 +00:00
to read, modify and write XML and HTML files. There is DTDs support
this includes parsing and validation even with complex DTDs, either
at parse time or later once the document has been modified.
2002-10-23 20:43:53 +00:00
2015-02-18 22:47:13 +08:00
%if 0%{?with_python3}
%package python3
Summary : Python 3 bindings for the libxml2 library
Group : Development/Libraries
Requires : libxml2 = %{version} -%{release}
%description python3
The libxml2-python3 package contains a Python 3 module that permits
applications written in the Python programming language, version 3, to use the
interface supplied by the libxml2 library to manipulate XML files.
This library allows to manipulate XML files. It includes support
to read, modify and write XML and HTML files. There is DTDs support
this includes parsing and validation even with complex DTDs, either
at parse time or later once the document has been modified.
%endif # with_python3
1998-09-25 16:58:38 +00:00
%prep
2001-11-04 22:13:45 +00:00
%setup -q
1998-09-25 16:58:38 +00:00
%build
2005-08-25 22:52:51 +00:00
%configure
2009-09-10 18:23:39 +02:00
make %{_smp_mflags}
1998-09-25 16:58:38 +00:00
%install
2002-10-23 20:43:53 +00:00
rm -fr %{buildroot}
1998-09-25 16:58:38 +00:00
2012-10-11 14:44:22 +08:00
make install DESTDIR=%{buildroot}
2015-02-18 22:47:13 +08:00
%if 0%{?with_python3}
make clean
%configure --with-python=%{__python 3}
make install DESTDIR=%{buildroot}
%endif # with_python3
2012-10-11 14:44:22 +08:00
rm -f $RPM_BUILD_ROOT %{_libdir} /*.la
rm -f $RPM_BUILD_ROOT %{_libdir} /python*/site-packages/*.a
rm -f $RPM_BUILD_ROOT %{_libdir} /python*/site-packages/*.la
rm -rf $RPM_BUILD_ROOT %{_datadir} /doc/libxml2-%{version} /*
rm -rf $RPM_BUILD_ROOT %{_datadir} /doc/libxml2-python-%{version} /*
2009-09-10 18:23:39 +02:00
(cd doc/examples ; make clean ; rm -rf .deps Makefile)
2013-02-11 12:45:56 +08:00
gzip -9 -c doc/libxml2-api.xml > doc/libxml2-api.xml.gz
%check
make runtests
1998-09-25 16:58:38 +00:00
%clean
2002-10-23 20:43:53 +00:00
rm -fr %{buildroot}
1998-09-25 16:58:38 +00:00
2012-10-11 14:44:22 +08:00
%post -p /sbin/ldconfig
1998-09-25 16:58:38 +00:00
2012-10-11 14:44:22 +08:00
%postun -p /sbin/ldconfig
1998-09-25 16:58:38 +00:00
%files
%defattr (-, root, root)
2012-10-11 14:44:22 +08:00
%doc AUTHORS NEWS README Copyright TODO
2001-11-04 22:13:45 +00:00
%doc %{_mandir} /man1/xmllint.1*
%doc %{_mandir} /man1/xmlcatalog.1*
2002-03-06 18:42:40 +00:00
%doc %{_mandir} /man3/libxml.3*
2000-08-19 16:48:54 +00:00
2002-09-04 12:27:06 +00:00
%{_libdir} /lib*.so.*
2009-09-10 18:23:39 +02:00
%{_bindir} /xmllint
%{_bindir} /xmlcatalog
1998-09-25 16:58:38 +00:00
%files devel
%defattr (-, root, root)
2001-11-04 22:13:45 +00:00
%doc %{_mandir} /man1/xml2-config.1*
2012-10-11 14:44:22 +08:00
%doc AUTHORS NEWS README Copyright
2002-03-07 10:25:29 +00:00
%doc doc/*.html doc/html doc/*.gif doc/*.png
2005-04-02 10:49:51 +00:00
%doc doc/tutorial doc/libxml2-api.xml.gz
2003-11-15 18:24:36 +00:00
%doc doc/examples
2009-09-10 18:23:39 +02:00
%doc %dir %{_datadir} /gtk-doc/html/libxml2
2005-09-12 13:10:09 +00:00
%doc %{_datadir} /gtk-doc/html/libxml2/*.devhelp
%doc %{_datadir} /gtk-doc/html/libxml2/*.html
%doc %{_datadir} /gtk-doc/html/libxml2/*.png
%doc %{_datadir} /gtk-doc/html/libxml2/*.css
2001-04-26 19:29:02 +00:00
2002-09-04 12:27:06 +00:00
%{_libdir} /lib*.so
%{_libdir} /*.sh
2009-09-10 18:23:39 +02:00
%{_includedir} /*
%{_bindir} /xml2-config
%{_datadir} /aclocal/libxml.m4
2002-09-04 12:27:06 +00:00
%{_libdir} /pkgconfig/libxml-2.0.pc
2014-10-16 15:39:41 +08:00
%{_libdir} /cmake/libxml2/libxml2-config.cmake
2012-10-11 14:44:22 +08:00
%files static
%defattr (-, root, root)
%{_libdir} /*a
2002-02-02 09:17:16 +00:00
%files python
%defattr (-, root, root)
2015-02-18 22:47:13 +08:00
%{_libdir} /python2*/site-packages/libxml2.py*
%{_libdir} /python2*/site-packages/drv_libxml2.py*
%{_libdir} /python2*/site-packages/libxml2mod*
%doc python/TODO
%doc python/libxml2class.txt
%doc python/tests/*.py
%doc doc/*.py
%doc doc/python.html
%if 0%{?with_python3}
%files python3
%defattr (-, root, root)
%{_libdir} /python3*/site-packages/libxml2.py*
%{_libdir} /python3*/site-packages/drv_libxml2.py*
%{_libdir} /python3*/site-packages/__pycache__/libxml2.cpython-34.py*
%{_libdir} /python3*/site-packages/__pycache__/drv_libxml2.cpython-34.py*
%{_libdir} /python3*/site-packages/libxml2mod*
2002-02-02 09:17:16 +00:00
%doc python/TODO
%doc python/libxml2class.txt
%doc python/tests/*.py
2002-11-22 15:57:07 +00:00
%doc doc/*.py
%doc doc/python.html
2015-02-18 22:47:13 +08:00
%endif # with_python3
2001-11-04 22:13:45 +00:00
%changelog
2002-11-25 16:33:40 +00:00
* @RELDATE@ Daniel Veillard <veillard@redhat.com>
- upstream release @VERSION@ see http://xmlsoft.org/news.html