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