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