]> git.pld-linux.org Git - packages/libxml2.git/blame - libxml2.spec
- security patch: Invalid XPath Multiple Memory Corruption
[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
30f31f4d
JB
6%bcond_without python # don't build python module
7%bcond_without static_libs # don't build static libraries
0b339d08 8%bcond_without zlib # don't use zlib
bb6f7bb6 9%bcond_with mem_debug # enable libxml2 memory debuging
3ba0dd16 10
9146e4ca 11Summary: libXML library
c6cb7fae
ER
12Summary(es.UTF-8): Biblioteca libXML version 2
13Summary(pl.UTF-8): Biblioteka libXML wersja 2
14Summary(pt_BR.UTF-8): Biblioteca libXML versão 2
9146e4ca 15Name: libxml2
df9bb853 16Version: 2.7.8
10b29e32 17Release: 2
32bd2aad 18Epoch: 1
78f6a9a3 19License: MIT
9146e4ca 20Group: Libraries
f555f133 21#Source0: http://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/%{name}-%{version}.tar.bz2
22Source0: ftp://xmlsoft.org/libxml2/%{name}-%{version}.tar.gz
df9bb853 23# Source0-md5: 8127a65e8c3b08856093099b52599c86
61f7745d 24Patch0: %{name}-amfix.patch
6f41977c 25Patch1: %{name}-man_fixes.patch
00284157 26Patch2: %{name}-open.gz.patch
9901ea6b 27Patch3: %{name}-largefile.patch
c14cc172 28Patch4: %{name}-version-script.patch
10b29e32 29Patch5: %{name}-XPath.patch
9146e4ca 30URL: http://xmlsoft.org/
7b503906 31BuildRequires: autoconf >= 2.2
30f31f4d 32BuildRequires: automake >= 1.4
7b503906 33BuildRequires: libtool >= 1:1.4.2-9
7b503906
JB
34%{?with_python:BuildRequires: python-devel}
35%{?with_python:BuildRequires: python-modules}
7b503906 36%{?with_python:BuildRequires: rpm-pythonprov}
30f31f4d 37BuildRequires: rpmbuild(macros) >= 1.219
b176c2d0 38%{?with_zlib:BuildRequires: zlib-devel >= 1.2.3.3}
d00368fa
JB
39# history support in xmllint is disabled by default
40#BuildRequires: ncurses-devel
41#BuildRequires: readline-devel >= 4.2
b176c2d0 42Requires: zlib >= 1.2.3.3
e8966c4b 43Obsoletes: xml-common
9146e4ca
AM
44BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
9146e4ca
AM
46%description
47This library allows you to manipulate XML files.
48
257f3917
JR
49%description -l es.UTF-8
50Esta biblioteca permite manipulación de archivos XML.
326c44e7 51
257f3917
JR
52%description -l pl.UTF-8
53Biblioteka libxml2 umożliwia manipulowanie zawartością plików XML.
9146e4ca 54
257f3917
JR
55%description -l pt_BR.UTF-8
56Esta biblioteca permite a manipulação de arquivos XML.
326c44e7 57
9146e4ca
AM
58%package devel
59Summary: Header files etc to develop libxml2 applications
c6cb7fae
ER
60Summary(es.UTF-8): Biblioteca y archivos de inclusión para desarrollo de aplicaciones libXML
61Summary(pl.UTF-8): Pliki nagłówkowe i inne do libxml2
62Summary(pt_BR.UTF-8): Bibliotecas e arquivos de inclusão para desenvolvimento de aplicações que usem a biblioteca libxml
9146e4ca 63Group: Development/Libraries
4f124b4c 64Requires: %{name} = %{epoch}:%{version}-%{release}
5ff229cc 65Requires: zlib-devel
9146e4ca
AM
66
67%description devel
68Header files etc you can use to develop libxml2 applications.
69
257f3917
JR
70%description devel -l es.UTF-8
71Biblioteca y archivos de inclusión para desarrollo de aplicaciones
326c44e7 72libXML.
73
257f3917
JR
74%description devel -l pl.UTF-8
75Pakiet ten zawiera pliki nagłówkowe i inne do libxml2 niezbędne przy
76tworzeniu aplikacji opartych o tę bibliotekę.
9146e4ca 77
257f3917
JR
78%description devel -l pt_BR.UTF-8
79Bibliotecas e arquivos de inclusão para desenvolvimento de aplicações
326c44e7 80que usem a biblioteca libxml.
81
9146e4ca
AM
82%package static
83Summary: Static libxml2 libraries
c6cb7fae
ER
84Summary(es.UTF-8): Static libraries to develop libxml applications
85Summary(pl.UTF-8): Biblioteka statyczna libxml2
86Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento de aplicações que usem a biblioteca libxml
9146e4ca 87Group: Development/Libraries
4f124b4c 88Requires: %{name}-devel = %{epoch}:%{version}-%{release}
9146e4ca
AM
89
90%description static
91Static libxml2 libraries.
92
257f3917 93%description static -l es.UTF-8
326c44e7 94Static libraries, you can use to develop libxml applications.
95
257f3917 96%description static -l pl.UTF-8
9146e4ca
AM
97Biblioteka statyczna libxml2.
98
257f3917
JR
99%description static -l pt_BR.UTF-8
100Bibliotecas estáticas para desenvolvimento de aplicações que usem a
326c44e7 101biblioteca libxml.
102
e5fe7879
MB
103%package apidocs
104Summary: libxml2 API documentation
105Summary(pl.UTF-8): Dokumentacja API libxml2
106Group: Documentation
107Requires: gtk-doc-common
108
109%description apidocs
110libxml2 API documentation.
111
112%description apidocs -l pl.UTF-8
113Dokumentacja API libxml2.
114
fef91692 115%package progs
116Summary: XML files parser
c6cb7fae 117Summary(pl.UTF-8): Analizator składniowy plików XML
fef91692 118Group: Applications/Text
4f124b4c 119Requires: %{name} = %{epoch}:%{version}-%{release}
fef91692 120
121%description progs
122XML files parser.
123
257f3917
JR
124%description progs -l pl.UTF-8
125Analizator składniowy plików XML.
fef91692 126
78f6a9a3 127%package -n python-%{name}
128Summary: Python support for libxml2
c6cb7fae 129Summary(pl.UTF-8): Moduły języka Python dla biblioteki libxml2
db6d9c9b 130Group: Libraries/Python
4f124b4c 131Requires: %{name} = %{epoch}:%{version}-%{release}
eff67c27 132%pyrequires_eq python-libs
560a3de6 133Obsoletes: libxml2-python
78f6a9a3 134
135%description -n python-%{name}
136Python support for libxml2.
137
257f3917
JR
138%description -n python-%{name} -l pl.UTF-8
139Moduły języka Python dla biblioteki libxml2.
78f6a9a3 140
9146e4ca
AM
141%prep
142%setup -q
6f41977c 143%patch0 -p1
144%patch1 -p1
0b339d08 145%if %{with zlib}
00284157 146%patch2 -p1
0b339d08 147%endif
9901ea6b 148%patch3 -p1
c14cc172 149%patch4 -p1
10b29e32 150%patch5 -p1
ccf06610 151
9146e4ca 152%build
c3e0f8bb 153%{__libtoolize}
194fa592 154%{__aclocal}
b65cf538 155%{__autoconf}
7b503906 156%{__autoheader}
b65cf538 157%{__automake}
e0ab6350 158%configure \
39a5b7a8 159 %{!?with_static_libs:--enable-static=no} \
0b339d08 160 %{!?with_python:--without-python} \
bb6f7bb6
JK
161 %{!?with_zlib:--with-zlib=no} \
162 --with%{!?with_mem_debug:out}-mem-debug
9c79f44a 163
9146e4ca
AM
164%{__make}
165
166%install
167rm -rf $RPM_BUILD_ROOT
168
5d7e8892
JB
169%{__make} install \
170 DESTDIR=$RPM_BUILD_ROOT \
30f31f4d 171 DEVHELP_DIR=%{_gtkdocdir}/libxml2 \
5d7e8892
JB
172 m4datadir=%{_aclocaldir} \
173 pkgconfigdir=%{_pkgconfigdir}
9146e4ca 174
4b15d29d 175# move examples to proper dir
176install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-devel-%{version} \
177 $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
178mv $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/examples/* \
179 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-devel-%{version}
97e76e01 180
7b503906
JB
181%if %{with python}
182mv -f $RPM_BUILD_ROOT%{_docdir}/%{name}-python-%{version}/examples/* \
4b15d29d 183 $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
97e76e01
ER
184
185%if "%{py_ver}" > "2.4"
64256ca4
JK
186cd python
187./setup.py install_egg_info --install-dir=$RPM_BUILD_ROOT%{py_sitedir}
188cd ..
4b15d29d 189%endif
97e76e01 190%endif
4b15d29d 191
192# move html doc to -devel package
193install -d $RPM_BUILD_ROOT%{_docdir}/%{name}-devel-%{version}
e0ab6350 194mv -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html \
4b15d29d 195 $RPM_BUILD_ROOT%{_docdir}/%{name}-devel-%{version}
196rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
197
9cad6a31 198# install catalog file
199install -d $RPM_BUILD_ROOT%{_sysconfdir}/xml
200LD_LIBRARY_PATH=.libs ./xmlcatalog --create \
201 > $RPM_BUILD_ROOT%{_sysconfdir}/xml/catalog
202
7b503906 203%if %{with python}
78f6a9a3 204%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
205%py_comp $RPM_BUILD_ROOT%{py_sitedir}
30f31f4d 206%py_postclean
465bf951 207rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}
696b50a8 208%endif
78f6a9a3 209
9146e4ca 210%clean
7939e1ec 211rm -rf $RPM_BUILD_ROOT
9146e4ca 212
e8d2b5b5 213%post -p /sbin/ldconfig
214%postun -p /sbin/ldconfig
9146e4ca
AM
215
216%files
217%defattr(644,root,root,755)
d73bc3df 218%doc AUTHORS ChangeLog Copyright NEWS README TODO
ccba1061
JB
219%attr(755,root,root) %{_libdir}/libxml2.so.*.*.*
220%attr(755,root,root) %ghost %{_libdir}/libxml2.so.2
221%{_mandir}/man3/libxml.3*
9146e4ca 222
9cad6a31 223%dir %{_sysconfdir}/xml
5a57b590 224%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xml/catalog
9cad6a31 225
9146e4ca
AM
226%files devel
227%defattr(644,root,root,755)
4b15d29d 228%doc %{_docdir}/%{name}-devel-%{version}
f0e239fb 229%attr(755,root,root) %{_bindir}/xml2-config
ccba1061
JB
230%attr(755,root,root) %{_libdir}/libxml2.so
231%{_libdir}/libxml2.la
232%{_pkgconfigdir}/libxml-2.0.pc
233%{_aclocaldir}/libxml.m4
326f70c8 234%{_includedir}/libxml2
fef91692 235%{_mandir}/man1/xml2-config.1*
96a30929 236%{_examplesdir}/%{name}-devel-%{version}
9146e4ca 237
e0ab6350 238%if %{with static_libs}
9146e4ca
AM
239%files static
240%defattr(644,root,root,755)
ccba1061 241%{_libdir}/libxml2.a
e0ab6350 242%endif
fef91692 243
3ba0dd16 244%if %{with apidocs}
e5fe7879
MB
245%files apidocs
246%defattr(644,root,root,755)
247%{_gtkdocdir}/libxml2
3ba0dd16 248%endif
e5fe7879 249
fef91692 250%files progs
251%defattr(644,root,root,755)
6f41977c 252%attr(755,root,root) %{_bindir}/xmlcatalog
fef91692 253%attr(755,root,root) %{_bindir}/xmllint
6f41977c 254%{_mandir}/man1/xmlcatalog.1*
fef91692 255%{_mandir}/man1/xmllint.1*
78f6a9a3 256
7b503906 257%if %{with python}
78f6a9a3 258%files -n python-%{name}
259%defattr(644,root,root,755)
ccba1061 260%attr(755,root,root) %{py_sitedir}/libxml2mod.so
30f31f4d
JB
261%{py_sitedir}/drv_libxml2.py[co]
262%{py_sitedir}/libxml2.py[co]
97e76e01 263%if "%{py_ver}" > "2.4"
64256ca4 264%{py_sitedir}/libxml2_python-*.egg-info
97e76e01 265%endif
30f31f4d 266%{_examplesdir}/python-%{name}-%{version}
696b50a8 267%endif
This page took 0.095013 seconds and 4 git commands to generate.