Name: fftw Version: 3.3.3 Release: 1 Summary: Fast Fourier Transform library Group: System Environment/Libraries License: GPL URL: http://www.fftw.org/ Source0: ftp://ftp.fftw.org/pub/fftw/%{name}-%{version}.tar.gz Source1: ftp://ftp.fftw.org/pub/fftw/%{name}-%{version}.tar.gz.md5sum BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Requires: /sbin/install-info Requires: info Provides: fftw3 = %{version}-%{release} Obsoletes: fftw3 < 3.1 %define _libdir64 %{_prefix}/lib64 %description FFTW is a C subroutine library for computing the Discrete Fourier Transform (DFT) in one or more dimensions, of both real and complex data, and of arbitrary input size. The library is available as 32-bit and 64-bit. %package devel Summary: Headers, libraries and docs for the FFTW library Group: Development/Libraries Requires: %{name} = %{version}-%{release} pkg-config Provides: fftw3-devel = %{version}-%{release} Obsoletes: fftw3-devel < 3.1 %description devel FFTW is a C subroutine library for computing the Discrete Fourier Transform (DFT) in one or more dimensions, of both real and complex data, and of arbitrary input size. This package contains header files and development libraries needed to develop programs using the FFTW fast Fourier transform library. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "xlc_r" or "gcc -maix64" (or "xlC_r" and "xlf_r", respectively). %prep %setup -q -c %{name}-%{version} mv %{name}-%{version} single cp -pr single double cp -pr single long mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cp -r 32bit/* 64bit/ %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh CONFIG_FLAGS="--prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} --enable-shared --disable-dependency-tracking --enable-threads" export CC="xlc_r" export CXX="xlC_r" export F77="xlf_r" # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" cd 64bit # first build the 64-bit version export OBJECT_MODE=64 cd double ./configure ${CONFIG_FLAGS} --libdir=%{_libdir64} make %{?_smp_mflags} cd .. cd single ./configure ${CONFIG_FLAGS} --libdir=%{_libdir64} --enable-single make %{?_smp_mflags} cd .. cd long ./configure ${CONFIG_FLAGS} --libdir=%{_libdir64} --enable-long-double make %{?_smp_mflags} cd .. cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 cd double ./configure ${CONFIG_FLAGS} make %{?_smp_mflags} cd .. cd single ./configure ${CONFIG_FLAGS} --enable-single make %{?_smp_mflags} cd .. cd long ./configure ${CONFIG_FLAGS} --enable-long-double make %{?_smp_mflags} cd .. %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 cd double make install DESTDIR=${RPM_BUILD_ROOT} cd .. cd single make install DESTDIR=${RPM_BUILD_ROOT} cd .. cd long make install DESTDIR=${RPM_BUILD_ROOT} cd .. ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in * ; do mv -f ${f} ${f}_64 done ) cd ../32bit export OBJECT_MODE=32 cd double make install DESTDIR=${RPM_BUILD_ROOT} cp -pr AUTHORS COPYING COPYRIGHT ChangeLog NEWS README* TODO ../ cp -pr doc/ ../ cd .. cd single make install DESTDIR=${RPM_BUILD_ROOT} cd .. cd long make install DESTDIR=${RPM_BUILD_ROOT} cd .. gzip --best ${RPM_BUILD_ROOT}%{_infodir}/*.info /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT}%{_libdir64} for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done ) # add the 64-bit shared objects to the shared libraries containing already the # 32-bit shared objects for i in 3 3_threads 3f 3f_threads 3l 3l_threads ; do /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/lib%{name}${i}.a ${RPM_BUILD_ROOT}%{_libdir64}/lib%{name}${i}.so* done ( cd ${RPM_BUILD_ROOT} for dir in bin include lib lib64 do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %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 %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc 32bit/AUTHORS 32bit/COPYING 32bit/COPYRIGHT 32bit/ChangeLog %doc 32bit/NEWS 32bit/README* 32bit/TODO %{_bindir}/* %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* %{_mandir}/man?/* %{_infodir}/*info* /usr/bin/* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.so* %files devel %defattr(-,root,system,-) %doc 32bit/doc/html/* %{_includedir}/* %{_libdir}/*.la %{_libdir64}/*.la %{_libdir}/pkgconfig/* %{_libdir64}/pkgconfig/* /usr/include/* /usr/lib/*.la %changelog * Mon Nov 26 2012 Michael Perzl - 3.3.3-1 - updated to version 3.3.3 * Fri May 11 2012 Michael Perzl - 3.3.2-1 - updated to version 3.3.2 * Sat Mar 03 2012 Michael Perzl - 3.3.1-1 - updated to version 3.3.1 * Thu Jul 28 2011 Michael Perzl - 3.3-1 - updated to version 3.3 * Tue Jan 11 2011 Michael Perzl - 3.2.2-1 - updated to version 3.2.2, added RTL-style shared libraries * Fri Mar 14 2008 Michael Perzl - 3.2alpha3-1 - updated to version 3.2alpha3 * Thu Jan 31 2008 Michael Perzl - 3.1.2-1 - first version for AIX5L v5.1 and higher