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