%ifos aix6.1 || %ifos aix7.1 %global p7build 1 %else %global p7build 0 %endif Name: fftw Version: 3.3.6pl1 %if %{p7build} Release: 1.p7 %else Release: 1 %endif Summary: Fast Fourier Transform library Group: System Environment/Libraries License: GPL URL: http://www.fftw.org/ Source0: ftp://ftp.fftw.org/pub/fftw/%{name}-3.3.6-pl1.tar.gz Source1: ftp://ftp.fftw.org/pub/fftw/%{name}-3.3.6-pl1.tar.gz.md5sum BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: make Requires: /sbin/install-info Requires: info Provides: fftw3 = %{version}-%{release} Obsoletes: fftw3 < 3.1 %if %{p7build} %ifos aix6.1 Requires: AIX-rpm >= 6.1.8.0 %endif %ifos aix7.1 Requires: AIX-rpm >= 7.1.3.0 %endif %endif %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}-3.3.6-pl1 mv %{name}-3.3.6-pl1 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 export RM="/usr/bin/rm -f" 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} gmake %{?_smp_mflags} cd .. cd single ./configure ${CONFIG_FLAGS} --libdir=%{_libdir64} --enable-single gmake %{?_smp_mflags} cd .. cd long ./configure ${CONFIG_FLAGS} --libdir=%{_libdir64} --enable-long-double gmake %{?_smp_mflags} cd .. cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 cd double ./configure ${CONFIG_FLAGS} gmake %{?_smp_mflags} cd .. cd single ./configure ${CONFIG_FLAGS} --enable-single gmake %{?_smp_mflags} cd .. cd long ./configure ${CONFIG_FLAGS} --enable-long-double gmake %{?_smp_mflags} cd .. %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} export RM="/usr/bin/rm -f" cd 64bit export OBJECT_MODE=64 cd double gmake install DESTDIR=${RPM_BUILD_ROOT} cd .. cd single gmake install DESTDIR=${RPM_BUILD_ROOT} cd .. cd long gmake 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 gmake install DESTDIR=${RPM_BUILD_ROOT} cp -pr AUTHORS COPYING COPYRIGHT ChangeLog NEWS README* TODO ../ cp -pr doc/ ../ cd .. cd single gmake install DESTDIR=${RPM_BUILD_ROOT} cd .. cd long gmake 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 * Fri Oct 06 2017 Michael Perzl - 3.3.6pl1-1 - updated to version 3.3.6pl1 * Tue Sep 13 2016 Michael Perzl - 3.3.5-1 - updated to version 3.3.5 * Mon Mar 17 2014 Michael Perzl - 3.3.4-1 - updated to version 3.3.4 * 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