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