fix selfbuild
This commit is contained in:
parent
d94414280d
commit
e5c18b6665
12
fftw.spec
12
fftw.spec
@ -194,7 +194,9 @@ This package includes help documentation and manuals related to %{name}
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
%if %{with mpich} || %{with openmpi}
|
||||
source /etc/profile.d/modules.sh
|
||||
%endif
|
||||
autoreconf -vfi
|
||||
export F77=gfortran
|
||||
|
||||
@ -240,6 +242,7 @@ build_section --enable-long-double
|
||||
%endif
|
||||
cd ..
|
||||
|
||||
%if %{with mpich} || %{with openmpi}
|
||||
for mpi in %{mpi_list}
|
||||
do
|
||||
module load mpi/${mpi}-%{_arch}
|
||||
@ -263,6 +266,7 @@ do
|
||||
cd ..
|
||||
module unload mpi/${mpi}-%{_arch}
|
||||
done
|
||||
%endif
|
||||
|
||||
%install
|
||||
function install_section()
|
||||
@ -271,7 +275,9 @@ function install_section()
|
||||
find %{buildroot}%{_libdir}/${mpi}/lib -name libfftw\* -a \! -name \*_mpi.\* -delete
|
||||
rm -r %{buildroot}%{_libdir}/${mpi}/{bin,share}
|
||||
}
|
||||
%if %{with mpich} || %{with openmpi}
|
||||
source /etc/profile.d/modules.sh
|
||||
%endif
|
||||
|
||||
%make_install -C single
|
||||
%make_install -C double
|
||||
@ -283,6 +289,7 @@ source /etc/profile.d/modules.sh
|
||||
|
||||
%global delete_la find $RPM_BUILD_ROOT -type f -name "*.la" -delete
|
||||
|
||||
%if %{with mpich} || %{with openmpi}
|
||||
for mpi in %{mpi_list}
|
||||
do
|
||||
module load mpi/${mpi}-%{_arch}
|
||||
@ -291,12 +298,15 @@ do
|
||||
install_section long
|
||||
module unload mpi/${mpi}-%{_arch}
|
||||
done
|
||||
%endif
|
||||
|
||||
rm -f %{buildroot}%{_infodir}/dir
|
||||
%delete_la
|
||||
|
||||
%check
|
||||
%if %{with mpich} || %{with openmpi}
|
||||
source /etc/profile.d/modules.sh
|
||||
%endif
|
||||
mydir=`pwd`
|
||||
|
||||
export LD_LIBRARY_PATH=$mydir/single/.libs:$mydir/single/threads/.libs
|
||||
@ -311,6 +321,7 @@ make %{?_smp_mflags} -C long check
|
||||
make %{?_smp_mflags} -C quad check
|
||||
%endif
|
||||
|
||||
%if %{with mpich} || %{with openmpi}
|
||||
for mpi in %{mpi_list}
|
||||
do
|
||||
module load mpi/${mpi}-%{_arch}
|
||||
@ -321,6 +332,7 @@ do
|
||||
make %{?_smp_mflags} -C ${mpi}-long/mpi check
|
||||
module unload mpi/${mpi}-%{_arch}
|
||||
done
|
||||
%endif
|
||||
|
||||
%post libs-single -p /sbin/ldconfig
|
||||
%postun libs-single -p /sbin/ldconfig
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user