]> git.pld-linux.org Git - packages/libxml2.git/blob - libxml2.spec
- rel 5; python3.6 fix (undefined symbol: _PyVerify_fd)
[packages/libxml2.git] / libxml2.spec
1 # TODO:
2 # - fix build without libxml2-devel (python library uses old headers)
3 #
4 # Conditional build:
5 %bcond_without  apidocs         # do not build and package API docs
6 %bcond_without  python2         # CPython 2.x module
7 %bcond_without  python3         # CPython 3.x module
8 %bcond_without  static_libs     # static library
9 %bcond_without  zlib            # zlib support
10 %bcond_with     mem_debug       # libxml2 memory debuging
11 %bcond_without  tests           # "make check" call
12
13 Summary:        libXML library version 2
14 Summary(es.UTF-8):      Biblioteca libXML version 2
15 Summary(pl.UTF-8):      Biblioteka libXML wersja 2
16 Summary(pt_BR.UTF-8):   Biblioteca libXML versão 2
17 Name:           libxml2
18 Version:        2.9.4
19 Release:        5
20 Epoch:          1
21 License:        MIT
22 Group:          Libraries
23 #Source0:       http://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/%{name}-%{version}.tar.bz2
24 Source0:        ftp://xmlsoft.org/libxml2/%{name}-%{version}.tar.gz
25 # Source0-md5:  ae249165c173b1ff386ee8ad676815f5
26 Patch0:         %{name}-man_fixes.patch
27 Patch1:         %{name}-open.gz.patch
28 Patch2:         %{name}-largefile.patch
29 # https://git.gnome.org/browse/libxml2/patch/?id=3169602058bd2d04913909e869c61d1540bc7fb4
30 Patch3:         %{name}-schema.patch
31 Patch4:         %{name}-libx32.patch
32 Patch5:         http://pkgs.fedoraproject.org/cgit/rpms/libxml2.git/plain/libxml2-2.9.4-remove-pyverify_fd.patch
33 # Patch5-md5:   be948499ae913253ad06ae2b0d0c2f12
34 URL:            http://xmlsoft.org/
35 BuildRequires:  autoconf >= 2.68
36 BuildRequires:  automake >= 1.4
37 BuildRequires:  libtool >= 2:2.0
38 %if %{with python2}
39 BuildRequires:  python-devel >= 2.0
40 BuildRequires:  python-modules >= 2.0
41 BuildRequires:  rpm-pythonprov
42 %endif
43 %if %{with python3}
44 BuildRequires:  python3-devel >= 1:3.2
45 BuildRequires:  python3-modules >= 1:3.2
46 BuildRequires:  rpm-pythonprov
47 %endif
48 BuildRequires:  rpmbuild(macros) >= 1.714
49 BuildRequires:  xz-devel
50 %{?with_zlib:BuildRequires:     zlib-devel >= 1.2.3.3}
51 # history support in xmllint is disabled by default
52 #BuildRequires: ncurses-devel
53 #BuildRequires: readline-devel >= 4.2
54 Requires:       zlib >= 1.2.3.3
55 Obsoletes:      xml-common
56 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
58 %description
59 This library allows you to manipulate XML files.
60
61 %description -l es.UTF-8
62 Esta biblioteca permite manipulación de archivos XML.
63
64 %description -l pl.UTF-8
65 Biblioteka libxml2 umożliwia manipulowanie zawartością plików XML.
66
67 %description -l pt_BR.UTF-8
68 Esta biblioteca permite a manipulação de arquivos XML.
69
70 %package devel
71 Summary:        Header files etc to develop libxml2 applications
72 Summary(es.UTF-8):      Biblioteca y archivos de inclusión para desarrollo de aplicaciones libXML
73 Summary(pl.UTF-8):      Pliki nagłówkowe i inne do libxml2
74 Summary(pt_BR.UTF-8):   Bibliotecas e arquivos de inclusão para desenvolvimento de aplicações que usem a biblioteca libxml
75 Group:          Development/Libraries
76 Requires:       %{name} = %{epoch}:%{version}-%{release}
77 Requires:       xz-devel
78 Requires:       zlib-devel
79
80 %description devel
81 Header files etc you can use to develop libxml2 applications.
82
83 %description devel -l es.UTF-8
84 Biblioteca y archivos de inclusión para desarrollo de aplicaciones
85 libXML.
86
87 %description devel -l pl.UTF-8
88 Pakiet ten zawiera pliki nagłówkowe i inne do libxml2 niezbędne przy
89 tworzeniu aplikacji opartych o tę bibliotekę.
90
91 %description devel -l pt_BR.UTF-8
92 Bibliotecas e arquivos de inclusão para desenvolvimento de aplicações
93 que usem a biblioteca libxml.
94
95 %package static
96 Summary:        Static libxml2 libraries
97 Summary(es.UTF-8):      Static libraries to develop libxml applications
98 Summary(pl.UTF-8):      Biblioteka statyczna libxml2
99 Summary(pt_BR.UTF-8):   Bibliotecas estáticas para desenvolvimento de aplicações que usem a biblioteca libxml
100 Group:          Development/Libraries
101 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
102
103 %description static
104 Static libxml2 libraries.
105
106 %description static -l es.UTF-8
107 Static libraries, you can use to develop libxml applications.
108
109 %description static -l pl.UTF-8
110 Biblioteka statyczna libxml2.
111
112 %description static -l pt_BR.UTF-8
113 Bibliotecas estáticas para desenvolvimento de aplicações que usem a
114 biblioteca libxml.
115
116 %package apidocs
117 Summary:        libxml2 API documentation
118 Summary(pl.UTF-8):      Dokumentacja API libxml2
119 Group:          Documentation
120 Requires:       gtk-doc-common
121 %if "%{_rpmversion}" >= "5"
122 BuildArch:      noarch
123 %endif
124
125 %description apidocs
126 libxml2 API documentation.
127
128 %description apidocs -l pl.UTF-8
129 Dokumentacja API libxml2.
130
131 %package progs
132 Summary:        XML files parser
133 Summary(pl.UTF-8):      Analizator składniowy plików XML
134 Group:          Applications/Text
135 Requires:       %{name} = %{epoch}:%{version}-%{release}
136
137 %description progs
138 XML files parser.
139
140 %description progs -l pl.UTF-8
141 Analizator składniowy plików XML.
142
143 %package -n python-%{name}
144 Summary:        libxml2 module for Python 2.x
145 Summary(pl.UTF-8):      Moduł libxml2 dla Pythona 2.x
146 Group:          Libraries/Python
147 Requires:       %{name} = %{epoch}:%{version}-%{release}
148 Requires:       python-libs
149 Obsoletes:      libxml2-python
150
151 %description -n python-%{name}
152 This is the libxml2 module for Python 2.x, providing access to the
153 libxml2 library.
154
155 %description -n python-%{name} -l pl.UTF-8
156 Ten pakiet zawiera moduł libxml2 dla Pythona 2.x, zapewniający dostęp
157 do biblioteki libxml2.
158
159 %package -n python3-%{name}
160 Summary:        libxml2 module for Python 3.x
161 Summary(pl.UTF-8):      Moduł libxml2 dla Pythona 3.x
162 Group:          Libraries/Python
163 Requires:       %{name} = %{epoch}:%{version}-%{release}
164 Requires:       python3-libs
165
166 %description -n python3-%{name}
167 This is the libxml2 module for Python 3.x, providing access to the
168 libxml2 library.
169
170 %description -n python3-%{name} -l pl.UTF-8
171 Ten pakiet zawiera moduł libxml2 dla Pythona 3.x, zapewniający dostęp
172 do biblioteki libxml2.
173
174 %prep
175 %setup -q
176 %patch0 -p1
177 %if %{with zlib}
178 %patch1 -p1
179 %endif
180 %patch2 -p1
181 %patch3 -p1
182 %patch4 -p1
183 %patch5 -p1
184
185 %build
186 %{__libtoolize}
187 %{__aclocal}
188 %{__autoconf}
189 %{__autoheader}
190 %{__automake}
191 %configure \
192         --disable-silent-rules \
193         %{!?with_static_libs:--disable-static=no} \
194         --without-python \
195         %{!?with_zlib:--without-zlib} \
196         --with-lzma \
197         --with%{!?with_mem_debug:out}-mem-debug
198
199 %{__make}
200
201 %if %{with python2}
202 cd python
203 %py_build
204 cd ..
205 %endif
206
207
208 %if %{with python3}
209 cd python
210 %py3_build
211 cd ..
212 %endif
213
214 %if %{with tests}
215 %{__make} check
216 %endif
217
218 %install
219 rm -rf $RPM_BUILD_ROOT
220
221 %{__make} install \
222         DESTDIR=$RPM_BUILD_ROOT \
223         devhelpdir=%{_gtkdocdir}/libxml2 \
224         m4datadir=%{_aclocaldir} \
225         pkgconfigdir=%{_pkgconfigdir}
226
227 %if %{with python2}
228 cd python
229 %py_install
230
231 %py_postclean
232 cd ..
233 %endif
234
235 %if %{with python3}
236 cd python
237 %py3_install
238 cd ..
239 %endif
240
241 # move html doc to -devel package
242 install -d $RPM_BUILD_ROOT%{_docdir}/%{name}-devel-%{version}
243 %{__mv} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html \
244         $RPM_BUILD_ROOT%{_docdir}/%{name}-devel-%{version}
245 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
246
247 # install catalog file
248 install -d $RPM_BUILD_ROOT%{_sysconfdir}/xml
249 LD_LIBRARY_PATH=.libs ./xmlcatalog --create \
250         > $RPM_BUILD_ROOT%{_sysconfdir}/xml/catalog
251
252 %clean
253 rm -rf $RPM_BUILD_ROOT
254
255 %post   -p /sbin/ldconfig
256 %postun -p /sbin/ldconfig
257
258 %files
259 %defattr(644,root,root,755)
260 %doc AUTHORS ChangeLog Copyright NEWS README TODO
261 %attr(755,root,root) %{_libdir}/libxml2.so.*.*.*
262 %attr(755,root,root) %ghost %{_libdir}/libxml2.so.2
263 %{_mandir}/man3/libxml.3*
264
265 %dir %{_sysconfdir}/xml
266 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xml/catalog
267
268 %files devel
269 %defattr(644,root,root,755)
270 %doc %{_docdir}/%{name}-devel-%{version}
271 %attr(755,root,root) %{_bindir}/xml2-config
272 %attr(755,root,root) %{_libdir}/libxml2.so
273 %{_libdir}/libxml2.la
274 %attr(755,root,root) %{_libdir}/xml2Conf.sh
275 %{_libdir}/cmake/libxml2
276 %{_pkgconfigdir}/libxml-2.0.pc
277 %{_aclocaldir}/libxml.m4
278 %{_includedir}/libxml2
279 %{_mandir}/man1/xml2-config.1*
280
281 %if %{with static_libs}
282 %files static
283 %defattr(644,root,root,755)
284 %{_libdir}/libxml2.a
285 %endif
286
287 %if %{with apidocs}
288 %files apidocs
289 %defattr(644,root,root,755)
290 %{_gtkdocdir}/libxml2
291 %endif
292
293 %files progs
294 %defattr(644,root,root,755)
295 %attr(755,root,root) %{_bindir}/xmlcatalog
296 %attr(755,root,root) %{_bindir}/xmllint
297 %{_mandir}/man1/xmlcatalog.1*
298 %{_mandir}/man1/xmllint.1*
299
300 %if %{with python2}
301 %files -n python-%{name}
302 %defattr(644,root,root,755)
303 %attr(755,root,root) %{py_sitedir}/libxml2mod.so
304 %{py_sitedir}/drv_libxml2.py[co]
305 %{py_sitedir}/libxml2.py[co]
306 %if "%{py_ver}" > "2.4"
307 %{py_sitedir}/libxml2_python-*.egg-info
308 %endif
309 %endif
310
311 %if %{with python3}
312 %files -n python3-%{name}
313 %defattr(644,root,root,755)
314 %{py3_sitedir}/__pycache__/*.py[co]
315 %{py3_sitedir}/drv_libxml2.py
316 %{py3_sitedir}/libxml2.py
317 %{py3_sitedir}/libxml2_python-%{version}-py*.egg-info
318 %attr(755,root,root) %{py3_sitedir}/libxml2mod.cpython-*.so
319 %endif
This page took 0.211377 seconds and 3 git commands to generate.