]> git.pld-linux.org Git - packages/libxml2.git/blame - libxml2.spec
- release 2 (by relup.sh)
[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
21df4425 18Version: 2.9.8
405a8e95 19Release: 2
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
21df4425 25# Source0-md5: b786e353e2aa1b872d70d5d1ca0c740d
74971558
JB
26Patch0: %{name}-man_fixes.patch
27Patch1: %{name}-open.gz.patch
28Patch2: %{name}-largefile.patch
8e803445 29
b438d5e1 30Patch4: %{name}-libx32.patch
e952df24 31# Patch5-md5: be948499ae913253ad06ae2b0d0c2f12
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
ER
119%if "%{_rpmversion}" >= "5"
120BuildArch: noarch
121%endif
e5fe7879
MB
122
123%description apidocs
124libxml2 API documentation.
125
126%description apidocs -l pl.UTF-8
127Dokumentacja API libxml2.
128
fef91692 129%package progs
130Summary: XML files parser
c6cb7fae 131Summary(pl.UTF-8): Analizator składniowy plików XML
fef91692 132Group: Applications/Text
4f124b4c 133Requires: %{name} = %{epoch}:%{version}-%{release}
fef91692 134
135%description progs
136XML files parser.
137
257f3917
JR
138%description progs -l pl.UTF-8
139Analizator składniowy plików XML.
fef91692 140
78f6a9a3 141%package -n python-%{name}
a627f64a
JB
142Summary: libxml2 module for Python 2.x
143Summary(pl.UTF-8): Moduł libxml2 dla Pythona 2.x
db6d9c9b 144Group: Libraries/Python
4f124b4c 145Requires: %{name} = %{epoch}:%{version}-%{release}
1317db76 146Requires: python-libs
560a3de6 147Obsoletes: libxml2-python
78f6a9a3 148
149%description -n python-%{name}
a627f64a
JB
150This is the libxml2 module for Python 2.x, providing access to the
151libxml2 library.
78f6a9a3 152
257f3917 153%description -n python-%{name} -l pl.UTF-8
72f37f9b
ER
154Ten pakiet zawiera moduł libxml2 dla Pythona 2.x, zapewniający dostęp
155do biblioteki libxml2.
78f6a9a3 156
1317db76 157%package -n python3-%{name}
a627f64a
JB
158Summary: libxml2 module for Python 3.x
159Summary(pl.UTF-8): Moduł libxml2 dla Pythona 3.x
1317db76
AM
160Group: Libraries/Python
161Requires: %{name} = %{epoch}:%{version}-%{release}
162Requires: python3-libs
163
164%description -n python3-%{name}
a627f64a
JB
165This is the libxml2 module for Python 3.x, providing access to the
166libxml2 library.
1317db76
AM
167
168%description -n python3-%{name} -l pl.UTF-8
72f37f9b
ER
169Ten pakiet zawiera moduł libxml2 dla Pythona 3.x, zapewniający dostęp
170do biblioteki libxml2.
1317db76 171
9146e4ca
AM
172%prep
173%setup -q
6f41977c 174%patch0 -p1
0b339d08 175%if %{with zlib}
74971558 176%patch1 -p1
0b339d08 177%endif
74971558 178%patch2 -p1
8e803445 179
b438d5e1 180%patch4 -p1
ccf06610 181
9146e4ca 182%build
c3e0f8bb 183%{__libtoolize}
194fa592 184%{__aclocal}
b65cf538 185%{__autoconf}
7b503906 186%{__autoheader}
b65cf538 187%{__automake}
e0ab6350 188%configure \
74971558
JB
189 --disable-silent-rules \
190 %{!?with_static_libs:--disable-static=no} \
1317db76 191 --without-python \
74971558 192 %{!?with_zlib:--without-zlib} \
7658de52 193 --with-lzma \
bb6f7bb6 194 --with%{!?with_mem_debug:out}-mem-debug
9c79f44a 195
9146e4ca
AM
196%{__make}
197
1317db76
AM
198%if %{with python2}
199cd python
c95aad23 200%py_build
1317db76
AM
201cd ..
202%endif
203
204
205%if %{with python3}
206cd python
c95aad23 207%py3_build
1317db76
AM
208cd ..
209%endif
210
211%if %{with tests}
212%{__make} check
213%endif
214
9146e4ca
AM
215%install
216rm -rf $RPM_BUILD_ROOT
217
5d7e8892
JB
218%{__make} install \
219 DESTDIR=$RPM_BUILD_ROOT \
7658de52 220 devhelpdir=%{_gtkdocdir}/libxml2 \
5d7e8892
JB
221 m4datadir=%{_aclocaldir} \
222 pkgconfigdir=%{_pkgconfigdir}
9146e4ca 223
1317db76
AM
224%if %{with python2}
225cd python
c95aad23 226%py_install
97e76e01 227
1317db76 228%py_postclean
64256ca4 229cd ..
4b15d29d 230%endif
1317db76
AM
231
232%if %{with python3}
233cd python
c95aad23 234%py3_install
1317db76 235cd ..
97e76e01 236%endif
4b15d29d 237
238# move html doc to -devel package
239install -d $RPM_BUILD_ROOT%{_docdir}/%{name}-devel-%{version}
a627f64a 240%{__mv} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html \
4b15d29d 241 $RPM_BUILD_ROOT%{_docdir}/%{name}-devel-%{version}
a627f64a 242%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
4b15d29d 243
9cad6a31 244# install catalog file
245install -d $RPM_BUILD_ROOT%{_sysconfdir}/xml
246LD_LIBRARY_PATH=.libs ./xmlcatalog --create \
247 > $RPM_BUILD_ROOT%{_sysconfdir}/xml/catalog
248
9146e4ca 249%clean
7939e1ec 250rm -rf $RPM_BUILD_ROOT
9146e4ca 251
e8d2b5b5 252%post -p /sbin/ldconfig
253%postun -p /sbin/ldconfig
9146e4ca
AM
254
255%files
256%defattr(644,root,root,755)
d73bc3df 257%doc AUTHORS ChangeLog Copyright NEWS README TODO
ccba1061
JB
258%attr(755,root,root) %{_libdir}/libxml2.so.*.*.*
259%attr(755,root,root) %ghost %{_libdir}/libxml2.so.2
260%{_mandir}/man3/libxml.3*
9146e4ca 261
9cad6a31 262%dir %{_sysconfdir}/xml
5a57b590 263%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xml/catalog
9cad6a31 264
9146e4ca
AM
265%files devel
266%defattr(644,root,root,755)
4b15d29d 267%doc %{_docdir}/%{name}-devel-%{version}
f0e239fb 268%attr(755,root,root) %{_bindir}/xml2-config
ccba1061
JB
269%attr(755,root,root) %{_libdir}/libxml2.so
270%{_libdir}/libxml2.la
74971558 271%attr(755,root,root) %{_libdir}/xml2Conf.sh
1317db76 272%{_libdir}/cmake/libxml2
ccba1061
JB
273%{_pkgconfigdir}/libxml-2.0.pc
274%{_aclocaldir}/libxml.m4
326f70c8 275%{_includedir}/libxml2
fef91692 276%{_mandir}/man1/xml2-config.1*
9146e4ca 277
e0ab6350 278%if %{with static_libs}
9146e4ca
AM
279%files static
280%defattr(644,root,root,755)
ccba1061 281%{_libdir}/libxml2.a
e0ab6350 282%endif
fef91692 283
3ba0dd16 284%if %{with apidocs}
e5fe7879
MB
285%files apidocs
286%defattr(644,root,root,755)
287%{_gtkdocdir}/libxml2
3ba0dd16 288%endif
e5fe7879 289
fef91692 290%files progs
291%defattr(644,root,root,755)
6f41977c 292%attr(755,root,root) %{_bindir}/xmlcatalog
fef91692 293%attr(755,root,root) %{_bindir}/xmllint
6f41977c 294%{_mandir}/man1/xmlcatalog.1*
fef91692 295%{_mandir}/man1/xmllint.1*
78f6a9a3 296
1317db76 297%if %{with python2}
78f6a9a3 298%files -n python-%{name}
299%defattr(644,root,root,755)
ccba1061 300%attr(755,root,root) %{py_sitedir}/libxml2mod.so
30f31f4d
JB
301%{py_sitedir}/drv_libxml2.py[co]
302%{py_sitedir}/libxml2.py[co]
97e76e01 303%if "%{py_ver}" > "2.4"
64256ca4 304%{py_sitedir}/libxml2_python-*.egg-info
97e76e01 305%endif
1317db76
AM
306%endif
307
308%if %{with python3}
309%files -n python3-%{name}
310%defattr(644,root,root,755)
311%{py3_sitedir}/__pycache__/*.py[co]
312%{py3_sitedir}/drv_libxml2.py
313%{py3_sitedir}/libxml2.py
314%{py3_sitedir}/libxml2_python-%{version}-py*.egg-info
315%attr(755,root,root) %{py3_sitedir}/libxml2mod.cpython-*.so
696b50a8 316%endif
This page took 0.155049 seconds and 4 git commands to generate.