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