Tomas Radej | fb8e9e2 | 2015-02-18 22:47:13 +0800 | [diff] [blame] | 1 | %global with_python3 1 |
| 2 | |
Daniel Veillard | 1a12361 | 2001-09-19 08:06:23 +0000 | [diff] [blame] | 3 | Summary: Library providing XML and HTML support |
| 4 | Name: libxml2 |
Daniel Veillard | ea89828 | 2001-11-04 22:13:45 +0000 | [diff] [blame] | 5 | Version: @VERSION@ |
Daniel Veillard | 87b4d6f | 2012-10-11 14:44:22 +0800 | [diff] [blame] | 6 | Release: 1%{?dist}%{?extra_release} |
Daniel Veillard | c575b99 | 2002-02-08 13:28:40 +0000 | [diff] [blame] | 7 | License: MIT |
Daniel Veillard | 1a12361 | 2001-09-19 08:06:23 +0000 | [diff] [blame] | 8 | Group: Development/Libraries |
Daniel Veillard | 38bbd34 | 2012-09-11 15:00:08 +0800 | [diff] [blame] | 9 | Source: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz |
Daniel Veillard | 87b4d6f | 2012-10-11 14:44:22 +0800 | [diff] [blame] | 10 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
Tomas Radej | fb8e9e2 | 2015-02-18 22:47:13 +0800 | [diff] [blame] | 11 | BuildRequires: python-devel |
| 12 | %if 0%{?with_python3} |
| 13 | BuildRequires: python3-devel |
| 14 | %endif # with_python3 |
| 15 | BuildRequires: zlib-devel |
| 16 | BuildRequires: pkgconfig |
| 17 | BuildRequires: xz-devel |
Daniel Veillard | 1a12361 | 2001-09-19 08:06:23 +0000 | [diff] [blame] | 18 | URL: http://xmlsoft.org/ |
Michael Fulbright | 62e8e80 | 1998-09-25 16:58:38 +0000 | [diff] [blame] | 19 | |
| 20 | %description |
Daniel Veillard | 87b4d6f | 2012-10-11 14:44:22 +0800 | [diff] [blame] | 21 | This library allows to manipulate XML files. It includes support |
Daniel Veillard | 6db5819 | 2000-10-30 09:27:53 +0000 | [diff] [blame] | 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 |
Daniel Veillard | 87b4d6f | 2012-10-11 14:44:22 +0800 | [diff] [blame] | 27 | to select sub nodes or ranges. A flexible Input/Output mechanism is |
Daniel Veillard | 6db5819 | 2000-10-30 09:27:53 +0000 | [diff] [blame] | 28 | available, with existing HTTP and FTP modules and combined to an |
| 29 | URI library. |
Michael Fulbright | 62e8e80 | 1998-09-25 16:58:38 +0000 | [diff] [blame] | 30 | |
| 31 | %package devel |
Daniel Veillard | 1a12361 | 2001-09-19 08:06:23 +0000 | [diff] [blame] | 32 | Summary: Libraries, includes, etc. to develop XML and HTML applications |
| 33 | Group: Development/Libraries |
Daniel Veillard | da62934 | 2007-08-01 07:49:06 +0000 | [diff] [blame] | 34 | Requires: libxml2 = %{version}-%{release} |
Daniel Veillard | c692481 | 2002-05-24 11:10:43 +0000 | [diff] [blame] | 35 | Requires: zlib-devel |
Daniel Veillard | adf5ec9 | 2012-01-26 16:56:22 +0800 | [diff] [blame] | 36 | Requires: xz-devel |
Daniel Veillard | 69839ba | 2006-06-06 13:27:03 +0000 | [diff] [blame] | 37 | Requires: pkgconfig |
Michael Fulbright | 62e8e80 | 1998-09-25 16:58:38 +0000 | [diff] [blame] | 38 | |
| 39 | %description devel |
Daniel Veillard | 6db5819 | 2000-10-30 09:27:53 +0000 | [diff] [blame] | 40 | Libraries, include files, etc you can use to develop XML applications. |
Daniel Veillard | 87b4d6f | 2012-10-11 14:44:22 +0800 | [diff] [blame] | 41 | This library allows to manipulate XML files. It includes support |
Daniel Veillard | 6db5819 | 2000-10-30 09:27:53 +0000 | [diff] [blame] | 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 |
Daniel Veillard | 87b4d6f | 2012-10-11 14:44:22 +0800 | [diff] [blame] | 47 | to select sub nodes or ranges. A flexible Input/Output mechanism is |
Daniel Veillard | 6db5819 | 2000-10-30 09:27:53 +0000 | [diff] [blame] | 48 | available, with existing HTTP and FTP modules and combined to an |
| 49 | URI library. |
Michael Fulbright | 62e8e80 | 1998-09-25 16:58:38 +0000 | [diff] [blame] | 50 | |
Daniel Veillard | 87b4d6f | 2012-10-11 14:44:22 +0800 | [diff] [blame] | 51 | %package static |
| 52 | Summary: Static library for libxml2 |
| 53 | Group: Development/Libraries |
| 54 | Requires: libxml2 = %{version}-%{release} |
| 55 | |
| 56 | %description static |
| 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. |
| 59 | |
Daniel Veillard | 253aa2c | 2002-02-02 09:17:16 +0000 | [diff] [blame] | 60 | %package python |
| 61 | Summary: Python bindings for the libxml2 library |
| 62 | Group: Development/Libraries |
Daniel Veillard | da62934 | 2007-08-01 07:49:06 +0000 | [diff] [blame] | 63 | Requires: libxml2 = %{version}-%{release} |
Daniel Veillard | 253aa2c | 2002-02-02 09:17:16 +0000 | [diff] [blame] | 64 | |
| 65 | %description python |
Tomas Radej | fb8e9e2 | 2015-02-18 22:47:13 +0800 | [diff] [blame] | 66 | The libxml2-python package contains a Python 2 module that permits applications |
| 67 | written in the Python programming language, version 2, to use the interface |
Daniel Veillard | 253aa2c | 2002-02-02 09:17:16 +0000 | [diff] [blame] | 68 | supplied by the libxml2 library to manipulate XML files. |
| 69 | |
Daniel Veillard | 87b4d6f | 2012-10-11 14:44:22 +0800 | [diff] [blame] | 70 | This library allows to manipulate XML files. It includes support |
Daniel Veillard | 253aa2c | 2002-02-02 09:17:16 +0000 | [diff] [blame] | 71 | to read, modify and write XML and HTML files. There is DTDs support |
| 72 | this includes parsing and validation even with complex DTDs, either |
| 73 | at parse time or later once the document has been modified. |
Daniel Veillard | 366a915 | 2002-10-23 20:43:53 +0000 | [diff] [blame] | 74 | |
Tomas Radej | fb8e9e2 | 2015-02-18 22:47:13 +0800 | [diff] [blame] | 75 | %if 0%{?with_python3} |
| 76 | %package python3 |
| 77 | Summary: Python 3 bindings for the libxml2 library |
| 78 | Group: Development/Libraries |
| 79 | Requires: libxml2 = %{version}-%{release} |
| 80 | |
| 81 | %description python3 |
| 82 | The libxml2-python3 package contains a Python 3 module that permits |
| 83 | applications written in the Python programming language, version 3, to use the |
| 84 | interface supplied by the libxml2 library to manipulate XML files. |
| 85 | |
| 86 | This library allows to manipulate XML files. It includes support |
| 87 | to read, modify and write XML and HTML files. There is DTDs support |
| 88 | this includes parsing and validation even with complex DTDs, either |
| 89 | at parse time or later once the document has been modified. |
| 90 | %endif # with_python3 |
| 91 | |
Daniel Veillard | ea89828 | 2001-11-04 22:13:45 +0000 | [diff] [blame] | 92 | %prep |
| 93 | %setup -q |
| 94 | |
| 95 | %build |
Daniel Veillard | baad788 | 2005-08-25 22:52:51 +0000 | [diff] [blame] | 96 | %configure |
Daniel Veillard | 2934168 | 2009-09-10 18:23:39 +0200 | [diff] [blame] | 97 | make %{_smp_mflags} |
Daniel Veillard | ea89828 | 2001-11-04 22:13:45 +0000 | [diff] [blame] | 98 | |
| 99 | %install |
Daniel Veillard | 366a915 | 2002-10-23 20:43:53 +0000 | [diff] [blame] | 100 | rm -fr %{buildroot} |
Daniel Veillard | ea89828 | 2001-11-04 22:13:45 +0000 | [diff] [blame] | 101 | |
Daniel Veillard | 87b4d6f | 2012-10-11 14:44:22 +0800 | [diff] [blame] | 102 | make install DESTDIR=%{buildroot} |
| 103 | |
Tomas Radej | fb8e9e2 | 2015-02-18 22:47:13 +0800 | [diff] [blame] | 104 | %if 0%{?with_python3} |
| 105 | make clean |
| 106 | %configure --with-python=%{__python3} |
| 107 | make install DESTDIR=%{buildroot} |
| 108 | %endif # with_python3 |
| 109 | |
| 110 | |
Daniel Veillard | 87b4d6f | 2012-10-11 14:44:22 +0800 | [diff] [blame] | 111 | rm -f $RPM_BUILD_ROOT%{_libdir}/*.la |
| 112 | rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a |
| 113 | rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la |
| 114 | rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxml2-%{version}/* |
| 115 | rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxml2-python-%{version}/* |
Daniel Veillard | 2934168 | 2009-09-10 18:23:39 +0200 | [diff] [blame] | 116 | (cd doc/examples ; make clean ; rm -rf .deps Makefile) |
Mark Salter | 60adeea | 2013-02-11 12:45:56 +0800 | [diff] [blame] | 117 | gzip -9 -c doc/libxml2-api.xml > doc/libxml2-api.xml.gz |
| 118 | |
| 119 | %check |
| 120 | make runtests |
Daniel Veillard | ea89828 | 2001-11-04 22:13:45 +0000 | [diff] [blame] | 121 | |
| 122 | %clean |
Daniel Veillard | 366a915 | 2002-10-23 20:43:53 +0000 | [diff] [blame] | 123 | rm -fr %{buildroot} |
Daniel Veillard | ea89828 | 2001-11-04 22:13:45 +0000 | [diff] [blame] | 124 | |
Daniel Veillard | 87b4d6f | 2012-10-11 14:44:22 +0800 | [diff] [blame] | 125 | %post -p /sbin/ldconfig |
Daniel Veillard | ea89828 | 2001-11-04 22:13:45 +0000 | [diff] [blame] | 126 | |
Daniel Veillard | 87b4d6f | 2012-10-11 14:44:22 +0800 | [diff] [blame] | 127 | %postun -p /sbin/ldconfig |
Daniel Veillard | ea89828 | 2001-11-04 22:13:45 +0000 | [diff] [blame] | 128 | |
| 129 | %files |
| 130 | %defattr(-, root, root) |
| 131 | |
Daniel Veillard | 87b4d6f | 2012-10-11 14:44:22 +0800 | [diff] [blame] | 132 | %doc AUTHORS NEWS README Copyright TODO |
Daniel Veillard | ea89828 | 2001-11-04 22:13:45 +0000 | [diff] [blame] | 133 | %doc %{_mandir}/man1/xmllint.1* |
| 134 | %doc %{_mandir}/man1/xmlcatalog.1* |
Daniel Veillard | e915b2d | 2002-03-06 18:42:40 +0000 | [diff] [blame] | 135 | %doc %{_mandir}/man3/libxml.3* |
Daniel Veillard | ea89828 | 2001-11-04 22:13:45 +0000 | [diff] [blame] | 136 | |
Daniel Veillard | 5643b5a | 2002-09-04 12:27:06 +0000 | [diff] [blame] | 137 | %{_libdir}/lib*.so.* |
Daniel Veillard | 2934168 | 2009-09-10 18:23:39 +0200 | [diff] [blame] | 138 | %{_bindir}/xmllint |
| 139 | %{_bindir}/xmlcatalog |
Daniel Veillard | ea89828 | 2001-11-04 22:13:45 +0000 | [diff] [blame] | 140 | |
| 141 | %files devel |
| 142 | %defattr(-, root, root) |
| 143 | |
| 144 | %doc %{_mandir}/man1/xml2-config.1* |
Daniel Veillard | 87b4d6f | 2012-10-11 14:44:22 +0800 | [diff] [blame] | 145 | %doc AUTHORS NEWS README Copyright |
Daniel Veillard | f5a457a | 2002-03-07 10:25:29 +0000 | [diff] [blame] | 146 | %doc doc/*.html doc/html doc/*.gif doc/*.png |
Daniel Veillard | 771971f | 2005-04-02 10:49:51 +0000 | [diff] [blame] | 147 | %doc doc/tutorial doc/libxml2-api.xml.gz |
Daniel Veillard | 8d7b5c7 | 2003-11-15 18:24:36 +0000 | [diff] [blame] | 148 | %doc doc/examples |
Daniel Veillard | 2934168 | 2009-09-10 18:23:39 +0200 | [diff] [blame] | 149 | %doc %dir %{_datadir}/gtk-doc/html/libxml2 |
Daniel Veillard | 1db4a66 | 2005-09-12 13:10:09 +0000 | [diff] [blame] | 150 | %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 Veillard | ea89828 | 2001-11-04 22:13:45 +0000 | [diff] [blame] | 154 | |
Daniel Veillard | 5643b5a | 2002-09-04 12:27:06 +0000 | [diff] [blame] | 155 | %{_libdir}/lib*.so |
Daniel Veillard | 5643b5a | 2002-09-04 12:27:06 +0000 | [diff] [blame] | 156 | %{_libdir}/*.sh |
Daniel Veillard | 2934168 | 2009-09-10 18:23:39 +0200 | [diff] [blame] | 157 | %{_includedir}/* |
| 158 | %{_bindir}/xml2-config |
| 159 | %{_datadir}/aclocal/libxml.m4 |
Daniel Veillard | 5643b5a | 2002-09-04 12:27:06 +0000 | [diff] [blame] | 160 | %{_libdir}/pkgconfig/libxml-2.0.pc |
Daniel Veillard | 2fcdb42 | 2014-10-16 15:39:41 +0800 | [diff] [blame] | 161 | %{_libdir}/cmake/libxml2/libxml2-config.cmake |
Daniel Veillard | 87b4d6f | 2012-10-11 14:44:22 +0800 | [diff] [blame] | 162 | |
| 163 | %files static |
| 164 | %defattr(-, root, root) |
| 165 | |
| 166 | %{_libdir}/*a |
| 167 | |
Daniel Veillard | 253aa2c | 2002-02-02 09:17:16 +0000 | [diff] [blame] | 168 | %files python |
| 169 | %defattr(-, root, root) |
| 170 | |
Tomas Radej | fb8e9e2 | 2015-02-18 22:47:13 +0800 | [diff] [blame] | 171 | %{_libdir}/python2*/site-packages/libxml2.py* |
| 172 | %{_libdir}/python2*/site-packages/drv_libxml2.py* |
| 173 | %{_libdir}/python2*/site-packages/libxml2mod* |
Daniel Veillard | 253aa2c | 2002-02-02 09:17:16 +0000 | [diff] [blame] | 174 | %doc python/TODO |
| 175 | %doc python/libxml2class.txt |
| 176 | %doc python/tests/*.py |
Daniel Veillard | f9c4cad | 2002-11-22 15:57:07 +0000 | [diff] [blame] | 177 | %doc doc/*.py |
| 178 | %doc doc/python.html |
Michael Fulbright | 62e8e80 | 1998-09-25 16:58:38 +0000 | [diff] [blame] | 179 | |
Tomas Radej | fb8e9e2 | 2015-02-18 22:47:13 +0800 | [diff] [blame] | 180 | %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 Fulbright | 62e8e80 | 1998-09-25 16:58:38 +0000 | [diff] [blame] | 196 | %changelog |
Daniel Veillard | 9715c17 | 2002-11-25 16:33:40 +0000 | [diff] [blame] | 197 | * @RELDATE@ Daniel Veillard <veillard@redhat.com> |
| 198 | - upstream release @VERSION@ see http://xmlsoft.org/news.html |
| 199 | |