1 | %global with_python3 1
|
---|
2 |
|
---|
3 | Summary: Library providing XML and HTML support
|
---|
4 | Name: libxml2
|
---|
5 | Version: @VERSION@
|
---|
6 | Release: 1%{?dist}%{?extra_release}
|
---|
7 | License: MIT
|
---|
8 | Group: Development/Libraries
|
---|
9 | Source: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz
|
---|
10 | BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
---|
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
|
---|
18 | URL: http://xmlsoft.org/
|
---|
19 |
|
---|
20 | %description
|
---|
21 | This library allows to manipulate XML files. It includes support
|
---|
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
|
---|
27 | to select sub nodes or ranges. A flexible Input/Output mechanism is
|
---|
28 | available, with existing HTTP and FTP modules and combined to an
|
---|
29 | URI library.
|
---|
30 |
|
---|
31 | %package devel
|
---|
32 | Summary: Libraries, includes, etc. to develop XML and HTML applications
|
---|
33 | Group: Development/Libraries
|
---|
34 | Requires: libxml2 = %{version}-%{release}
|
---|
35 | Requires: zlib-devel
|
---|
36 | Requires: xz-devel
|
---|
37 | Requires: pkgconfig
|
---|
38 |
|
---|
39 | %description devel
|
---|
40 | Libraries, include files, etc you can use to develop XML applications.
|
---|
41 | This library allows to manipulate XML files. It includes support
|
---|
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
|
---|
47 | to select sub nodes or ranges. A flexible Input/Output mechanism is
|
---|
48 | available, with existing HTTP and FTP modules and combined to an
|
---|
49 | URI library.
|
---|
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 |
|
---|
60 | %package python
|
---|
61 | Summary: Python bindings for the libxml2 library
|
---|
62 | Group: Development/Libraries
|
---|
63 | Requires: libxml2 = %{version}-%{release}
|
---|
64 |
|
---|
65 | %description python
|
---|
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
|
---|
68 | supplied by the libxml2 library to manipulate XML files.
|
---|
69 |
|
---|
70 | This library allows to manipulate XML files. It includes support
|
---|
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.
|
---|
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 |
|
---|
92 | %prep
|
---|
93 | %setup -q
|
---|
94 |
|
---|
95 | %build
|
---|
96 | %configure
|
---|
97 | make %{_smp_mflags}
|
---|
98 |
|
---|
99 | %install
|
---|
100 | rm -fr %{buildroot}
|
---|
101 |
|
---|
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}/*
|
---|
116 | (cd doc/examples ; make clean ; rm -rf .deps Makefile)
|
---|
117 | gzip -9 -c doc/libxml2-api.xml > doc/libxml2-api.xml.gz
|
---|
118 |
|
---|
119 | %check
|
---|
120 | make runtests
|
---|
121 |
|
---|
122 | %clean
|
---|
123 | rm -fr %{buildroot}
|
---|
124 |
|
---|
125 | %post -p /sbin/ldconfig
|
---|
126 |
|
---|
127 | %postun -p /sbin/ldconfig
|
---|
128 |
|
---|
129 | %files
|
---|
130 | %defattr(-, root, root)
|
---|
131 |
|
---|
132 | %doc AUTHORS NEWS README Copyright TODO
|
---|
133 | %doc %{_mandir}/man1/xmllint.1*
|
---|
134 | %doc %{_mandir}/man1/xmlcatalog.1*
|
---|
135 | %doc %{_mandir}/man3/libxml.3*
|
---|
136 |
|
---|
137 | %{_libdir}/lib*.so.*
|
---|
138 | %{_bindir}/xmllint
|
---|
139 | %{_bindir}/xmlcatalog
|
---|
140 |
|
---|
141 | %files devel
|
---|
142 | %defattr(-, root, root)
|
---|
143 |
|
---|
144 | %doc %{_mandir}/man1/xml2-config.1*
|
---|
145 | %doc AUTHORS NEWS README Copyright
|
---|
146 | %doc doc/*.html doc/html doc/*.gif doc/*.png
|
---|
147 | %doc doc/tutorial doc/libxml2-api.xml.gz
|
---|
148 | %doc doc/examples
|
---|
149 | %doc %dir %{_datadir}/gtk-doc/html/libxml2
|
---|
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
|
---|
154 |
|
---|
155 | %{_libdir}/lib*.so
|
---|
156 | %{_libdir}/*.sh
|
---|
157 | %{_includedir}/*
|
---|
158 | %{_bindir}/xml2-config
|
---|
159 | %{_datadir}/aclocal/libxml.m4
|
---|
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 |
|
---|
168 | %files python
|
---|
169 | %defattr(-, root, root)
|
---|
170 |
|
---|
171 | %{_libdir}/python2*/site-packages/libxml2.py*
|
---|
172 | %{_libdir}/python2*/site-packages/drv_libxml2.py*
|
---|
173 | %{_libdir}/python2*/site-packages/libxml2mod*
|
---|
174 | %doc python/TODO
|
---|
175 | %doc python/libxml2class.txt
|
---|
176 | %doc python/tests/*.py
|
---|
177 | %doc doc/*.py
|
---|
178 | %doc doc/python.html
|
---|
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 |
|
---|
196 | %changelog
|
---|
197 | * @RELDATE@ Daniel Veillard <[email protected]>
|
---|
198 | - upstream release @VERSION@ see http://xmlsoft.org/news.html
|
---|
199 |
|
---|