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