]> git.pld-linux.org Git - packages/libxslt.git/blob - libxslt.spec
- build also python3 module
[packages/libxslt.git] / libxslt.spec
1 #
2 # Conditional build:
3 %bcond_without  python2         # CPython 2.x module
4 %bcond_without  python3         # CPython 3.x module
5 %bcond_without  static_libs     # static library
6 %bcond_with     tests           # test suite
7
8 %define         libxml2ver      1:2.6.30
9 Summary:        XSLT processor
10 Summary(pl.UTF-8):      Procesor XSLT
11 Summary(pt_BR.UTF-8):   Biblioteca que disponibiliza o sistema XSLT do GNOME
12 Name:           libxslt
13 Version:        1.1.36
14 Release:        1
15 License:        MIT
16 Group:          Libraries
17 #Source0:       ftp://xmlsoft.org/libxml2/%{name}-%{version}.tar.gz
18 Source0:        https://download.gnome.org/sources/libxslt/1.1/%{name}-%{version}.tar.xz
19 # Source0-md5:  ecf54ae636780d7983dd664b852e3212
20 Patch0:         %{name}-m4.patch
21 Patch1:         LFS.patch
22 Patch2:         %{name}-libs-no-libdir.patch
23 URL:            http://xmlsoft.org/XSLT/
24 BuildRequires:  autoconf >= 2.63
25 BuildRequires:  automake >= 1:1.15
26 BuildRequires:  libgcrypt-devel >= 1.1.42
27 BuildRequires:  libtool >= 2:2.0
28 BuildRequires:  libxml2-devel >= %{libxml2ver}
29 BuildRequires:  perl-base
30 BuildRequires:  pkgconfig
31 %if %{with python2}
32 BuildRequires:  python >= 2
33 BuildRequires:  python-devel >= 2
34 BuildRequires:  python-libxml2 >= %{libxml2ver}
35 %endif
36 %if %{with python3}
37 BuildRequires:  python3 >= 1:3.2
38 BuildRequires:  python3-devel >= 1:3.2
39 BuildRequires:  python3-libxml2 >= %{libxml2ver}
40 %endif
41 BuildRequires:  rpm-build >= 4.6
42 BuildRequires:  rpm-pythonprov
43 BuildRequires:  sed >= 4.0
44 BuildRequires:  tar >= 1:1.22
45 BuildRequires:  xz
46 Requires:       libgcrypt >= 1.1.42
47 Requires:       libxml2 >= %{libxml2ver}
48 Obsoletes:      libxslt1
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %description
52 Library for XSLT processing.
53
54 %description -l pl.UTF-8
55 Biblioteka do przetwarzania XSLT.
56
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
61 linha de comandos para o mecanismo XSLT.
62
63 %package devel
64 Summary:        Header files for libxslt
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
67 Group:          Development/Libraries
68 Requires:       %{name} = %{version}-%{release}
69 Requires:       libgcrypt-devel >= 1.1.42
70 Requires:       libxml2-devel >= %{libxml2ver}
71 Obsoletes:      libxslt1-devel
72
73 %description devel
74 Header files for libxslt - XSLT processor.
75
76 %description devel -l pl.UTF-8
77 Pliki nagłówkowe procesora XSLT.
78
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.
83
84 %package static
85 Summary:        Static libraries of libxslt
86 Summary(pl.UTF-8):      Biblioteki statyczne libxslt
87 Summary(pt_BR.UTF-8):   Bibliotecas estáticas para incluir o mecanismo XSLT do GNOME
88 Group:          Development/Libraries
89 Requires:       %{name}-devel = %{version}-%{release}
90
91 %description static
92 Static libraries of libxslt - XSLT processor.
93
94 %description static -l pl.UTF-8
95 Statyczne biblioteki procesora XSLT.
96
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.
102
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
115 %package progs
116 Summary:        XSLT processor
117 Summary(pl.UTF-8):      Procesor XSLT
118 Group:          Applications/Text
119 Requires:       %{name} = %{version}-%{release}
120 Obsoletes:      libxslt-proc
121
122 %description progs
123 XSLT processor.
124
125 %description progs -l pl.UTF-8
126 Procesor XSLT.
127
128 %package -n python-%{name}
129 Summary:        Python 2 support for libxslt
130 Summary(pl.UTF-8):      Moduły języka Python 2 dla biblioteki libxslt
131 Group:          Libraries/Python
132 Requires:       %{name} = %{version}-%{release}
133 Requires:       python-libxml2 >= %{libxml2ver}
134 Requires:       python-modules
135 Obsoletes:      libxslt-python < 1.1
136
137 %description -n python-%{name}
138 Python 2 support for libxslt.
139
140 %description -n python-%{name} -l pl.UTF-8
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.
156
157 %prep
158 %setup -q
159 %patch0 -p0
160 %patch1 -p1
161 %patch2 -p1
162
163 %{__sed} -i -e 's,\$(datadir)/gtk-doc/html,%{_gtkdocdir},' \
164         doc/devhelp/Makefile.am doc/EXSLT/devhelp/Makefile.am
165
166 %build
167 %{__libtoolize}
168 %{__aclocal}
169 %{__autoconf}
170 %{__autoheader}
171 %{__automake}
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 \
191         ac_cv_header_xlocale_h=no \
192         --disable-silent-rules \
193         %{?with_static_libs:--enable-static} \
194         --with-html-subdir=libxslt \
195         --with-plugins \
196         %{!?with_python2:--without-python}
197 %{__make}
198
199 %{?with_tests:%{__make} -C tests test}
200
201 %install
202 rm -rf $RPM_BUILD_ROOT
203
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}
217
218 # junk (files to configure libxslt itself, not cmake export files)
219 %{__rm} $RPM_BUILD_ROOT%{_libdir}/cmake/libxslt/{FindGcrypt,libxslt-config}.cmake
220
221 %if %{with python2}
222 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
223 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
224 %py_postclean
225 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.la
226 %if %{with static_libs}
227 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.a
228 %endif
229 %endif
230
231 %clean
232 rm -rf $RPM_BUILD_ROOT
233
234 %post   -p /sbin/ldconfig
235 %postun -p /sbin/ldconfig
236
237 %files
238 %defattr(644,root,root,755)
239 %doc AUTHORS Copyright FEATURES NEWS README TODO
240 %attr(755,root,root) %{_libdir}/libexslt.so.*.*.*
241 %attr(755,root,root) %ghost %{_libdir}/libexslt.so.0
242 %attr(755,root,root) %{_libdir}/libxslt.so.*.*.*
243 %attr(755,root,root) %ghost %{_libdir}/libxslt.so.1
244 %dir %{_libdir}/libxslt-plugins
245
246 %files devel
247 %defattr(644,root,root,755)
248 %attr(755,root,root) %{_bindir}/xslt-config
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
254 %{_includedir}/libexslt
255 %{_includedir}/libxslt
256 %{_pkgconfigdir}/libexslt.pc
257 %{_pkgconfigdir}/libxslt.pc
258 %{_aclocaldir}/libxslt.m4
259 %{_mandir}/man3/libexslt.3*
260 %{_mandir}/man3/libxslt.3*
261
262 %if %{with static_libs}
263 %files static
264 %defattr(644,root,root,755)
265 %{_libdir}/libexslt.a
266 %{_libdir}/libxslt.a
267 %endif
268
269 %files apidocs
270 %defattr(644,root,root,755)
271 %{_docdir}/libxslt
272 %{_gtkdocdir}/libexslt
273 %{_gtkdocdir}/libxslt
274
275 %files progs
276 %defattr(644,root,root,755)
277 %attr(755,root,root) %{_bindir}/xsltproc
278 %{_mandir}/man1/xsltproc.1*
279
280 %if %{with python2}
281 %files -n python-%{name}
282 %defattr(644,root,root,755)
283 %attr(755,root,root) %{py_sitedir}/libxsltmod.so
284 %{py_sitescriptdir}/libxslt.py[co]
285 %{_examplesdir}/python-%{name}-%{version}
286 %endif
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
This page took 0.126943 seconds and 3 git commands to generate.