]>
Commit | Line | Data |
---|---|---|
1c9e6eac | 1 | # |
2 | # Conditional build: | |
8080a552 JB |
3 | %bcond_without python2 # CPython 2.x module |
4 | %bcond_without python3 # CPython 3.x module | |
63b1c45e JB |
5 | %bcond_without static_libs # static library |
6 | %bcond_with tests # test suite | |
1ca1a314 | 7 | |
fe3ba6ae | 8 | %define libxml2ver 1:2.6.30 |
0d8535a8 | 9 | Summary: XSLT processor |
5f7e6efe ER |
10 | Summary(pl.UTF-8): Procesor XSLT |
11 | Summary(pt_BR.UTF-8): Biblioteca que disponibiliza o sistema XSLT do GNOME | |
0d8535a8 | 12 | Name: libxslt |
63b1c45e | 13 | Version: 1.1.36 |
4ace151c | 14 | Release: 1 |
dfbaf47b | 15 | License: MIT |
0d8535a8 | 16 | Group: Libraries |
b6b0ca3c JB |
17 | #Source0: ftp://xmlsoft.org/libxml2/%{name}-%{version}.tar.gz |
18 | Source0: https://download.gnome.org/sources/libxslt/1.1/%{name}-%{version}.tar.xz | |
63b1c45e | 19 | # Source0-md5: ecf54ae636780d7983dd664b852e3212 |
649a7cea | 20 | Patch0: %{name}-m4.patch |
fe3ba6ae | 21 | Patch1: LFS.patch |
50b265f2 | 22 | Patch2: %{name}-libs-no-libdir.patch |
0d8535a8 | 23 | URL: http://xmlsoft.org/XSLT/ |
b6b0ca3c | 24 | BuildRequires: autoconf >= 2.63 |
63b1c45e | 25 | BuildRequires: automake >= 1:1.15 |
a1aabd03 | 26 | BuildRequires: libgcrypt-devel >= 1.1.42 |
e71b806a | 27 | BuildRequires: libtool >= 2:2.0 |
5aeba9ad | 28 | BuildRequires: libxml2-devel >= %{libxml2ver} |
4f667b86 | 29 | BuildRequires: perl-base |
63b1c45e | 30 | BuildRequires: pkgconfig |
8080a552 JB |
31 | %if %{with python2} |
32 | BuildRequires: python >= 2 | |
33 | BuildRequires: python-devel >= 2 | |
7d58a684 | 34 | BuildRequires: python-libxml2 >= %{libxml2ver} |
08e2840e | 35 | %endif |
8080a552 JB |
36 | %if %{with python3} |
37 | BuildRequires: python3 >= 1:3.2 | |
38 | BuildRequires: python3-devel >= 1:3.2 | |
39 | BuildRequires: python3-libxml2 >= %{libxml2ver} | |
40 | %endif | |
b6b0ca3c | 41 | BuildRequires: rpm-build >= 4.6 |
81c0133f | 42 | BuildRequires: rpm-pythonprov |
b6b0ca3c JB |
43 | BuildRequires: sed >= 4.0 |
44 | BuildRequires: tar >= 1:1.22 | |
45 | BuildRequires: xz | |
c11bd774 | 46 | Requires: libgcrypt >= 1.1.42 |
58df738f | 47 | Requires: libxml2 >= %{libxml2ver} |
b915281a | 48 | Obsoletes: libxslt1 |
58df738f | 49 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
0d8535a8 | 50 | |
51 | %description | |
52 | Library for XSLT processing. | |
53 | ||
bda66cb1 | 54 | %description -l pl.UTF-8 |
f84ebd65 TP |
55 | Biblioteka do przetwarzania XSLT. |
56 | ||
bda66cb1 JR |
57 | %description -l pt_BR.UTF-8 |
58 | Esta biblioteca C permite a transformação de arquivos XML em outros | |
59 | arquivos XML (ou HTML, texto, ...) usando o mecanismo padrão de | |
60 | transformação dos estilos XSLT. O comando xsltproc é uma interface em | |
09de7b65 | 61 | linha de comandos para o mecanismo XSLT. |
62 | ||
0d8535a8 | 63 | %package devel |
7d58a684 | 64 | Summary: Header files for libxslt |
5f7e6efe ER |
65 | Summary(pl.UTF-8): Pliki nagłówkowe libxslt |
66 | Summary(pt_BR.UTF-8): Bibliotecas, includes, etc. para incluir o mecanismo XSLT do GNOME | |
0d8535a8 | 67 | Group: Development/Libraries |
4f667b86 | 68 | Requires: %{name} = %{version}-%{release} |
c11bd774 | 69 | Requires: libgcrypt-devel >= 1.1.42 |
de9c009a | 70 | Requires: libxml2-devel >= %{libxml2ver} |
b915281a | 71 | Obsoletes: libxslt1-devel |
0d8535a8 | 72 | |
73 | %description devel | |
7d58a684 | 74 | Header files for libxslt - XSLT processor. |
0d8535a8 | 75 | |
bda66cb1 JR |
76 | %description devel -l pl.UTF-8 |
77 | Pliki nagłówkowe procesora XSLT. | |
f84ebd65 | 78 | |
bda66cb1 JR |
79 | %description devel -l pt_BR.UTF-8 |
80 | Esta biblioteca C permite a transformação de arquivos XML em outros | |
81 | arquivos XML (ou HTML, texto, ...) usando o mecanismo padrão de | |
82 | transformação dos estilos XSLT. | |
09de7b65 | 83 | |
0d8535a8 | 84 | %package static |
85 | Summary: Static libraries of libxslt | |
5f7e6efe ER |
86 | Summary(pl.UTF-8): Biblioteki statyczne libxslt |
87 | Summary(pt_BR.UTF-8): Bibliotecas estáticas para incluir o mecanismo XSLT do GNOME | |
0d8535a8 | 88 | Group: Development/Libraries |
4f667b86 | 89 | Requires: %{name}-devel = %{version}-%{release} |
0d8535a8 | 90 | |
91 | %description static | |
92 | Static libraries of libxslt - XSLT processor. | |
93 | ||
bda66cb1 | 94 | %description static -l pl.UTF-8 |
f84ebd65 TP |
95 | Statyczne biblioteki procesora XSLT. |
96 | ||
bda66cb1 JR |
97 | %description static -l pt_BR.UTF-8 |
98 | Esta biblioteca C permite a transformação de arquivos XML em outros | |
99 | arquivos XML (ou HTML, texto, ...) usando o mecanismo padrão de | |
100 | transformação dos estilos XSLT. Estas são as bibliotecas em sua versão | |
101 | estática. | |
09de7b65 | 102 | |
b6b0ca3c JB |
103 | %package apidocs |
104 | Summary: API documentation for libxslt library | |
105 | Summary(pl.UTF-8): Dokumentacja API bibliotei libxslt | |
106 | Group: Documentation | |
107 | BuildArch: noarch | |
108 | ||
109 | %description apidocs | |
110 | API documentation for libxslt library. | |
111 | ||
112 | %description apidocs -l pl.UTF-8 | |
113 | Dokumentacja API bibliotei libxslt. | |
114 | ||
f5a760dc | 115 | %package progs |
116 | Summary: XSLT processor | |
5f7e6efe | 117 | Summary(pl.UTF-8): Procesor XSLT |
f5a760dc | 118 | Group: Applications/Text |
4f667b86 | 119 | Requires: %{name} = %{version}-%{release} |
b915281a | 120 | Obsoletes: libxslt-proc |
f5a760dc | 121 | |
122 | %description progs | |
123 | XSLT processor. | |
124 | ||
bda66cb1 | 125 | %description progs -l pl.UTF-8 |
f16a6fcc | 126 | Procesor XSLT. |
f5a760dc | 127 | |
dfbaf47b | 128 | %package -n python-%{name} |
8080a552 JB |
129 | Summary: Python 2 support for libxslt |
130 | Summary(pl.UTF-8): Moduły języka Python 2 dla biblioteki libxslt | |
a66c8da6 | 131 | Group: Libraries/Python |
de9c009a | 132 | Requires: %{name} = %{version}-%{release} |
8080a552 JB |
133 | Requires: python-libxml2 >= %{libxml2ver} |
134 | Requires: python-modules | |
135 | Obsoletes: libxslt-python < 1.1 | |
dfbaf47b | 136 | |
137 | %description -n python-%{name} | |
8080a552 | 138 | Python 2 support for libxslt. |
dfbaf47b | 139 | |
bda66cb1 | 140 | %description -n python-%{name} -l pl.UTF-8 |
8080a552 JB |
141 | Moduły języka Python 2 dla biblioteki libxslt. |
142 | ||
143 | %package -n python3-%{name} | |
144 | Summary: Python 3 support for libxslt | |
145 | Summary(pl.UTF-8): Moduły języka Python 3 dla biblioteki libxslt | |
146 | Group: Libraries/Python | |
147 | Requires: %{name} = %{version}-%{release} | |
148 | Requires: python3-libxml2 >= %{libxml2ver} | |
149 | Requires: python3-modules >= 1:3.2 | |
150 | ||
151 | %description -n python3-%{name} | |
152 | Python 3 support for libxslt. | |
153 | ||
154 | %description -n python3-%{name} -l pl.UTF-8 | |
155 | Moduły języka Python 3 dla biblioteki libxslt. | |
dfbaf47b | 156 | |
0d8535a8 | 157 | %prep |
f84ebd65 | 158 | %setup -q |
f587bf3b | 159 | %patch0 -p0 |
fe3ba6ae | 160 | %patch1 -p1 |
50b265f2 | 161 | %patch2 -p1 |
0d8535a8 | 162 | |
b6b0ca3c JB |
163 | %{__sed} -i -e 's,\$(datadir)/gtk-doc/html,%{_gtkdocdir},' \ |
164 | doc/devhelp/Makefile.am doc/EXSLT/devhelp/Makefile.am | |
165 | ||
0d8535a8 | 166 | %build |
9f4d1f9a | 167 | %{__libtoolize} |
97154326 | 168 | %{__aclocal} |
da9ca2d4 | 169 | %{__autoconf} |
9c91c445 | 170 | %{__autoheader} |
da9ca2d4 | 171 | %{__automake} |
8080a552 JB |
172 | |
173 | %if %{with python3} | |
174 | install -d build-python3 | |
175 | cd build-python3 | |
176 | ../%configure \ | |
177 | PYTHON=%{__python3} \ | |
178 | ac_cv_header_xlocale_h=no \ | |
179 | --disable-silent-rules \ | |
180 | --disable-static \ | |
181 | --with-html-subdir=libxslt \ | |
182 | --with-plugins | |
183 | ||
184 | %{__make} | |
185 | cd .. | |
186 | %endif | |
187 | ||
188 | install -d build | |
189 | cd build | |
190 | ../%configure \ | |
60691b87 | 191 | ac_cv_header_xlocale_h=no \ |
e71b806a | 192 | --disable-silent-rules \ |
63b1c45e | 193 | %{?with_static_libs:--enable-static} \ |
b6b0ca3c | 194 | --with-html-subdir=libxslt \ |
e71b806a | 195 | --with-plugins \ |
8080a552 | 196 | %{!?with_python2:--without-python} |
0d8535a8 | 197 | %{__make} |
198 | ||
c5776f51 | 199 | %{?with_tests:%{__make} -C tests test} |
200 | ||
0d8535a8 | 201 | %install |
202 | rm -rf $RPM_BUILD_ROOT | |
203 | ||
8080a552 JB |
204 | %if %{with python3} |
205 | %{__make} -C build-python3 install \ | |
206 | DESTDIR=$RPM_BUILD_ROOT \ | |
207 | exampledir=%{_examplesdir}/python3-%{name}-%{version} | |
208 | ||
209 | %py3_comp $RPM_BUILD_ROOT%{py3_sitescriptdir} | |
210 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitescriptdir} | |
211 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/*.la | |
212 | %endif | |
213 | ||
214 | %{__make} -C build install \ | |
215 | DESTDIR=$RPM_BUILD_ROOT \ | |
216 | exampledir=%{_examplesdir}/python-%{name}-%{version} | |
0d8535a8 | 217 | |
b6b0ca3c JB |
218 | # junk (files to configure libxslt itself, not cmake export files) |
219 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/cmake/libxslt/{FindGcrypt,libxslt-config}.cmake | |
220 | ||
8080a552 | 221 | %if %{with python2} |
63b1c45e | 222 | %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir} |
8080a552 | 223 | %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir} |
63b1c45e JB |
224 | %py_postclean |
225 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.la | |
f774a22f JP |
226 | %if %{with static_libs} |
227 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.a | |
228 | %endif | |
08e2840e | 229 | %endif |
54e6d0bd | 230 | |
0d8535a8 | 231 | %clean |
232 | rm -rf $RPM_BUILD_ROOT | |
233 | ||
239b1b34 | 234 | %post -p /sbin/ldconfig |
0d8535a8 | 235 | %postun -p /sbin/ldconfig |
236 | ||
237 | %files | |
238 | %defattr(644,root,root,755) | |
63b1c45e | 239 | %doc AUTHORS Copyright FEATURES NEWS README TODO |
bddd2ac4 | 240 | %attr(755,root,root) %{_libdir}/libexslt.so.*.*.* |
4e66a7a2 | 241 | %attr(755,root,root) %ghost %{_libdir}/libexslt.so.0 |
bddd2ac4 | 242 | %attr(755,root,root) %{_libdir}/libxslt.so.*.*.* |
4e66a7a2 | 243 | %attr(755,root,root) %ghost %{_libdir}/libxslt.so.1 |
fa5951b5 | 244 | %dir %{_libdir}/libxslt-plugins |
0d8535a8 | 245 | |
246 | %files devel | |
247 | %defattr(644,root,root,755) | |
248 | %attr(755,root,root) %{_bindir}/xslt-config | |
bddd2ac4 JB |
249 | %attr(755,root,root) %{_libdir}/libexslt.so |
250 | %attr(755,root,root) %{_libdir}/libxslt.so | |
251 | %{_libdir}/libexslt.la | |
252 | %{_libdir}/libxslt.la | |
253 | %attr(755,root,root) %{_libdir}/xsltConf.sh | |
53b8f4b5 | 254 | %{_includedir}/libexslt |
bddd2ac4 | 255 | %{_includedir}/libxslt |
bddd2ac4 JB |
256 | %{_pkgconfigdir}/libexslt.pc |
257 | %{_pkgconfigdir}/libxslt.pc | |
258 | %{_aclocaldir}/libxslt.m4 | |
649a7cea JB |
259 | %{_mandir}/man3/libexslt.3* |
260 | %{_mandir}/man3/libxslt.3* | |
0d8535a8 | 261 | |
1c9e6eac | 262 | %if %{with static_libs} |
0d8535a8 | 263 | %files static |
264 | %defattr(644,root,root,755) | |
bddd2ac4 JB |
265 | %{_libdir}/libexslt.a |
266 | %{_libdir}/libxslt.a | |
1c9e6eac | 267 | %endif |
f5a760dc | 268 | |
b6b0ca3c JB |
269 | %files apidocs |
270 | %defattr(644,root,root,755) | |
271 | %{_docdir}/libxslt | |
272 | %{_gtkdocdir}/libexslt | |
273 | %{_gtkdocdir}/libxslt | |
274 | ||
f5a760dc | 275 | %files progs |
276 | %defattr(644,root,root,755) | |
277 | %attr(755,root,root) %{_bindir}/xsltproc | |
bddd2ac4 | 278 | %{_mandir}/man1/xsltproc.1* |
dfbaf47b | 279 | |
8080a552 | 280 | %if %{with python2} |
dfbaf47b | 281 | %files -n python-%{name} |
282 | %defattr(644,root,root,755) | |
bddd2ac4 | 283 | %attr(755,root,root) %{py_sitedir}/libxsltmod.so |
63b1c45e | 284 | %{py_sitescriptdir}/libxslt.py[co] |
6bae0b83 | 285 | %{_examplesdir}/python-%{name}-%{version} |
08e2840e | 286 | %endif |
8080a552 JB |
287 | |
288 | %if %{with python3} | |
289 | %files -n python3-%{name} | |
290 | %defattr(644,root,root,755) | |
291 | %attr(755,root,root) %{py3_sitedir}/libxsltmod.so | |
292 | %{py3_sitescriptdir}/libxslt.py | |
293 | %{py3_sitescriptdir}/__pycache__/libxslt.cpython-*.py[co] | |
294 | %{_examplesdir}/python3-%{name}-%{version} | |
295 | %endif |