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