1 |
%define major 2 |
2 |
%define libname %mklibname xml2_ %{major} |
3 |
%define develname %mklibname xml2 -d |
4 |
|
5 |
%define subrel 8 |
6 |
|
7 |
Summary: Library providing XML and HTML support |
8 |
Name: libxml2 |
9 |
Version: 2.7.8 |
10 |
Release: %mkrel 9 |
11 |
License: MIT |
12 |
Group: System/Libraries |
13 |
URL: http://www.xmlsoft.org/ |
14 |
Source0: ftp://xmlsoft.org/libxml2/%{name}-%{version}.tar.gz |
15 |
Patch0: libxml2-2.7.8-reenable-version-script.patch |
16 |
Patch1: libxml2-2.7.8-CVE-2010-4494.diff |
17 |
|
18 |
# Bug #1669 |
19 |
# http://scarybeastsecurity.blogspot.com/2011/05/libxml-vulnerability-and-interesting.html |
20 |
# http://git.gnome.org/browse/libxml2/patch/?id=d7958b21e7f8c447a26bb2436f08402b2c308be4 |
21 |
Patch2: libxml-fix-xpath-buffer-overflow.patch |
22 |
Patch3: libxml2-2.7.8-CVE-2011-2821,2834.diff |
23 |
|
24 |
Patch4: libxml2-2.7.8-CVE-2011-0216.diff |
25 |
Patch5: libxml2-2.7.8-CVE-2011-3905.diff |
26 |
Patch6: libxml2-2.7.8-CVE-2011-3919.diff |
27 |
Patch7: libxml2-2.7.8-CVE-2012-0841.diff |
28 |
Patch8: libxml2-2.7.8-CVE-2011-3102.diff |
29 |
Patch9: libxml2-2.7.8-CVE-2012-2807.diff |
30 |
Patch10: libxml2-2.7.8-CVE-2012-5134.diff |
31 |
|
32 |
BuildRequires: gtk-doc |
33 |
BuildRequires: python-devel |
34 |
BuildRequires: readline-devel |
35 |
BuildRequires: zlib-devel |
36 |
|
37 |
%description |
38 |
This library allows you to manipulate XML files. It includes support |
39 |
for reading, modifying and writing XML and HTML files. There is DTDs |
40 |
support: this includes parsing and validation even with complex DtDs, |
41 |
either at parse time or later once the document has been modified. The |
42 |
output can be a simple SAX stream or and in-memory DOM-like |
43 |
representations. In this case one can use the built-in XPath and |
44 |
XPointer implementation to select subnodes or ranges. A flexible |
45 |
Input/Output mechanism is available, with existing HTTP and FTP modules |
46 |
and combined to a URI library. |
47 |
|
48 |
%package -n %{libname} |
49 |
Summary: Shared libraries providing XML and HTML support |
50 |
Group: System/Libraries |
51 |
Obsoletes: %{mklibname xml 2} |
52 |
Provides: %{name} = %{version}-%{release} |
53 |
|
54 |
%description -n %{libname} |
55 |
This library allows you to manipulate XML files. It includes support |
56 |
for reading, modifying and writing XML and HTML files. There is DTDs |
57 |
support: this includes parsing and validation even with complex DtDs, |
58 |
either at parse time or later once the document has been modified. |
59 |
|
60 |
%package utils |
61 |
Summary: Utilities to manipulate XML files |
62 |
Group: System/Libraries |
63 |
Requires: %{libname} >= %{version}-%{release} |
64 |
|
65 |
%description utils |
66 |
This packages contains utils to manipulate XML files. |
67 |
|
68 |
%package python |
69 |
Summary: Python bindings for the libxml2 library |
70 |
Group: Development/Python |
71 |
Requires: %{libname} >= %{version}-%{release} |
72 |
Requires: python >= %{pyver} |
73 |
Provides: python-%{name} = %{version}-%{release} |
74 |
%if "%{_lib}" != "lib" |
75 |
Obsoletes: %{_lib}xml2-python < 2.6.29-4 |
76 |
%endif |
77 |
|
78 |
%description python |
79 |
The libxml2-python package contains a module that permits applications |
80 |
written in the Python programming language to use the interface |
81 |
supplied by the libxml2 library to manipulate XML files. |
82 |
|
83 |
This library allows you to manipulate XML files. It includes support |
84 |
for reading, modifying and writing XML and HTML files. There is DTDs |
85 |
support: this includes parsing and validation even with complex DtDs, |
86 |
either at parse time or later once the document has been modified. |
87 |
|
88 |
%package -n %{develname} |
89 |
Summary: Libraries, includes, etc. to develop XML and HTML applications |
90 |
Group: Development/C |
91 |
Requires: %{libname} = %{version}-%{release} |
92 |
Requires: zlib-devel |
93 |
Provides: %{name}-devel = %{version}-%{release} |
94 |
|
95 |
%description -n %{develname} |
96 |
Libraries, include files, etc you can use to develop XML applications. |
97 |
This library allows you to manipulate XML files. It includes support |
98 |
for reading, modifying and writing XML and HTML files. There is DTDs |
99 |
support: this includes parsing and validation even with complex DtDs, |
100 |
either at parse time or later once the document has been modified. |
101 |
|
102 |
%prep |
103 |
%setup -q |
104 |
%patch0 -p1 |
105 |
%patch1 -p0 -b .CVE-2010-4494 |
106 |
%patch2 -p1 |
107 |
%patch3 -p1 -b .CVE-2011-2821,2834 |
108 |
%patch4 -p0 -b .CVE-2011-0216 |
109 |
%patch5 -p0 -b .CVE-2011-3905 |
110 |
%patch6 -p1 -b .CVE-2011-3919 |
111 |
%patch7 -p1 -b .CVE-2012-0841 |
112 |
%patch8 -p0 -b .CVE-2011-3102 |
113 |
%patch9 -p1 -b .CVE-2012-2807 |
114 |
%patch10 -p1 -b .CVE-2012-5134 |
115 |
|
116 |
%build |
117 |
autoreconf -fi |
118 |
%configure2_5x |
119 |
%make |
120 |
|
121 |
%install |
122 |
rm -rf %{buildroot} |
123 |
|
124 |
%makeinstall_std |
125 |
|
126 |
#only do it here if check aren't done |
127 |
if [ %{_with check} -eq 0 ]; then |
128 |
# clean before packaging documentation |
129 |
(cd doc/examples ; make clean ; rm -rf .deps Makefile) |
130 |
gzip -9 doc/libxml2-api.xml |
131 |
fi |
132 |
|
133 |
|
134 |
# multiarch policy |
135 |
%multiarch_binaries %{buildroot}%{_bindir}/xml2-config |
136 |
|
137 |
# remove unpackaged files |
138 |
rm -rf %{buildroot}%{_prefix}/doc \ |
139 |
%{buildroot}%{_datadir}/doc \ |
140 |
%{buildroot}%{_libdir}/python%{pyver}/site-packages/*.{la,a} \ |
141 |
|
142 |
%check |
143 |
# all tests must pass |
144 |
# use TARBALLURL_2="" TARBALLURL="" TESTDIRS="" to disable xstc test which are using remote tarball |
145 |
make TARBALLURL_2="" TARBALLURL="" TESTDIRS="" check |
146 |
|
147 |
#need to do that after check otherwise it will fail |
148 |
# clean before packaging documentation |
149 |
(cd doc/examples ; make clean ; rm -rf .deps Makefile) |
150 |
gzip -9 doc/libxml2-api.xml |
151 |
|
152 |
%clean |
153 |
rm -rf %{buildroot} |
154 |
|
155 |
%files -n %{libname} |
156 |
%defattr(-, root, root) |
157 |
%{_libdir}/lib*.so.* |
158 |
|
159 |
%files utils |
160 |
%defattr(-, root, root) |
161 |
%doc AUTHORS README Copyright TODO |
162 |
%{_bindir}/xmlcatalog |
163 |
%{_bindir}/xmllint |
164 |
%{_mandir}/man1/xmlcatalog* |
165 |
%{_mandir}/man1/xmllint* |
166 |
|
167 |
%files python |
168 |
%defattr(-, root, root) |
169 |
%doc AUTHORS README Copyright TODO |
170 |
%doc doc/*.py doc/python.html |
171 |
%doc python/TODO |
172 |
%doc python/libxml2class.txt |
173 |
%doc python/tests/*.py |
174 |
%{_libdir}/python%{pyver}/site-packages/*.so |
175 |
%{_libdir}/python%{pyver}/site-packages/*.py |
176 |
|
177 |
%files -n %{develname} |
178 |
%defattr(-, root, root) |
179 |
%doc AUTHORS ChangeLog README Copyright TODO |
180 |
%doc doc/*.html doc/*.gif doc/*.png doc/html doc/examples doc/tutorial |
181 |
%doc doc/libxml2-api.xml.gz |
182 |
%doc %{_datadir}/gtk-doc/html/* |
183 |
%{_bindir}/xml2-config |
184 |
%multiarch %{multiarch_bindir}/xml2-config |
185 |
%{_libdir}/*a |
186 |
%{_libdir}/*.so |
187 |
%{_libdir}/*.sh |
188 |
%{_libdir}/pkgconfig/* |
189 |
%{_mandir}/man1/xml2-config* |
190 |
%{_mandir}/man3/* |
191 |
%{_includedir}/* |
192 |
%{_datadir}/aclocal/* |