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