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