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