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