blob: 9029a1806de5ac26b58ed73ef6d7f435cad9f767 [file] [log] [blame]
Tomas Radejfb8e9e22015-02-18 22:47:13 +08001%global with_python3 1
2
Daniel Veillard1a123612001-09-19 08:06:23 +00003Summary: Library providing XML and HTML support
4Name: libxml2
Daniel Veillardea898282001-11-04 22:13:45 +00005Version: @VERSION@
Daniel Veillard87b4d6f2012-10-11 14:44:22 +08006Release: 1%{?dist}%{?extra_release}
Daniel Veillardc575b992002-02-08 13:28:40 +00007License: MIT
Daniel Veillard1a123612001-09-19 08:06:23 +00008Group: Development/Libraries
Daniel Veillard38bbd342012-09-11 15:00:08 +08009Source: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz
Daniel Veillard87b4d6f2012-10-11 14:44:22 +080010BuildRoot: %{_tmppath}/%{name}-%{version}-root
Tomas Radejfb8e9e22015-02-18 22:47:13 +080011BuildRequires: python-devel
12%if 0%{?with_python3}
13BuildRequires: python3-devel
14%endif # with_python3
15BuildRequires: zlib-devel
16BuildRequires: pkgconfig
17BuildRequires: xz-devel
Daniel Veillard1a123612001-09-19 08:06:23 +000018URL: http://xmlsoft.org/
Michael Fulbright62e8e801998-09-25 16:58:38 +000019
20%description
Daniel Veillard87b4d6f2012-10-11 14:44:22 +080021This library allows to manipulate XML files. It includes support
Daniel Veillard6db58192000-10-30 09:27:53 +000022to read, modify and write XML and HTML files. There is DTDs support
23this includes parsing and validation even with complex DtDs, either
24at parse time or later once the document has been modified. The output
25can be a simple SAX stream or and in-memory DOM like representations.
26In this case one can use the built-in XPath and XPointer implementation
Daniel Veillard87b4d6f2012-10-11 14:44:22 +080027to select sub nodes or ranges. A flexible Input/Output mechanism is
Daniel Veillard6db58192000-10-30 09:27:53 +000028available, with existing HTTP and FTP modules and combined to an
29URI library.
Michael Fulbright62e8e801998-09-25 16:58:38 +000030
31%package devel
Daniel Veillard1a123612001-09-19 08:06:23 +000032Summary: Libraries, includes, etc. to develop XML and HTML applications
33Group: Development/Libraries
Daniel Veillardda629342007-08-01 07:49:06 +000034Requires: libxml2 = %{version}-%{release}
Daniel Veillardc6924812002-05-24 11:10:43 +000035Requires: zlib-devel
Daniel Veillardadf5ec92012-01-26 16:56:22 +080036Requires: xz-devel
Daniel Veillard69839ba2006-06-06 13:27:03 +000037Requires: pkgconfig
Michael Fulbright62e8e801998-09-25 16:58:38 +000038
39%description devel
Daniel Veillard6db58192000-10-30 09:27:53 +000040Libraries, include files, etc you can use to develop XML applications.
Daniel Veillard87b4d6f2012-10-11 14:44:22 +080041This library allows to manipulate XML files. It includes support
Daniel Veillard6db58192000-10-30 09:27:53 +000042to read, modify and write XML and HTML files. There is DTDs support
43this includes parsing and validation even with complex DtDs, either
44at parse time or later once the document has been modified. The output
45can be a simple SAX stream or and in-memory DOM like representations.
46In this case one can use the built-in XPath and XPointer implementation
Daniel Veillard87b4d6f2012-10-11 14:44:22 +080047to select sub nodes or ranges. A flexible Input/Output mechanism is
Daniel Veillard6db58192000-10-30 09:27:53 +000048available, with existing HTTP and FTP modules and combined to an
49URI library.
Michael Fulbright62e8e801998-09-25 16:58:38 +000050
Daniel Veillard87b4d6f2012-10-11 14:44:22 +080051%package static
52Summary: Static library for libxml2
53Group: Development/Libraries
54Requires: libxml2 = %{version}-%{release}
55
56%description static
57Static library for libxml2 provided for specific uses or shaving a few
58microseconds when parsing, do not link to them for generic purpose packages.
59
Daniel Veillard253aa2c2002-02-02 09:17:16 +000060%package python
61Summary: Python bindings for the libxml2 library
62Group: Development/Libraries
Daniel Veillardda629342007-08-01 07:49:06 +000063Requires: libxml2 = %{version}-%{release}
Daniel Veillard253aa2c2002-02-02 09:17:16 +000064
65%description python
Tomas Radejfb8e9e22015-02-18 22:47:13 +080066The libxml2-python package contains a Python 2 module that permits applications
67written in the Python programming language, version 2, to use the interface
Daniel Veillard253aa2c2002-02-02 09:17:16 +000068supplied by the libxml2 library to manipulate XML files.
69
Daniel Veillard87b4d6f2012-10-11 14:44:22 +080070This library allows to manipulate XML files. It includes support
Daniel Veillard253aa2c2002-02-02 09:17:16 +000071to read, modify and write XML and HTML files. There is DTDs support
72this includes parsing and validation even with complex DTDs, either
73at parse time or later once the document has been modified.
Daniel Veillard366a9152002-10-23 20:43:53 +000074
Tomas Radejfb8e9e22015-02-18 22:47:13 +080075%if 0%{?with_python3}
76%package python3
77Summary: Python 3 bindings for the libxml2 library
78Group: Development/Libraries
79Requires: libxml2 = %{version}-%{release}
80
81%description python3
82The libxml2-python3 package contains a Python 3 module that permits
83applications written in the Python programming language, version 3, to use the
84interface supplied by the libxml2 library to manipulate XML files.
85
86This library allows to manipulate XML files. It includes support
87to read, modify and write XML and HTML files. There is DTDs support
88this includes parsing and validation even with complex DTDs, either
89at parse time or later once the document has been modified.
90%endif # with_python3
91
Daniel Veillardea898282001-11-04 22:13:45 +000092%prep
93%setup -q
94
95%build
Daniel Veillardbaad7882005-08-25 22:52:51 +000096%configure
Daniel Veillard29341682009-09-10 18:23:39 +020097make %{_smp_mflags}
Daniel Veillardea898282001-11-04 22:13:45 +000098
99%install
Daniel Veillard366a9152002-10-23 20:43:53 +0000100rm -fr %{buildroot}
Daniel Veillardea898282001-11-04 22:13:45 +0000101
Daniel Veillard87b4d6f2012-10-11 14:44:22 +0800102make install DESTDIR=%{buildroot}
103
Tomas Radejfb8e9e22015-02-18 22:47:13 +0800104%if 0%{?with_python3}
105make clean
106%configure --with-python=%{__python3}
107make install DESTDIR=%{buildroot}
108%endif # with_python3
109
110
Daniel Veillard87b4d6f2012-10-11 14:44:22 +0800111rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
112rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a
113rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la
114rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxml2-%{version}/*
115rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxml2-python-%{version}/*
Daniel Veillard29341682009-09-10 18:23:39 +0200116(cd doc/examples ; make clean ; rm -rf .deps Makefile)
Mark Salter60adeea2013-02-11 12:45:56 +0800117gzip -9 -c doc/libxml2-api.xml > doc/libxml2-api.xml.gz
118
119%check
120make runtests
Daniel Veillardea898282001-11-04 22:13:45 +0000121
122%clean
Daniel Veillard366a9152002-10-23 20:43:53 +0000123rm -fr %{buildroot}
Daniel Veillardea898282001-11-04 22:13:45 +0000124
Daniel Veillard87b4d6f2012-10-11 14:44:22 +0800125%post -p /sbin/ldconfig
Daniel Veillardea898282001-11-04 22:13:45 +0000126
Daniel Veillard87b4d6f2012-10-11 14:44:22 +0800127%postun -p /sbin/ldconfig
Daniel Veillardea898282001-11-04 22:13:45 +0000128
129%files
130%defattr(-, root, root)
131
Daniel Veillard87b4d6f2012-10-11 14:44:22 +0800132%doc AUTHORS NEWS README Copyright TODO
Daniel Veillardea898282001-11-04 22:13:45 +0000133%doc %{_mandir}/man1/xmllint.1*
134%doc %{_mandir}/man1/xmlcatalog.1*
Daniel Veillarde915b2d2002-03-06 18:42:40 +0000135%doc %{_mandir}/man3/libxml.3*
Daniel Veillardea898282001-11-04 22:13:45 +0000136
Daniel Veillard5643b5a2002-09-04 12:27:06 +0000137%{_libdir}/lib*.so.*
Daniel Veillard29341682009-09-10 18:23:39 +0200138%{_bindir}/xmllint
139%{_bindir}/xmlcatalog
Daniel Veillardea898282001-11-04 22:13:45 +0000140
141%files devel
142%defattr(-, root, root)
143
144%doc %{_mandir}/man1/xml2-config.1*
Daniel Veillard87b4d6f2012-10-11 14:44:22 +0800145%doc AUTHORS NEWS README Copyright
Daniel Veillardf5a457a2002-03-07 10:25:29 +0000146%doc doc/*.html doc/html doc/*.gif doc/*.png
Daniel Veillard771971f2005-04-02 10:49:51 +0000147%doc doc/tutorial doc/libxml2-api.xml.gz
Daniel Veillard8d7b5c72003-11-15 18:24:36 +0000148%doc doc/examples
Daniel Veillard29341682009-09-10 18:23:39 +0200149%doc %dir %{_datadir}/gtk-doc/html/libxml2
Daniel Veillard1db4a662005-09-12 13:10:09 +0000150%doc %{_datadir}/gtk-doc/html/libxml2/*.devhelp
151%doc %{_datadir}/gtk-doc/html/libxml2/*.html
152%doc %{_datadir}/gtk-doc/html/libxml2/*.png
153%doc %{_datadir}/gtk-doc/html/libxml2/*.css
Daniel Veillardea898282001-11-04 22:13:45 +0000154
Daniel Veillard5643b5a2002-09-04 12:27:06 +0000155%{_libdir}/lib*.so
Daniel Veillard5643b5a2002-09-04 12:27:06 +0000156%{_libdir}/*.sh
Daniel Veillard29341682009-09-10 18:23:39 +0200157%{_includedir}/*
158%{_bindir}/xml2-config
159%{_datadir}/aclocal/libxml.m4
Daniel Veillard5643b5a2002-09-04 12:27:06 +0000160%{_libdir}/pkgconfig/libxml-2.0.pc
Daniel Veillard2fcdb422014-10-16 15:39:41 +0800161%{_libdir}/cmake/libxml2/libxml2-config.cmake
Daniel Veillard87b4d6f2012-10-11 14:44:22 +0800162
163%files static
164%defattr(-, root, root)
165
166%{_libdir}/*a
167
Daniel Veillard253aa2c2002-02-02 09:17:16 +0000168%files python
169%defattr(-, root, root)
170
Tomas Radejfb8e9e22015-02-18 22:47:13 +0800171%{_libdir}/python2*/site-packages/libxml2.py*
172%{_libdir}/python2*/site-packages/drv_libxml2.py*
173%{_libdir}/python2*/site-packages/libxml2mod*
Daniel Veillard253aa2c2002-02-02 09:17:16 +0000174%doc python/TODO
175%doc python/libxml2class.txt
176%doc python/tests/*.py
Daniel Veillardf9c4cad2002-11-22 15:57:07 +0000177%doc doc/*.py
178%doc doc/python.html
Michael Fulbright62e8e801998-09-25 16:58:38 +0000179
Tomas Radejfb8e9e22015-02-18 22:47:13 +0800180%if 0%{?with_python3}
181%files python3
182%defattr(-, root, root)
183
184%{_libdir}/python3*/site-packages/libxml2.py*
185%{_libdir}/python3*/site-packages/drv_libxml2.py*
186%{_libdir}/python3*/site-packages/__pycache__/libxml2.cpython-34.py*
187%{_libdir}/python3*/site-packages/__pycache__/drv_libxml2.cpython-34.py*
188%{_libdir}/python3*/site-packages/libxml2mod*
189%doc python/TODO
190%doc python/libxml2class.txt
191%doc python/tests/*.py
192%doc doc/*.py
193%doc doc/python.html
194%endif # with_python3
195
Michael Fulbright62e8e801998-09-25 16:58:38 +0000196%changelog
Daniel Veillard9715c172002-11-25 16:33:40 +0000197* @RELDATE@ Daniel Veillard <veillard@redhat.com>
198- upstream release @VERSION@ see http://xmlsoft.org/news.html
199