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