]> git.pld-linux.org Git - packages/libxslt.git/blob - libxslt.spec
fix build without static libs
[packages/libxslt.git] / libxslt.spec
1 #
2 # Conditional build:
3 %bcond_without  python          # don't build python binding
4 %bcond_without  static_libs     # don't build static library
5 %bcond_with     tests           # run test suite
6
7 %define         libxml2ver      1:2.6.30
8 Summary:        XSLT processor
9 Summary(pl.UTF-8):      Procesor XSLT
10 Summary(pt_BR.UTF-8):   Biblioteca que disponibiliza o sistema XSLT do GNOME
11 Name:           libxslt
12 Version:        1.1.34
13 Release:        1
14 License:        MIT
15 Group:          Libraries
16 Source0:        ftp://xmlsoft.org/libxml2/%{name}-%{version}.tar.gz
17 # Source0-md5:  db8765c8d076f1b6caafd9f2542a304a
18 Patch0:         %{name}-m4.patch
19 Patch1:         LFS.patch
20 Patch2:         %{name}-libs-no-libdir.patch
21 URL:            http://xmlsoft.org/XSLT/
22 BuildRequires:  autoconf >= 2.59
23 BuildRequires:  automake
24 BuildRequires:  libgcrypt-devel >= 1.1.42
25 BuildRequires:  libtool >= 2:2.0
26 BuildRequires:  libxml2-devel >= %{libxml2ver}
27 BuildRequires:  perl-base
28 %if %{with python}
29 BuildRequires:  python
30 BuildRequires:  python-devel
31 BuildRequires:  python-libxml2 >= %{libxml2ver}
32 %endif
33 BuildRequires:  rpm-pythonprov
34 Requires:       libgcrypt >= 1.1.42
35 Requires:       libxml2 >= %{libxml2ver}
36 Obsoletes:      libxslt1
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 Library for XSLT processing.
41
42 %description -l pl.UTF-8
43 Biblioteka do przetwarzania XSLT.
44
45 %description -l pt_BR.UTF-8
46 Esta biblioteca C permite a transformação de arquivos XML em outros
47 arquivos XML (ou HTML, texto, ...) usando o mecanismo padrão de
48 transformação dos estilos XSLT. O comando xsltproc é uma interface em
49 linha de comandos para o mecanismo XSLT.
50
51 %package devel
52 Summary:        Header files for libxslt
53 Summary(pl.UTF-8):      Pliki nagłówkowe libxslt
54 Summary(pt_BR.UTF-8):   Bibliotecas, includes, etc. para incluir o mecanismo XSLT do GNOME
55 Group:          Development/Libraries
56 Requires:       %{name} = %{version}-%{release}
57 Requires:       libgcrypt-devel >= 1.1.42
58 Requires:       libxml2-devel >= %{libxml2ver}
59 Obsoletes:      libxslt1-devel
60
61 %description devel
62 Header files for libxslt - XSLT processor.
63
64 %description devel -l pl.UTF-8
65 Pliki nagłówkowe procesora XSLT.
66
67 %description devel -l pt_BR.UTF-8
68 Esta biblioteca C permite a transformação de arquivos XML em outros
69 arquivos XML (ou HTML, texto, ...) usando o mecanismo padrão de
70 transformação dos estilos XSLT.
71
72 %package static
73 Summary:        Static libraries of libxslt
74 Summary(pl.UTF-8):      Biblioteki statyczne libxslt
75 Summary(pt_BR.UTF-8):   Bibliotecas estáticas para incluir o mecanismo XSLT do GNOME
76 Group:          Development/Libraries
77 Requires:       %{name}-devel = %{version}-%{release}
78
79 %description static
80 Static libraries of libxslt - XSLT processor.
81
82 %description static -l pl.UTF-8
83 Statyczne biblioteki procesora XSLT.
84
85 %description static -l pt_BR.UTF-8
86 Esta biblioteca C permite a transformação de arquivos XML em outros
87 arquivos XML (ou HTML, texto, ...) usando o mecanismo padrão de
88 transformação dos estilos XSLT. Estas são as bibliotecas em sua versão
89 estática.
90
91 %package progs
92 Summary:        XSLT processor
93 Summary(pl.UTF-8):      Procesor XSLT
94 Group:          Applications/Text
95 Requires:       %{name} = %{version}-%{release}
96 Obsoletes:      libxslt-proc
97
98 %description progs
99 XSLT processor.
100
101 %description progs -l pl.UTF-8
102 Procesor XSLT.
103
104 %package -n python-%{name}
105 Summary:        Python support for libxslt
106 Summary(pl.UTF-8):      Moduły języka Python dla biblioteki libxslt
107 Group:          Libraries/Python
108 Requires:       %{name} = %{version}-%{release}
109 Requires:       python-libxml2 => %{libxml2ver}
110 %pyrequires_eq  python-modules
111 Obsoletes:      libxslt-python
112
113 %description -n python-%{name}
114 Python support for libxslt.
115
116 %description -n python-%{name} -l pl.UTF-8
117 Moduły języka Python dla biblioteki libxslt.
118
119 %prep
120 %setup -q
121 %patch0 -p0
122 %patch1 -p1
123 %patch2 -p1
124
125 %build
126 %{__libtoolize}
127 %{__aclocal}
128 %{__autoconf}
129 %{__autoheader}
130 %{__automake}
131 %configure \
132         ac_cv_header_xlocale_h=no \
133         --disable-silent-rules \
134         %{!?with_static_libs:--disable-static} \
135         --with-plugins \
136         %{!?with_python:--without-python}
137 %{__make}
138
139 %{?with_tests:%{__make} -C tests test}
140
141 %install
142 rm -rf $RPM_BUILD_ROOT
143
144 %{__make} install \
145         DESTDIR=$RPM_BUILD_ROOT
146
147 %if %{with python}
148 # move examples to proper dir
149 install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
150 %{__mv} $RPM_BUILD_ROOT%{_docdir}/%{name}-python-%{version}/examples/* \
151         $RPM_BUILD_ROOT%{_examplesdir}/python-%{name}-%{version}
152 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-python-%{version}
153
154 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
155 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
156 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.{py,la}
157 %if %{with static_libs}
158 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.a
159 %endif
160 %endif
161
162 # packaged as %doc
163 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
164
165 %clean
166 rm -rf $RPM_BUILD_ROOT
167
168 %post   -p /sbin/ldconfig
169 %postun -p /sbin/ldconfig
170
171 %files
172 %defattr(644,root,root,755)
173 %doc AUTHORS ChangeLog Copyright FEATURES NEWS README TODO
174 %attr(755,root,root) %{_libdir}/libexslt.so.*.*.*
175 %attr(755,root,root) %ghost %{_libdir}/libexslt.so.0
176 %attr(755,root,root) %{_libdir}/libxslt.so.*.*.*
177 %attr(755,root,root) %ghost %{_libdir}/libxslt.so.1
178 %dir %{_libdir}/libxslt-plugins
179
180 %files devel
181 %defattr(644,root,root,755)
182 %doc doc/{*.{gif,html},html}
183 %attr(755,root,root) %{_bindir}/xslt-config
184 %attr(755,root,root) %{_libdir}/libexslt.so
185 %attr(755,root,root) %{_libdir}/libxslt.so
186 %{_libdir}/libexslt.la
187 %{_libdir}/libxslt.la
188 %attr(755,root,root) %{_libdir}/xsltConf.sh
189 %{_includedir}/libexslt
190 %{_includedir}/libxslt
191 %{_pkgconfigdir}/libexslt.pc
192 %{_pkgconfigdir}/libxslt.pc
193 %{_aclocaldir}/libxslt.m4
194 %{_mandir}/man3/libexslt.3*
195 %{_mandir}/man3/libxslt.3*
196
197 %if %{with static_libs}
198 %files static
199 %defattr(644,root,root,755)
200 %{_libdir}/libexslt.a
201 %{_libdir}/libxslt.a
202 %endif
203
204 %files progs
205 %defattr(644,root,root,755)
206 %attr(755,root,root) %{_bindir}/xsltproc
207 %{_mandir}/man1/xsltproc.1*
208
209 %if %{with python}
210 %files -n python-%{name}
211 %defattr(644,root,root,755)
212 %attr(755,root,root) %{py_sitedir}/libxsltmod.so
213 %{py_sitedir}/libxslt.py[co]
214 %{_examplesdir}/python-%{name}-%{version}
215 %endif
This page took 0.074225 seconds and 3 git commands to generate.