]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without python # don't build python module | |
4 | %bcond_without static_libs # don't build static libraries | |
5 | # | |
6 | Summary: libXML library | |
7 | Summary(es.UTF-8): Biblioteca libXML version 2 | |
8 | Summary(pl.UTF-8): Biblioteka libXML wersja 2 | |
9 | Summary(pt_BR.UTF-8): Biblioteca libXML versão 2 | |
10 | Name: libxml2 | |
11 | Version: 2.7.3 | |
12 | Release: 1 | |
13 | Epoch: 1 | |
14 | License: MIT | |
15 | Group: Libraries | |
16 | #Source0: http://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/%{name}-%{version}.tar.bz2 | |
17 | Source0: ftp://xmlsoft.org/libxml2/%{name}-%{version}.tar.gz | |
18 | # Source0-md5: 8f4fda3969237c2a33bdb1583b5d06b2 | |
19 | Patch0: %{name}-amfix.patch | |
20 | Patch1: %{name}-man_fixes.patch | |
21 | Patch2: %{name}-open.gz.patch | |
22 | URL: http://xmlsoft.org/ | |
23 | BuildRequires: autoconf >= 2.2 | |
24 | BuildRequires: automake >= 1.4 | |
25 | BuildRequires: libtool >= 1:1.4.2-9 | |
26 | %{?with_python:BuildRequires: python-devel} | |
27 | %{?with_python:BuildRequires: python-modules} | |
28 | %{?with_python:BuildRequires: rpm-pythonprov} | |
29 | BuildRequires: rpmbuild(macros) >= 1.219 | |
30 | BuildRequires: zlib-devel | |
31 | # history support in xmllint is disabled by default | |
32 | #BuildRequires: ncurses-devel | |
33 | #BuildRequires: readline-devel >= 4.2 | |
34 | Obsoletes: xml-common | |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
36 | ||
37 | %description | |
38 | This library allows you to manipulate XML files. | |
39 | ||
40 | %description -l es.UTF-8 | |
41 | Esta biblioteca permite manipulación de archivos XML. | |
42 | ||
43 | %description -l pl.UTF-8 | |
44 | Biblioteka libxml2 umożliwia manipulowanie zawartością plików XML. | |
45 | ||
46 | %description -l pt_BR.UTF-8 | |
47 | Esta biblioteca permite a manipulação de arquivos XML. | |
48 | ||
49 | %package devel | |
50 | Summary: Header files etc to develop libxml2 applications | |
51 | Summary(es.UTF-8): Biblioteca y archivos de inclusión para desarrollo de aplicaciones libXML | |
52 | Summary(pl.UTF-8): Pliki nagłówkowe i inne do libxml2 | |
53 | Summary(pt_BR.UTF-8): Bibliotecas e arquivos de inclusão para desenvolvimento de aplicações que usem a biblioteca libxml | |
54 | Group: Development/Libraries | |
55 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
56 | Requires: zlib-devel | |
57 | ||
58 | %description devel | |
59 | Header files etc you can use to develop libxml2 applications. | |
60 | ||
61 | %description devel -l es.UTF-8 | |
62 | Biblioteca y archivos de inclusión para desarrollo de aplicaciones | |
63 | libXML. | |
64 | ||
65 | %description devel -l pl.UTF-8 | |
66 | Pakiet ten zawiera pliki nagłówkowe i inne do libxml2 niezbędne przy | |
67 | tworzeniu aplikacji opartych o tę bibliotekę. | |
68 | ||
69 | %description devel -l pt_BR.UTF-8 | |
70 | Bibliotecas e arquivos de inclusão para desenvolvimento de aplicações | |
71 | que usem a biblioteca libxml. | |
72 | ||
73 | %package static | |
74 | Summary: Static libxml2 libraries | |
75 | Summary(es.UTF-8): Static libraries to develop libxml applications | |
76 | Summary(pl.UTF-8): Biblioteka statyczna libxml2 | |
77 | Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento de aplicações que usem a biblioteca libxml | |
78 | Group: Development/Libraries | |
79 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
80 | ||
81 | %description static | |
82 | Static libxml2 libraries. | |
83 | ||
84 | %description static -l es.UTF-8 | |
85 | Static libraries, you can use to develop libxml applications. | |
86 | ||
87 | %description static -l pl.UTF-8 | |
88 | Biblioteka statyczna libxml2. | |
89 | ||
90 | %description static -l pt_BR.UTF-8 | |
91 | Bibliotecas estáticas para desenvolvimento de aplicações que usem a | |
92 | biblioteca libxml. | |
93 | ||
94 | %package apidocs | |
95 | Summary: libxml2 API documentation | |
96 | Summary(pl.UTF-8): Dokumentacja API libxml2 | |
97 | Group: Documentation | |
98 | Requires: gtk-doc-common | |
99 | ||
100 | %description apidocs | |
101 | libxml2 API documentation. | |
102 | ||
103 | %description apidocs -l pl.UTF-8 | |
104 | Dokumentacja API libxml2. | |
105 | ||
106 | %package progs | |
107 | Summary: XML files parser | |
108 | Summary(pl.UTF-8): Analizator składniowy plików XML | |
109 | Group: Applications/Text | |
110 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
111 | ||
112 | %description progs | |
113 | XML files parser. | |
114 | ||
115 | %description progs -l pl.UTF-8 | |
116 | Analizator składniowy plików XML. | |
117 | ||
118 | %package -n python-%{name} | |
119 | Summary: Python support for libxml2 | |
120 | Summary(pl.UTF-8): Moduły języka Python dla biblioteki libxml2 | |
121 | Group: Libraries/Python | |
122 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
123 | %pyrequires_eq python-libs | |
124 | Obsoletes: libxml2-python | |
125 | ||
126 | %description -n python-%{name} | |
127 | Python support for libxml2. | |
128 | ||
129 | %description -n python-%{name} -l pl.UTF-8 | |
130 | Moduły języka Python dla biblioteki libxml2. | |
131 | ||
132 | %prep | |
133 | %setup -q | |
134 | %patch0 -p1 | |
135 | %patch1 -p1 | |
136 | %patch2 -p1 | |
137 | ||
138 | %build | |
139 | %{__libtoolize} | |
140 | %{__aclocal} | |
141 | %{__autoconf} | |
142 | %{__autoheader} | |
143 | %{__automake} | |
144 | %configure \ | |
145 | %{!?with_static_libs:--enable-static=no} \ | |
146 | %{!?with_python:--without-python} | |
147 | ||
148 | %{__make} | |
149 | ||
150 | %install | |
151 | rm -rf $RPM_BUILD_ROOT | |
152 | ||
153 | %{__make} install \ | |
154 | DESTDIR=$RPM_BUILD_ROOT \ | |
155 | DEVHELP_DIR=%{_gtkdocdir}/libxml2 \ | |
156 | m4datadir=%{_aclocaldir} \ | |
157 | pkgconfigdir=%{_pkgconfigdir} | |
158 | ||
159 | # move examples to proper dir | |
160 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-devel-%{version} \ | |
161 | $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version} | |
162 | mv $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/examples/* \ | |
163 | $RPM_BUILD_ROOT%{_examplesdir}/%{name}-devel-%{version} | |
164 | %if %{with python} | |
165 | mv -f $RPM_BUILD_ROOT%{_docdir}/%{name}-python-%{version}/examples/* \ | |
166 | $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version} | |
167 | %endif | |
168 | ||
169 | # move html doc to -devel package | |
170 | install -d $RPM_BUILD_ROOT%{_docdir}/%{name}-devel-%{version} | |
171 | mv -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html \ | |
172 | $RPM_BUILD_ROOT%{_docdir}/%{name}-devel-%{version} | |
173 | rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
174 | ||
175 | # install catalog file | |
176 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/xml | |
177 | LD_LIBRARY_PATH=.libs ./xmlcatalog --create \ | |
178 | > $RPM_BUILD_ROOT%{_sysconfdir}/xml/catalog | |
179 | ||
180 | %if %{with python} | |
181 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
182 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
183 | %py_postclean | |
184 | rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a} | |
185 | %endif | |
186 | ||
187 | %clean | |
188 | rm -rf $RPM_BUILD_ROOT | |
189 | ||
190 | %post -p /sbin/ldconfig | |
191 | %postun -p /sbin/ldconfig | |
192 | ||
193 | %files | |
194 | %defattr(644,root,root,755) | |
195 | %doc AUTHORS ChangeLog Copyright NEWS README TODO | |
196 | %attr(755,root,root) %{_libdir}/libxml2.so.*.*.* | |
197 | %attr(755,root,root) %ghost %{_libdir}/libxml2.so.2 | |
198 | %{_mandir}/man3/libxml.3* | |
199 | ||
200 | %dir %{_sysconfdir}/xml | |
201 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xml/catalog | |
202 | ||
203 | %files devel | |
204 | %defattr(644,root,root,755) | |
205 | %doc %{_docdir}/%{name}-devel-%{version} | |
206 | %attr(755,root,root) %{_bindir}/xml2-config | |
207 | %attr(755,root,root) %{_libdir}/libxml2.so | |
208 | %{_libdir}/libxml2.la | |
209 | %{_pkgconfigdir}/libxml-2.0.pc | |
210 | %{_aclocaldir}/libxml.m4 | |
211 | %{_includedir}/libxml2 | |
212 | %{_mandir}/man1/xml2-config.1* | |
213 | %{_examplesdir}/%{name}-devel-%{version} | |
214 | ||
215 | %if %{with static_libs} | |
216 | %files static | |
217 | %defattr(644,root,root,755) | |
218 | %{_libdir}/libxml2.a | |
219 | %endif | |
220 | ||
221 | %files apidocs | |
222 | %defattr(644,root,root,755) | |
223 | %{_gtkdocdir}/libxml2 | |
224 | ||
225 | %files progs | |
226 | %defattr(644,root,root,755) | |
227 | %attr(755,root,root) %{_bindir}/xmlcatalog | |
228 | %attr(755,root,root) %{_bindir}/xmllint | |
229 | %{_mandir}/man1/xmlcatalog.1* | |
230 | %{_mandir}/man1/xmllint.1* | |
231 | ||
232 | %if %{with python} | |
233 | %files -n python-%{name} | |
234 | %defattr(644,root,root,755) | |
235 | %attr(755,root,root) %{py_sitedir}/libxml2mod.so | |
236 | %{py_sitedir}/drv_libxml2.py[co] | |
237 | %{py_sitedir}/libxml2.py[co] | |
238 | %{_examplesdir}/python-%{name}-%{version} | |
239 | %endif |