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