+#
+%bcond_without fftwl # don't build -long subpackages
+#
+%ifarch sparc
+# sparc has sizeof(double long)==sizeof(double)
+%undefine with_long
+%endif
Summary: Fast Fourier Transform library
Summary(pl): Biblioteka z funkcjami szybkiej transformaty Fouriera
Summary(pt_BR): biblioteca fast fourier transform
Name: fftw3
Version: 3.0.1
-Release: 1
+Release: 2
License: GPL
Group: Libraries
Source0: ftp://ftp.fftw.org/pub/fftw/fftw-%{version}.tar.gz
BuildRequires: automake
BuildRequires: gcc-g77
BuildRequires: libtool
-Requires: %{name}-common = %{version}
+Requires: %{name}-common = %{version}-%{release}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Summary(pl): Pliki programistyczne do fftw
Summary(pt_BR): Headers e documentação do pacote FFTW
Group: Development/Libraries
-Requires: %{name} = %{version}
-Requires: %{name}-common-devel = %{version}
+Requires: %{name} = %{version}-%{release}
+Requires: %{name}-common-devel = %{version}-%{release}
%description devel
This package contains the files you need to develop programs using the
Summary(pl): Statyczne biblioteki fftw
Summary(pt_BR): Bibliotecas estáticas do pacote FFTW
Group: Development/Libraries
-Requires: %{name}-devel = %{version}
+Requires: %{name}-devel = %{version}-%{release}
%description static
Static fftw libraries.
Summary: Fast Fourier Transform library - single precision
Summary(pl): Biblioteka z funkcjami szybkiej transformaty Fouriera - pojedynczej precyzji
Group: Libraries
-Requires: %{name}-common = %{version}
+Requires: %{name}-common = %{version}-%{release}
%description single
FFTW is a collection of fast C routines for computing the Discrete
Summary: Development files for single precision fftw
Summary(pl): Pliki programistyczne do fftw pojedynczej precyzji
Group: Development/Libraries
-Requires: %{name}-common-devel = %{version}
-Requires: %{name}-single = %{version}
+Requires: %{name}-common-devel = %{version}-%{release}
+Requires: %{name}-single = %{version}-%{release}
%description single-devel
This package contains the files you need to develop programs using the
Summary: Static fftw single precision libraries
Summary(pl): Statyczne biblioteki fftw pojedynczej precyzji
Group: Development/Libraries
-Requires: %{name}-single-devel = %{version}
+Requires: %{name}-single-devel = %{version}-%{release}
%description single-static
Static fftw single precision libraries.
Summary: Fast Fourier Transform library - long double precision
Summary(pl): Biblioteka z funkcjami szybkiej transformaty Fouriera - rozszerzonej precyzji
Group: Libraries
-Requires: %{name}-common = %{version}
+Requires: %{name}-common = %{version}-%{release}
%description long
FFTW is a collection of fast C routines for computing the Discrete
Summary: Development files for long double precision fftw
Summary(pl): Pliki programistyczne do fftw rozszerzonej precyzji
Group: Development/Libraries
-Requires: %{name}-common-devel = %{version}
-Requires: %{name}-long = %{version}
+Requires: %{name}-common-devel = %{version}-%{release}
+Requires: %{name}-long = %{version}-%{release}
%description long-devel
This package contains the files you need to develop programs using the
Summary: Static fftw long double precision libraries
Summary(pl): Statyczne biblioteki fftw rozszerzonej precyzji
Group: Development/Libraries
-Requires: %{name}-long-devel = %{version}
+Requires: %{name}-long-devel = %{version}-%{release}
%description long-static
Static fftw long double precision libraries.
Summary: Development files common for all versions of fftw libraries
Summary(pl): Pliki programistyczne wspólne dla wszystkich wersji bibliotek fftw
Group: Development/Libraries
-Requires: %{name}-common
+Requires: %{name}-common = %{version}-%{release}
%description common-devel
Development files common for all versions of fftw libraries (header
ln -sf . double
# MMX/SSE/etc. seem to be safe because of runtime CPU detection
-for ver in single double long-double ; do
+for ver in single double %{with_fftwl:long-double} ; do
OPTS=""
# k7,SSE,3dnow,altivec only for single
if [ "$ver" = "single" ]; then
%endif
%ifarch ppc
OPTS="--enable-altivec"
+%endif
+%ifnarch i586 i686 k6 athlon ppc
+ : # keep sh happy about syntax
%endif
fi
%ifarch i686
%{__make} install -C single \
DESTDIR=$RPM_BUILD_ROOT
+%if %{with fftwl}
%{__make} install -C long-double\
DESTDIR=$RPM_BUILD_ROOT
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
%{_libdir}/libfftw3f.a
%{_libdir}/libfftw3f_threads.a
+%if %{with fftwl}
%files long
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/fftwl-wisdom
%defattr(644,root,root,755)
%{_libdir}/libfftw3l.a
%{_libdir}/libfftw3l_threads.a
+%endif
%files common
%defattr(644,root,root,755)