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