]> git.pld-linux.org Git - packages/fftw3.git/blob - fftw3.spec
- add ldconfig for single/long packages
[packages/fftw3.git] / fftw3.spec
1 #
2 # Conditional build:
3 %bcond_without  fftwl   # don't build "long" subpackages
4 #
5 Summary:        Fast Fourier Transform library
6 Summary(pl.UTF-8):      Biblioteka z funkcjami szybkiej transformaty Fouriera
7 Summary(pt_BR.UTF-8):   biblioteca fast fourier transform
8 Name:           fftw3
9 Version:        3.1.2
10 Release:        3
11 License:        GPL
12 Group:          Libraries
13 Source0:        ftp://ftp.fftw.org/pub/fftw/fftw-%{version}.tar.gz
14 # Source0-md5:  08f2e21c9fd02f4be2bd53a62592afa4
15 Patch0:         %{name}-info.patch
16 Patch1:         %{name}-link.patch
17 Patch2:         %{name}-ac_simd.patch
18 Patch3:         %{name}-ac.patch
19 URL:            http://www.fftw.org/
20 BuildRequires:  autoconf
21 BuildRequires:  automake
22 %ifarch alpha ppc s390 s390x sparc sparcv9
23 %if %{with fftwl}
24 # for 128-bit long double support
25 BuildRequires:  gcc-fortran >= 5:4.1.0-1
26 BuildRequires:  glibc >= 6:2.4-1
27 %endif
28 %endif
29 BuildRequires:  libtool
30 BuildRequires:  texinfo
31 Requires:       %{name}-common = %{version}-%{release}
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 FFTW is a collection of fast C routines for computing the Discrete
36 Fourier Transform in one or more dimensions. It includes complex,
37 real, and parallel transforms, and can handle arbitrary array sizes
38 efficiently. This RPM package includes the double precision FFTW
39 uniprocessor and threads libraries.
40
41 %description -l pl.UTF-8
42 FFTW jest zbiorem szybkich funkcji C do obliczania dyskretnych
43 transformat Fouriera w jednym lub więcej wymiarach. Zawiera również
44 zespolone, rzeczywiste oraz równoległe transformaty i potrafi wydajnie
45 radzić sobie z tablicami o dowolnych rozmiarach. Ten pakiet RPM
46 zawiera wersje FFTW o podwójnej precyzji dla architektur
47 jednoprocesorowych oraz z obsługą wątków.
48
49 %description -l pt_BR.UTF-8
50 FFTW é uma coleção de rotinas rápidas em C para computar a Discrete
51 Fourier Transform em uma ou mais dimensões. Incluindo transformações
52 complexas, reais e paralelas, também pode manipular vetores de tamanho
53 arbitrário eficientemente. Esse pacote RPM inclui bibliotecas FFTW com
54 suporte a threads, normal e dupla precisão (Os arquivos de precisão
55 normal tem um prefixo "s").
56
57 %package devel
58 Summary:        Development files for fftw
59 Summary(pl.UTF-8):      Pliki programistyczne do fftw
60 Summary(pt_BR.UTF-8):   Headers e documentação do pacote FFTW
61 Group:          Development/Libraries
62 Requires:       %{name} = %{version}-%{release}
63 Requires:       %{name}-common-devel = %{version}-%{release}
64
65 %description devel
66 This package contains the files you need to develop programs using the
67 FFTW (fast fourier transform library).
68
69 %description devel -l pl.UTF-8
70 Ten pakiet zawiera pliki potrzebne do tworzenia programów używających
71 biblioteki FFTW (wykonującej szybką transformatę Fouriera).
72
73 %description devel -l pt_BR.UTF-8
74 Este pacote contém documentação e headers adicionais para desenvolver
75 programas usando a FFTW.
76
77 %package static
78 Summary:        Static fftw libraries
79 Summary(pl.UTF-8):      Statyczne biblioteki fftw
80 Summary(pt_BR.UTF-8):   Bibliotecas estáticas do pacote FFTW
81 Group:          Development/Libraries
82 Requires:       %{name}-devel = %{version}-%{release}
83
84 %description static
85 Static fftw libraries.
86
87 %description static -l pl.UTF-8
88 Statyczne biblioteki fftw.
89
90 %description static -l pt_BR.UTF-8
91 Este pacote contém as bibliotecas estáticas do pacote FFTW.
92
93 %package single
94 Summary:        Fast Fourier Transform library - single precision
95 Summary(pl.UTF-8):      Biblioteka z funkcjami szybkiej transformaty Fouriera - pojedynczej precyzji
96 Group:          Libraries
97 Requires:       %{name}-common = %{version}-%{release}
98
99 %description single
100 FFTW is a collection of fast C routines for computing the Discrete
101 Fourier Transform in one or more dimensions. It includes complex,
102 real, and parallel transforms, and can handle arbitrary array sizes
103 efficiently. This RPM package includes the single precision FFTW
104 uniprocessor and threads libraries.
105
106 %description single -l pl.UTF-8
107 FFTW jest zbiorem szybkich funkcji C do obliczania dyskretnych
108 transformat Fouriera w jednym lub więcej wymiarach. Zawiera również
109 zespolone, rzeczywiste oraz równoległe transformaty i potrafi wydajnie
110 radzić sobie z tablicami o dowolnych rozmiarach. Ten pakiet RPM
111 zawiera wersje FFTW o pojedynczej precyzji dla architektur
112 jednoprocesorowych oraz z obsługą wątków.
113
114 %package single-devel
115 Summary:        Development files for single precision fftw
116 Summary(pl.UTF-8):      Pliki programistyczne do fftw pojedynczej precyzji
117 Group:          Development/Libraries
118 Requires:       %{name}-common-devel = %{version}-%{release}
119 Requires:       %{name}-single = %{version}-%{release}
120
121 %description single-devel
122 This package contains the files you need to develop programs using the
123 single precision FFTW (fast fourier transform library).
124
125 %description single-devel -l pl.UTF-8
126 Ten pakiet zawiera pliki potrzebne do tworzenia programów używających
127 biblioteki FFTW pojedynczej precyzji (wykonującej szybką transformatę
128 Fouriera).
129
130 %package single-static
131 Summary:        Static fftw single precision libraries
132 Summary(pl.UTF-8):      Statyczne biblioteki fftw pojedynczej precyzji
133 Group:          Development/Libraries
134 Requires:       %{name}-single-devel = %{version}-%{release}
135
136 %description single-static
137 Static fftw single precision libraries.
138
139 %description single-static -l pl.UTF-8
140 Statyczne biblioteki fftw pojedynczej precyzji.
141
142 %package long
143 Summary:        Fast Fourier Transform library - long double precision
144 Summary(pl.UTF-8):      Biblioteka z funkcjami szybkiej transformaty Fouriera - rozszerzonej precyzji
145 Group:          Libraries
146 Requires:       %{name}-common = %{version}-%{release}
147
148 %description long
149 FFTW is a collection of fast C routines for computing the Discrete
150 Fourier Transform in one or more dimensions. It includes complex,
151 real, and parallel transforms, and can handle arbitrary array sizes
152 efficiently. This RPM package includes the long double precision FFTW
153 uniprocessor and threads libraries.
154
155 %description long -l pl.UTF-8
156 FFTW jest zbiorem szybkich funkcji C do obliczania dyskretnych
157 transformat Fouriera w jednym lub więcej wymiarach. Zawiera również
158 zespolone, rzeczywiste oraz równoległe transformaty i potrafi wydajnie
159 radzić sobie z tablicami o dowolnych rozmiarach. Ten pakiet RPM
160 zawiera wersje FFTW o rozszerzonej precyzji dla architektur
161 jednoprocesorowych oraz z obsługą wątków.
162
163 %package long-devel
164 Summary:        Development files for long double precision fftw
165 Summary(pl.UTF-8):      Pliki programistyczne do fftw rozszerzonej precyzji
166 Group:          Development/Libraries
167 Requires:       %{name}-common-devel = %{version}-%{release}
168 Requires:       %{name}-long = %{version}-%{release}
169
170 %description long-devel
171 This package contains the files you need to develop programs using the
172 long double precision FFTW (fast fourier transform library).
173
174 %description long-devel -l pl.UTF-8
175 Ten pakiet zawiera pliki potrzebne do tworzenia programów używających
176 biblioteki FFTW rozszerzonej precyzji (wykonującej szybką transformatę
177 Fouriera).
178
179 %package long-static
180 Summary:        Static fftw long double precision libraries
181 Summary(pl.UTF-8):      Statyczne biblioteki fftw rozszerzonej precyzji
182 Group:          Development/Libraries
183 Requires:       %{name}-long-devel = %{version}-%{release}
184
185 %description long-static
186 Static fftw long double precision libraries.
187
188 %description long-static -l pl.UTF-8
189 Statyczne biblioteki fftw rozszerzonej precyzji.
190
191 %package common
192 Summary:        Files common for all versions of fftw libraries
193 Summary(pl.UTF-8):      Pliki wspólne dla wszystkich wersji bibliotek fftw
194 Group:          Libraries
195
196 %description common
197 Files common for all versions of fftw libraries (basic documentation,
198 fftw-wisdom-to-conf utility).
199
200 %description common -l pl.UTF-8
201 Pliki wspólne dla wszystkich wersji bibliotek fftw (podstawowa
202 dokumentacja, narzędzie fftw-wisdom-to-conf).
203
204 %package common-devel
205 Summary:        Development files common for all versions of fftw libraries
206 Summary(pl.UTF-8):      Pliki programistyczne wspólne dla wszystkich wersji bibliotek fftw
207 Group:          Development/Libraries
208 Requires:       %{name}-common = %{version}-%{release}
209
210 %description common-devel
211 Development files common for all versions of fftw libraries (header
212 files, development documentation).
213
214 %description common-devel -l pl.UTF-8
215 Pliki programistyczne wspólne dla wszystkich wersji bibliotek fftw
216 (pliki nagłówkowe, dokumentacja programisty).
217
218 %prep
219 %setup -q -n fftw-%{version}
220 %patch0 -p1
221 %patch1 -p1
222 %patch2 -p1
223 %patch3 -p1
224
225 %build
226 %{__libtoolize}
227 %{__aclocal} -I m4
228 %{__autoconf}
229 %{__automake}
230
231 # prepare three trees (for single, double, long-double precision)
232 rm -rf single double long-double
233 echo * > files.list
234 install -d single long-double
235 cp -a `cat files.list` single
236 cp -a `cat files.list` long-double
237 ln -sf . double
238
239 # MMX/SSE/etc. seem to be safe because of runtime CPU detection
240 for ver in single double %{?with_fftwl:long-double}; do
241         OPTS=""
242         # k7,SSE,3dnow,altivec only for single
243         if [ "$ver" = "single" ]; then
244 %ifarch i686
245                 OPTS="--enable-sse"
246 %endif
247 %ifarch athlon
248                 OPTS="--enable-sse" # no "--enable-k7" - conflicts with shared, SEGV on athlons
249 %endif
250 %ifarch ppc
251                 OPTS="--enable-altivec"
252 %endif
253 %ifnarch i586 i686 k6 athlon ppc
254                 :       # keep sh happy about syntax
255 %endif
256         fi
257 %ifarch i686
258         # SSE2 only for double
259         if [ "$ver" = "double" ]; then
260                 OPTS="--enable-sse2"
261         fi
262 %endif
263 cd $ver
264 %configure \
265         --enable-shared \
266         --enable-threads \
267         --enable-$ver \
268         $OPTS \
269         --%{!?debug:dis}%{?debug:en}able-debug
270
271 %{__make}
272
273 cd ..
274 done
275
276 %install
277 rm -rf $RPM_BUILD_ROOT
278
279 %{__make} install \
280         DESTDIR=$RPM_BUILD_ROOT
281
282 %{__make} install -C single \
283         DESTDIR=$RPM_BUILD_ROOT
284
285 %if %{with fftwl}
286 %{__make} install -C long-double \
287         DESTDIR=$RPM_BUILD_ROOT
288 %endif
289
290 %clean
291 rm -rf $RPM_BUILD_ROOT
292
293 %post   -p /sbin/ldconfig
294 %postun -p /sbin/ldconfig
295
296 %post   single -p /sbin/ldconfig
297 %postun single -p /sbin/ldconfig
298
299 %post   long -p /sbin/ldconfig
300 %postun long -p /sbin/ldconfig
301
302 %post common-devel
303 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
304
305 %postun common-devel
306 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
307
308 %files
309 %defattr(644,root,root,755)
310 %attr(755,root,root) %{_bindir}/fftw-wisdom
311 %attr(755,root,root) %{_libdir}/libfftw3.so.*.*.*
312 %attr(755,root,root) %{_libdir}/libfftw3_threads.so.*.*.*
313 %{_mandir}/man1/fftw-wisdom.1*
314
315 %files devel
316 %defattr(644,root,root,755)
317 %attr(755,root,root) %{_libdir}/libfftw3.so
318 %attr(755,root,root) %{_libdir}/libfftw3_threads.so
319 %{_libdir}/libfftw3.la
320 %{_libdir}/libfftw3_threads.la
321 %{_pkgconfigdir}/fftw3.pc
322
323 %files static
324 %defattr(644,root,root,755)
325 %{_libdir}/libfftw3.a
326 %{_libdir}/libfftw3_threads.a
327
328 %files single
329 %defattr(644,root,root,755)
330 %attr(755,root,root) %{_bindir}/fftwf-wisdom
331 %attr(755,root,root) %{_libdir}/libfftw3f.so.*.*.*
332 %attr(755,root,root) %{_libdir}/libfftw3f_threads.so.*.*.*
333 %{_mandir}/man1/fftwf-wisdom.1*
334
335 %files single-devel
336 %defattr(644,root,root,755)
337 %attr(755,root,root) %{_libdir}/libfftw3f.so
338 %attr(755,root,root) %{_libdir}/libfftw3f_threads.so
339 %{_libdir}/libfftw3f.la
340 %{_libdir}/libfftw3f_threads.la
341 %{_pkgconfigdir}/fftw3f.pc
342
343 %files single-static
344 %defattr(644,root,root,755)
345 %{_libdir}/libfftw3f.a
346 %{_libdir}/libfftw3f_threads.a
347
348 %if %{with fftwl}
349 %files long
350 %defattr(644,root,root,755)
351 %attr(755,root,root) %{_bindir}/fftwl-wisdom
352 %attr(755,root,root) %{_libdir}/libfftw3l.so.*.*.*
353 %attr(755,root,root) %{_libdir}/libfftw3l_threads.so.*.*.*
354 %{_mandir}/man1/fftwl-wisdom.1*
355
356 %files long-devel
357 %defattr(644,root,root,755)
358 %attr(755,root,root) %{_libdir}/libfftw3l.so
359 %attr(755,root,root) %{_libdir}/libfftw3l_threads.so
360 %{_libdir}/libfftw3l.la
361 %{_libdir}/libfftw3l_threads.la
362 %{_pkgconfigdir}/fftw3l.pc
363
364 %files long-static
365 %defattr(644,root,root,755)
366 %{_libdir}/libfftw3l.a
367 %{_libdir}/libfftw3l_threads.a
368 %endif
369
370 %files common
371 %defattr(644,root,root,755)
372 %doc AUTHORS COPYRIGHT ChangeLog NEWS README TODO
373 %attr(755,root,root) %{_bindir}/fftw-wisdom-to-conf
374 %{_mandir}/man1/fftw-wisdom-to-conf.1*
375
376 %files common-devel
377 %defattr(644,root,root,755)
378 %doc doc/html doc/FAQ/fftw-faq.html
379 %{_includedir}/fftw3.*
380 %{_infodir}/fftw3.info*
This page took 0.06934 seconds and 4 git commands to generate.