fftw3/fftw3.spec

238 lines
6.5 KiB
RPMSpec

#
# spec file for package fftw3
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: fftw3
BuildRequires: fdupes gcc-fortran openmpi-devel pkgconfig
Summary: Discrete Fourier Transform (DFT) C Subroutine Library
Version: 3.3
Release: 14
License: GPLv2+
Group: Productivity/Scientific/Math
Source: fftw-%{version}.tar.bz2
# Patch: fftw-%{version}.diff
Url: http://www.fftw.org
AutoReqProv: on
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires(pre): %install_info_prereq
%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.
%package devel
License: GPLv2+
Summary: Include Files and Libraries mandatory for Development
Group: Development/Libraries/C and C++
Requires: fftw3 = %{version} glibc-devel
Provides: fftw-devel
%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.
%package threads
License: GPLv2+
Summary: Discrete Fourier Transform (DFT) C subroutine library
Group: Productivity/Scientific/Math
Requires: fftw3 = %{version}
%description threads
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.
%package threads-devel
License: GPLv2+
Summary: Discrete Fourier Transform (DFT) C subroutine library
Group: Development/Libraries/C and C++
Requires: fftw3-threads = %{version}
Requires: fftw3-devel = %{version} glibc-devel
%description threads-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.
%package openmp
License: GPLv2+
Summary: Discrete Fourier Transform (DFT) C subroutine library
Group: Productivity/Scientific/Math
Requires: fftw3 = %{version}
%description openmp
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.
%package openmp-devel
License: GPLv2+
Summary: Discrete Fourier Transform (DFT) C subroutine library
Group: Development/Libraries/C and C++
Requires: fftw3-openmp = %{version}
Requires: fftw3-devel = %{version} glibc-devel
%description openmp-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.
%package mpi
License: GPLv2+
Summary: Discrete Fourier Transform (DFT) C subroutine library
Group: Productivity/Scientific/Math
Requires: fftw3 = %{version}
Requires: openmpi
%description mpi
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.
%package mpi-devel
License: GPLv2+
Summary: Discrete Fourier Transform (DFT) C subroutine library
Group: Development/Libraries/C and C++
Requires: fftw3-mpi = %{version}
Requires: fftw3-devel = %{version} glibc-devel
Requires: openmpi-devel
%description mpi-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.
%prep
%setup -q -n fftw-%{version}
# %patch
# autoreconf --force --install
%build
%configure --enable-shared --enable-threads --enable-openmp --enable-mpi \
%ifarch %ix86 x86_64
--enable-sse2 \
%endif
--disable-static
make %{?_smp_mflags}
%install
%makeinstall
# remove unneeded files
rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.*a
# hack to also compile/install single-precision version:
make distclean
%configure --enable-shared --enable-threads --enable-float --enable-openmp --enable-mpi \
%ifarch %ix86 x86_64
--enable-sse \
%endif
--disable-static
make %{?_smp_mflags}
%makeinstall
# remove unneeded files
rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.*a
# gzip -9nf $RPM_BUILD_ROOT%{_infodir}/*.info*
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
# remove Makefiles in doc directory at last
find doc -name 'Makefile*' | xargs rm
%fdupes -s doc
%postun devel
%install_info_delete --info-dir=%{_infodir} %{_infodir}/fftw3.info.gz
%post devel
%install_info --info-dir=%{_infodir} %{_infodir}/fftw3.info.gz
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post threads -p /sbin/ldconfig
%postun threads -p /sbin/ldconfig
%post openmp -p /sbin/ldconfig
%postun openmp -p /sbin/ldconfig
%post mpi -p /sbin/ldconfig
%postun mpi -p /sbin/ldconfig
%clean
test "$RPM_BUILD_ROOT" != "/" -a -d "$RPM_BUILD_ROOT" && rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%{_libdir}/libfftw3.so.*
%{_libdir}/libfftw3f.so.*
%files devel
%defattr(-,root,root)
%doc AUTHORS CONVENTIONS COPYING COPYRIGHT ChangeLog INSTALL NEWS README TODO
%doc doc/*
%doc %{_mandir}/man?/*
%{_infodir}/*.info*
%{_includedir}/fftw3.*
%{_libdir}/libfftw3.so
%{_libdir}/libfftw3f.so
%{_libdir}/pkgconfig/*.pc
%{_bindir}/*
%files threads
%defattr(-,root,root)
%{_libdir}/libfftw3_threads.so.*
%{_libdir}/libfftw3f_threads.so.*
%files threads-devel
%defattr(-,root,root)
%{_libdir}/libfftw3_threads.so
%{_libdir}/libfftw3f_threads.so
%files openmp
%defattr(-,root,root)
%{_libdir}/libfftw3_omp.so.*
%{_libdir}/libfftw3f_omp.so.*
%files openmp-devel
%defattr(-,root,root)
%{_libdir}/libfftw3_omp.so
%{_libdir}/libfftw3f_omp.so
%files mpi
%defattr(-,root,root)
%{_libdir}/libfftw3_mpi.so.*
%{_libdir}/libfftw3f_mpi.so.*
%files mpi-devel
%defattr(-,root,root)
%{_libdir}/libfftw3_mpi.so
%{_libdir}/libfftw3f_mpi.so
%{_includedir}/fftw3-mpi.*
%changelog