Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > e0d2fdafffd02380bbc0127e2a77fb44 > files > 3

fftw2-2.1.5-5mdk.src.rpm

%define oname fftw
%define version 2.1.5
%define release 5mdk

%define major 2
%define libname %mklibname %{oname} %{major}

Name: fftw2
Summary: Fast fourier transform library
Version: %{version}
Release: %{release}
License: GPL
Group: Development/C
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Source: %{oname}-%{version}.tar.bz2
Patch0: %{oname}-2.1.3-pentium.patch.bz2
URL: http://www.fftw.org/
BuildRequires: gcc-g77
BuildRequires: automake1.7

%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 "s" prefix.)

%package -n %libname
Summary: Fast fourier transform library
Group: Development/C
Provides: libfftw, fftw
Obsoletes: libfftw, fftw


%description -n %libname
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 "s" prefix.)

%package -n %libname-devel
Summary: Headers, libraries, & docs for FFTW fast fourier transform library
Group: Development/C
Requires: %{libname} = %{version}-%{release}
Provides: libfftw-devel = %{version}-%{release}
Provides: fftw-devel = %{version}-%{release}
Provides: fftw2-devel = %{version}-%{release}
Obsoletes: libfftw-devel, fftw-devel

%description -n %libname-devel
This package contains the additional header files, documentation, and
libraries you need to develop programs using the FFTW fast fourier
transform library.

%prep
rm -rf $RPM_BUILD_ROOT

# We will be compiling two copies of FFTW, one for double precision and
# one for single precision.  During the build process, these copies
# will be stored in fftw-%{version}/double and fftw-%{version}/single

# Unpack the tar archive, first (-c) creating a fftw-%{version}
# directory and then unpacking in there.

%setup -q -c -n %oname-%version
# Now, rename the unpacked FFTW directory to "double":
mv %oname-%version double
# Apply patch to enable pentium optimizations
cd double
%patch0 -p1
cd ..
# Last, make a copy of this directory in "single":
cp -r double single

%build

# Configure and build the double and single 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 "s"
#      prefix.

cd double
%ifarch %{ix86}
    %configure2_5x --enable-shared --enable-threads --infodir=$RPM_BUILD_ROOT%{_infodir} --enable-i386-hacks
%else
    %configure2_5x --enable-shared --enable-threads --infodir=$RPM_BUILD_ROOT%{_infodir}
%endif
%make

cd ../single
aclocal-1.7
automake-1.7
autoconf
%ifarch %{ix86}
    %configure2_5x --enable-shared --enable-threads --infodir=$RPM_BUILD_ROOT%{_infodir} --enable-i386-hacks --enable-float --enable-type-prefix 
%else
    %configure2_5x --enable-shared --enable-threads --infodir=$RPM_BUILD_ROOT%{_infodir} --enable-float --enable-type-prefix
%endif
%make

%install
cd double
%makeinstall
cd ../single
%makeinstall

# copy doc files where RPM will find them
# put the HTML stuff in a sperate dir, so it appears nicely in the docdir
mkdir -p ../html
cp doc/*html doc/*gif ../html
# remove HTML files from doc so that they don't appear double
rm -f doc/*html doc/*gif

# place the doc directory in a "findable" location
mkdir -p ../doc
cp -a doc/* ../doc

# the FAQ directory is also "nice" to have
mkdir -p ../FAQ
cp -a FAQ/* ../FAQ

# do the same to the other %doc files
cp AUTHORS ChangeLog NEWS README* TODO ..

%clean

rm -rf ${RPM_BUILD_ROOT}

%post -n %libname
# run ldconfig to update the runtime linker database with the new libraries
# (make sure /sbin is in the $PATH)
PATH="/sbin:$PATH" ldconfig

%post -n %libname-devel
%__install_info -e '* FFTW: (fftw).                     Fast Fourier Transform library.'\
                -s Libraries %{_infodir}/fftw.info.bz2 %{_infodir}/dir

%preun -n %libname-devel
%__install_info -e '* FFTW: (fftw).                     Fast Fourier Transform library.'\
                -s Libraries %{_infodir}/fftw.info.bz2 %{_infodir}/dir --remove

%postun -n %libname
# after uninstall, run ldconfig to remove the libs from the linker database
PATH="/sbin:$PATH" ldconfig

%files -n %libname
%defattr (-,root,root)
%doc html FAQ doc/*ps doc/*fig doc/*tex* AUTHORS ChangeLog NEWS README* TODO
%{_libdir}/lib*fftw*.so.2*

%files -n %libname-devel
%defattr (-,root,root)
%{_includedir}/*fftw*.h
%doc %{_infodir}/*
%{_libdir}/lib*fftw*.a
%{_libdir}/lib*fftw*.la
%{_libdir}/lib*fftw*.so

%changelog
* Sun Dec 26 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.1.5-5mdk
- lib64 fix

* Fri Dec  3 2004 Götz Waschk <waschk@linux-mandrake.com> 2.1.5-4mdk
- rebuild

* Thu Nov 20 2003 Götz Waschk <waschk@linux-mandrake.com> 2.1.5-3mdk
- fix build and dependancies
- fix devel provides
- reintroduce libfftw2 for compatiblity 

* Thu Jul 10 2003 Götz Waschk <waschk@linux-mandrake.com> 2.1.5-2mdk
- mklibname macro
- autoconf 2.5 macro
- quiet tar

* Tue Mar 25 2003 Lenny Cartier <lenny@mandrakesoft.com> 2.1.5-1mdk
- 2.1.5

* Sat Jan 18 2003 Lenny Cartier <lenny@mandrakesoft.com> 2.1.3-11mdk
- rebuild

* Tue Sep 03 2002 Lenny Cartier <lenny@mandrakesoft.com> 2.1.3-10mdk
- fix provides/obsoletes

* Wed Aug 28 2002 Lenny Cartier <lenny@mandrakesoft.com> 2.1.3-9mdk
- rebuild

* Thu Jun 14 2001 Lenny Cartier <lenny@mandrakesoft.com> 2.1.3-8mdk
- fixed by Mika Korhonen <mikak@ee.oulu.fi> :
	- 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 <lenny@mandrakesoft.com> 2.1.3-7mdk
- rebuild

* Tue Aug 31 2000 Lenny Cartier <lenny@mandrakesoft.com> 2.1.3-6mdk
- add installinfo

* Wed Aug 30 2000 Alexander Skwar <ASkwar@DigitalProjects.com> 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 <lenny@mandrakesoft.com> 2.1.3-4mdk
- BM
- macros

* Wed Apr 26 2000 Lenny Cartier <lenny@mandrakesoft.com> 2.1.3-3mdk
- fix group
- spec helper fixes

* Tue Jan 25 2000 Lenny Cartier <lenny@mandrakesoft.com>
- updated, installs in /usr instead of /usr/local by Dara Hazeghi
  <dara@pacbell.net>

* Thu Dec 16 1999 Lenny Cartier <lenny@mandrakesoft.com>
- new in contribs
- bz2 archive 
- add defattr