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