%define name fftw3 %define version 3.2.2 %define release 2%{?_dist_release} Name: %{name} Summary: C subroutines for computing the Discrete Fourier Transform. Version: %{version} Release: %{release} Group: System Environment/Libraries License: GPLv2 URL: http://www.fftw.org/ Source: fftw-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: gcc-gfortran Vendor: Project Vine Distribution: Vine Linux %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. (The single-precision files have an "f" postfix.) %description -l ja FFTW は1次元または多次元の離散フーリエ変換(DFT)を計算する高速なCルーチンのコレクションです.FFTW は複素数、実数、並列変換ができ、任意のサイズの配列を効果的に扱うことができます.このパッケージには、倍精度と単精度の単一CPUとスレッドに対応した FFTW のライブラリが収められています。(単精度用のファイル名にはfが最後に付けられています。) %package devel Summary: Headers, libraries and docs for the FFTW library Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires(post): install-info Requires(preun): install-info %description devel This package contains header files and development libraries needed to develop programs using the FFTW fast Fourier transform library. %description devel -l ja このパッケージには、高速フーリエ変換のライブラリである FFTW を使ってプログラムを開発する際に必要となるヘッダーファイルやドキュメント、ライブラリが収められています. %package static Summary: Static version of the FFTW library Group: Development/Libraries Requires: %{name}-devel = %{version}-%{release} %description static This package contains the statically linkable version of the FFTW fast Fourier transform library. %prep # We will be compiling three copies of FFTW, one for double precision, another # one for single precision and the other for long double precision. During the # build process, these copies will be stored in fftw-%{version}/double, single # and long # Unpack the tar archive, first (-c) creating a fftw-%{version} # directory and then unpacking in there. %setup -q -c -n fftw-%{version} for dir in single double long; do cp -a fftw-%{version} $dir done rm -rf fftw-%{version} %build # Configure and build the double, single and long double precision versions. # Notes: # (1) We install into ${RPM_BUILD_ROOT}, which is set either # by the BuildRoot option above or by --buildroot at build-time. # This allows you to build the RPM without blowing away your existing # FFTW installation, and even without being root. # (2) The double-precision version is installed with the normal library # names, while the single-precision version is installed with an "f" # postfix. # Configure uses g77 by default, if present on system export F77=gfortran %ifarch x86_64 #CONFIG_FLAGS="--enable-sse --enable-sse2 --enable-shared --disable-dependency-tracking --enable-threads" CONFIG_FLAGS="--enable-shared --disable-dependency-tracking --enable-threads" %else CONFIG_FLAGS="--enable-shared --disable-dependency-tracking --enable-threads" %endif pushd double %configure $CONFIG_FLAGS sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool make %{?_smp_mflags} popd pushd single %configure $CONFIG_FLAGS --enable-single sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool make %{?_smp_mflags} popd pushd long %configure $CONFIG_FLAGS --enable-long-double sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool make %{?_smp_mflags} popd %install rm -rf $RPM_BUILD_ROOT doc pushd double make install DESTDIR=${RPM_BUILD_ROOT} cp -a AUTHORS COPYING COPYRIGHT ChangeLog NEWS README* TODO ../ cp -a doc/ ../ popd pushd single make install DESTDIR=${RPM_BUILD_ROOT} popd pushd long make install DESTDIR=${RPM_BUILD_ROOT} popd ## remove unuse files rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir rm -f ${RPM_BUILD_ROOT}%{_libdir}/*.la %clean rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %post devel /sbin/install-info --section="Math" %{_infodir}/%{name}.info.gz %{_infodir}/dir 2>/dev/null || : %preun devel if [ "$1" = 0 ]; then /sbin/install-info --delete %{_infodir}/%{name}.info.gz %{_infodir}/dir 2>/dev/null || : fi %files %defattr (-,root,root) %doc AUTHORS COPYING COPYRIGHT ChangeLog NEWS README* TODO %{_bindir}/fftw* %{_libdir}/libfftw3*.so.* %{_mandir}/man1/fftw* %files devel %defattr (-,root,root) %doc doc/html/ doc/FAQ/fftw-faq.html/ doc/*.pdf %{_includedir}/fftw3.* %{_libdir}/libfftw3*.so %{_libdir}/pkgconfig/fftw3*.pc %{_infodir}/fftw3* %files static %defattr (-,root,root) %{_libdir}/libfftw3*.a %changelog * Mon Oct 04 2010 Shu KONNO 3.2.2-2 - dropt "--enable-sse --enable-sse2" in configure (on x86_64) * Sun Oct 03 2010 Ryoichi INAGAKI 3.2.2-1 - updated to 3.2.2 - added long double precision support - split static libraries * Sat Sep 20 2008 Shu KONNO 3.1.2-1vl5 - applied new versioning policy, spec in utf-8 - removed *.la - moved *.pc file to devel * Thu Jan 03 2008 Satoshi MACHINO 3.1.2-0vl1 - new upstream release * Tue Nov 27 2007 Shu KONNO 3.1.1-0vl2 - s/gcc-g77/gcc-gfortran/ - x86_64 support * Tue May 30 2006 Seiya Nishizawa 3.1.1-0vl1 - source version up * Thu Jan 29 2004 Seiya Nishizawa 3.0.1-0vl1 - source version up to 3 - package name to fftw3 - enable sse2 for double and sse for single * Thu Jul 18 2002 KOBAYASHI R. Taizo 2.1.3-0vl1 - modified for Vine. * Mon Feb 25 2002 Fuhito Suguri 2.1.3-12bw - rebuild for RH72. * Tue Oct 09 2001 Fuhito Suguri 2.1.3-11bw - corrected some wrong descriptions in this spec for RH71 * Tue Oct 09 2001 Fuhito Suguri 2.1.3-10bw - corrected some wrong descriptions in this spec * Mon Oct 08 2001 Fuhito Suguri 2.1.3-9bw - rebuilt for Vine Linux 2.1.5 * Thu Jun 14 2001 Lenny Cartier 2.1.3-8mdk - fixed by Mika Korhonen : - removed broken ld.so.conf test (/usr/lib is not listed there anyways) - made install-info work with RPM macros shipping with newer Mandrakes and actually add an entry to the top dir file * Tue Jan 09 2001 Lenny Cartier 2.1.3-7mdk - rebuild * Tue Aug 31 2000 Lenny Cartier 2.1.3-6mdk - add installinfo * Wed Aug 30 2000 Alexander Skwar 2.1.3-5mdk - Actually used macros - Added %doc files - Shortened %files section of the SPEC file a lot - Provide libfftw as eXtace requires it - Obsolote libfftw package - Optimized for Pentium builds per README.hacks * Wed Aug 30 2000 Lenny Cartier 2.1.3-4mdk - BM - macros * Wed Apr 26 2000 Lenny Cartier 2.1.3-3mdk - fix group - spec helper fixes * Tue Jan 25 2000 Lenny Cartier - updated, installs in /usr instead of /usr/local by Dara Hazeghi * Thu Dec 16 1999 Lenny Cartier - new in contribs - bz2 archive - add defattr