+#
+# Conditional build
+%bcond_without single # without single precision library
+
Summary: Fast Fourier transform library
-Summary(pl): biblioteka z funkacjami szybkiej transformaty Fouriera
+Summary(pl): Biblioteka z funkcjami szybkiej transformaty Fouriera
+Summary(pt_BR): Biblioteca fast Fourier transform
Name: fftw
-Version: 2.1.3
-Release: 5
+Version: 2.1.5
+Release: 2
License: GPL
Group: Libraries
-Group(fr): Librairies
-Group(pl): Biblioteki
Source0: ftp://ftp.fftw.org/pub/fftw/%{name}-%{version}.tar.gz
-Patch0: fftw-info.patch
+# Source0-md5: 8d16a84f3ca02a785ef9eb36249ba433
+Patch0: %{name}-info.patch
Icon: fftw-logo-thumb.gif
URL: http://www.fftw.org/
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: lam
+BuildRequires: libtool
+BuildRequires: texinfo
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
FFTW is a collection of fast C routines for computing the Discrete
Fourier Transform in one or more dimensions. It includes complex,
real, and parallel transforms, and can handle arbitrary array sizes
-efficiently. This RPM package includes both the double- and
-single-precision FFTW uniprocessor and threads libraries.
+efficiently. This RPM package includes the double precision FFTW
+uniprocessor and threads libraries.
%description -l pl
FFTW jest zbiorem szybkich funkcji C do obliczania dyskretnych
-transformacji Fouriera w jedym lub wiêcej wymiarach. Zawiera równie¿
-z³o¿one, rzeczywiste oraz równoleg³e transformacje i potrafi wydajnie
+transformat Fouriera w jednym lub wiêcej wymiarach. Zawiera równie¿
+zespolone, rzeczywiste oraz równoleg³e transformaty i potrafi wydajnie
radziæ sobie z tablicami o dowolnych rozmiarach. Ten pakiet RPM
-zawiera zarówno uniprocesor FFTW o pojedynczej i podwójnej precyzji
-jak i biblioteki w±tków.
+zawiera wersje FFTW o podwójnej precyzji dla architektur
+jednoprocesorowych oraz z obs³ug± w±tków.
+
+%description -l pt_BR
+FFTW é uma coleção de rotinas rápidas em C para computar a Discrete
+Fourier Transform em uma ou mais dimensões. Incluindo transformações
+complexas, reais e paralelas, também pode manipular vetores de tamanho
+arbitrário eficientemente. Esse pacote RPM inclui bibliotecas FFTW com
+suporte a threads, normal e dupla precisão (Os arquivos de precisão
+normal tem um prefixo "s").
%package devel
-Summary: headers, libraries, & docs for fftw
+Summary: Headers, libraries & docs for fftw
+Summary(pl): Nag³ówki, biblioteki oraz dokumentacja do fftw
+Summary(pt_BR): headers, bibliotecas e documentação do pacote FFTW
Group: Development/Libraries
-Group(fr): Development/Librairies
-Group(pl): Programowanie/Biblioteki
Requires: %{name} = %{version}
%description devel
-This package contains the additional header files, documentation, and
-libraries you need to develop programs using the FFTW fast fourier
-transform library.
+This package contains the additional header files, documentation and
+7ibraries you need to develop programs using the FFTW (fast Fourier
+transform library).
+
+%description devel -l pl
+Ten pakiet zawiera dodatkowe pliki nag³ówkowe, dokumentacjê oraz
+biblioteki niezbêdne do tworzenia programów u¿ywaj±cych biblioteki
+FFTW (fast Fourier transform library).
+
+%description devel -l pt_BR
+Este pacote contém documentação, headers e bibliotecas adicionais para
+desenvolver programas usando a FFTW.
%package static
Summary: Static fftw libraries
+Summary(pl): Statyczne biblioteki fftw
+Summary(pt_BR): bibliotecas estáticas do pacote FFTW
Group: Development/Libraries
-Group(fr): Development/Librairies
-Group(pl): Programowanie/Biblioteki
Requires: %{name}-devel = %{version}
%description static
Static fftw libraries.
+%description static -l pl
+Statyczne biblioteki fftw.
+
+%description static -l pt_BR
+Este pacote contém as bibliotecas estáticas do pacote FFTW.
+
%prep
-%setup -q
+%setup -q
%patch -p1
%build
+# This is important to do sfftw (Single precision library)
+%if %{with single}
+cp -r ../%{name}-%{version} ../single
+cd ../single
+
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__automake}
%configure \
-%ifarch i386 i486 i586 i686
+%ifarch %{ix86}
+ --enable-i386-hacks \
+%endif
+ --enable-shared \
+ --enable-threads \
+ --enable-float \
+ --enable-type-prefix \
+ --%{!?debug:dis}%{?debug:en}able-debug
+
+%{__make}
+
+cd -
+%endif
+
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__automake}
+%configure \
+%ifarch %{ix86}
--enable-i386-hacks \
%endif
--enable-shared \
--enable-threads \
- --enable-type-prefix \
- --%{!?debug:disable}%{?debug:enable}-debug
+ --%{!?debug:dis}%{?debug:en}able-debug
+# --enable-type-prefix \
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
+%if %{with single}
+cd ../single
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+cd -
+%endif
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files devel
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/lib*.la
+%{_libdir}/lib*.la
%attr(755,root,root) %{_libdir}/lib*.so
%{_includedir}/*
%{_infodir}/fftw.info*