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