1 |
%define xml_version_required 2.6.27 |
2 |
%define major 1 |
3 |
%define libname %mklibname xslt %{major} |
4 |
%define develname %mklibname xslt -d |
5 |
|
6 |
Name: libxslt |
7 |
Version: 1.1.26 |
8 |
Release: %mkrel 5 |
9 |
Summary: Library providing XSLT support |
10 |
License: MIT |
11 |
Group: System/Libraries |
12 |
URL: http://xmlsoft.org/XSLT/ |
13 |
Source0: ftp://xmlsoft.org/libxslt/libxslt-%{version}.tar.gz |
14 |
# fix python linking |
15 |
Patch1: libxslt-1.1.25-fix-python-linking.patch |
16 |
Patch2: libxslt-1.1.26-CVE-2011-3970.diff |
17 |
Requires: libxml2 >= %{xml_version_required} |
18 |
BuildRequires: libxml2-devel >= %{xml_version_required} |
19 |
BuildRequires: python-devel >= %{pyver} |
20 |
BuildRequires: python-libxml2 >= %{xml_version_required} |
21 |
BuildRequires: libgcrypt-devel |
22 |
BuildRequires: multiarch-utils >= 1.0.3 |
23 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
24 |
|
25 |
%description |
26 |
This C library allows to transform XML files into other XML files |
27 |
(or HTML, text, ...) using the standard XSLT stylesheet transformation |
28 |
mechanism. |
29 |
|
30 |
%package -n xsltproc |
31 |
Summary: XSLT processor using libxslt |
32 |
Group: System/Libraries |
33 |
Obsoletes: libxslt-proc < %{version}-8 |
34 |
Provides: libxslt-proc = %{version}-%{release} |
35 |
|
36 |
%description -n xsltproc |
37 |
This package provides an XSLT processor based on the libxslt C library. |
38 |
It allows to transform XML files into other XML files |
39 |
(or HTML, text, ...) using the standard XSLT stylesheet transformation |
40 |
mechanism. |
41 |
|
42 |
%package -n %{libname} |
43 |
Summary: Library providing XSLT support |
44 |
Group: System/Libraries |
45 |
|
46 |
%description -n %{libname} |
47 |
This C library allows to transform XML files into other XML files |
48 |
(or HTML, text, ...) using the standard XSLT stylesheet transformation |
49 |
mechanism. |
50 |
A xslt processor based on this library, named xsltproc, is provided by |
51 |
the libxslt-proc package. |
52 |
|
53 |
%package -n python-%{name} |
54 |
Summary: Python bindings for the libxslt library |
55 |
Group: Development/Python |
56 |
Obsoletes: %{name}-python < %{version}-%{release} |
57 |
Requires: %{libname} = %{version}-%{release} |
58 |
Requires: python >= %{pyver} |
59 |
Requires: python-libxml2 >= %{xml_version_required} |
60 |
|
61 |
%description -n python-%{name} |
62 |
The libxslt-python package contains a module that permits applications |
63 |
written in the Python programming language to use the interface |
64 |
supplied by the libxslt library to apply XSLT transformations. |
65 |
|
66 |
This library allows to parse sytlesheets, uses the libxml2-python |
67 |
to load and save XML and HTML files. Direct access to XPath and |
68 |
the XSLT transformation context are possible to extend the XSLT language |
69 |
with XPath functions written in Python. |
70 |
|
71 |
%package -n %{develname} |
72 |
Summary: Libraries, includes, etc. to develop XML and HTML applications |
73 |
Group: Development/C |
74 |
Provides: %{name}-devel = %{version}-%{release} |
75 |
Requires: %{libname} = %{version}-%{release} |
76 |
Requires: libxml2-devel >= %{xml_version_required} |
77 |
Obsoletes: %{mklibname xslt 1 -d} < %{version}-%{release} |
78 |
|
79 |
%description -n %{develname} |
80 |
This C library allows to transform XML files into other XML files |
81 |
(or HTML, text, ...) using the standard XSLT stylesheet transformation |
82 |
mechanism. |
83 |
|
84 |
%prep |
85 |
%setup -q |
86 |
%patch1 -p1 -b .fix-python-linking |
87 |
%patch2 -p0 -b .CVE-2011-3970 |
88 |
|
89 |
%{__mkdir_p} python/examples |
90 |
%{__cp} -a python/tests/*.{py,xml,xsl} python/examples |
91 |
|
92 |
#needed by patch1 |
93 |
autoreconf -fi |
94 |
|
95 |
%build |
96 |
%configure2_5x |
97 |
%make |
98 |
|
99 |
%install |
100 |
%{__rm} -rf %{buildroot} |
101 |
%makeinstall_std |
102 |
|
103 |
# remove unpackaged files |
104 |
%{__rm} -rf %{buildroot}%{_docdir}/%{name}-%{version} %{buildroot}%{_docdir}/%{name}-python-%{version} \ |
105 |
%{buildroot}%{py_platsitedir}/*.{la,a} |
106 |
|
107 |
%multiarch_binaries %{buildroot}%{_bindir}/xslt-config |
108 |
|
109 |
%clean |
110 |
%{__rm} -rf %{buildroot} |
111 |
|
112 |
%files -n xsltproc |
113 |
%defattr(-, root, root) |
114 |
%{_bindir}/xsltproc |
115 |
%{_mandir}/man1/* |
116 |
|
117 |
%files -n %{libname} |
118 |
%defattr(-, root, root) |
119 |
%doc AUTHORS NEWS README Copyright FEATURES TODO |
120 |
%{_libdir}/lib*.so.* |
121 |
|
122 |
%files -n python-%{name} |
123 |
%defattr(0644,root, root,0755) |
124 |
%doc AUTHORS README Copyright FEATURES python/TODO python/examples python/libxsltclass.txt |
125 |
%defattr(-, root, root) |
126 |
%{py_platsitedir}/*.so |
127 |
%{py_platsitedir}/*.py |
128 |
|
129 |
%files -n %{develname} |
130 |
%defattr(-, root, root) |
131 |
%doc doc/*.html doc/tutorial doc/html |
132 |
%{_mandir}/man3/* |
133 |
%{_libdir}/lib*.so |
134 |
%{_libdir}/*a |
135 |
%{_libdir}/*.sh |
136 |
%{_includedir}/* |
137 |
%multiarch %{multiarch_bindir}/xslt-config |
138 |
%{_bindir}/xslt-config |
139 |
%{_libdir}/pkgconfig/* |
140 |
%{_datadir}/aclocal/* |
141 |
|
142 |
|