Compare commits
5 Commits
Author | SHA1 | Date |
---|---|---|
Zbigniew Jędrzejewski-Szmek | 5d6f718d96 | |
Zbigniew Jędrzejewski-Szmek | e1a9c11952 | |
Zbigniew Jędrzejewski-Szmek | 0b268dc55e | |
Zbigniew Jędrzejewski-Szmek | 0d9ef07236 | |
Zbigniew Jędrzejewski-Szmek | 3850d3749f |
|
@ -12,7 +12,7 @@
|
|||
-setenv exec_prefix @exec_prefix@
|
||||
+setenv MPI_BIN @LIBDIR@/bin
|
||||
+setenv MPI_SYSCONFIG @sysconfdir@/@MPINAME@-@ARCH@
|
||||
+setenv MPI_FORTRAN_MOD_DIR @includedir@
|
||||
+setenv MPI_FORTRAN_MOD_DIR @fortranmoddir@/@MPINAME@
|
||||
+setenv MPI_INCLUDE @includedir@
|
||||
+setenv MPI_LIB @libdir@
|
||||
+setenv MPI_MAN @mandir@
|
||||
|
|
59
mpich.spec
59
mpich.spec
|
@ -1,7 +1,7 @@
|
|||
Summary: A high-performance implementation of MPI
|
||||
Name: mpich
|
||||
Version: 3.1.4
|
||||
Release: 5%{?dist}
|
||||
Release: 7%{?dist}
|
||||
License: MIT
|
||||
Group: Development/Libraries
|
||||
URL: http://www.mpich.org/
|
||||
|
@ -21,7 +21,7 @@ BuildRequires: rpm-mpi-hooks
|
|||
Provides: mpi
|
||||
Provides: mpich2 = 3.0.1
|
||||
Obsoletes: mpich2 < 3.0
|
||||
Requires: environment-modules
|
||||
Requires: environment(modules)
|
||||
|
||||
%description
|
||||
MPICH is a high-performance and widely portable implementation of the Message
|
||||
|
@ -88,7 +88,7 @@ Contains documentations, examples and man-pages for mpich
|
|||
# so uncomment and undefine to NOT use
|
||||
%{!?opt_cc_cflags: %global opt_cc_cflags %{optflags}}
|
||||
%{!?opt_fc_fflags: %global opt_fc_fflags %{optflags}}
|
||||
#%{!?opt_fc_fflags: %global opt_fc_fflags %{optflags} -I%{_fmoddir}}
|
||||
#%%{!?opt_fc_fflags: %%global opt_fc_fflags %%{optflags} -I%%{_fmoddir}}
|
||||
%{!?opt_f77_fflags: %global opt_f77_fflags %{optflags}}
|
||||
|
||||
%ifarch s390
|
||||
|
@ -112,14 +112,13 @@ Contains documentations, examples and man-pages for mpich
|
|||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p0 -b .modu
|
||||
%autosetup -p0
|
||||
|
||||
%build
|
||||
%configure \
|
||||
--enable-sharedlibs=gcc \
|
||||
--enable-shared \
|
||||
--enable-static=no \
|
||||
--enable-static=no \
|
||||
--enable-lib-depend \
|
||||
--disable-rpath \
|
||||
--disable-silent-rules \
|
||||
|
@ -130,7 +129,7 @@ Contains documentations, examples and man-pages for mpich
|
|||
--bindir=%{_libdir}/%{name}/bin \
|
||||
--libdir=%{_libdir}/%{name}/lib \
|
||||
--datadir=%{_datadir}/%{name} \
|
||||
--mandir=%{_mandir}/%{name} \
|
||||
--mandir=%{_mandir}/%{name}-%{_arch} \
|
||||
--docdir=%{_datadir}/%{name}/doc \
|
||||
--htmldir=%{_datadir}/%{name}/doc \
|
||||
--with-hwloc-prefix=system \
|
||||
|
@ -160,29 +159,36 @@ sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
|
|||
make %{?_smp_mflags} VERBOSE=1
|
||||
|
||||
%install
|
||||
make DESTDIR=%{buildroot} install
|
||||
%make_install
|
||||
|
||||
#mkdir -p %{buildroot}/%{_fmoddir}/%{name}
|
||||
#mv %{buildroot}%{_includedir}/%{name}/*.mod %{buildroot}/%{_fmoddir}/%{name}/
|
||||
mkdir -p %{buildroot}/%{_fmoddir}/%{name}
|
||||
mv %{buildroot}%{_includedir}/%{name}-*/*.mod %{buildroot}/%{_fmoddir}/%{name}/
|
||||
|
||||
# Install the module file
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/modulefiles/mpi
|
||||
mkdir -p %{buildroot}%{python_sitearch}/%{name}
|
||||
cp -pr src/packaging/envmods/mpich.module %{buildroot}%{_sysconfdir}/modulefiles/mpi/%{name}-%{_arch}
|
||||
sed -i 's#'%{_bindir}'#'%{_libdir}/%{name}/bin'#;s#@LIBDIR@#'%{_libdir}/%{name}'#;s#@MPINAME@#%{name}#;s#@pysitearch@#'%{python_sitearch}'#;s#@ARCH@#'%{_arch}'#' %{buildroot}%{_sysconfdir}/modulefiles/mpi/%{name}-%{_arch}
|
||||
sed -r 's|%{_bindir}|%{_libdir}/%{name}/bin|;
|
||||
s|@LIBDIR@|%{_libdir}/%{name}|;
|
||||
s|@MPINAME@|%{name}|;
|
||||
s|@pysitearch@|%{python2_sitearch}|;
|
||||
s|@ARCH@|%{_arch}|;
|
||||
s|@fortranmoddir@|%{_fmoddir}|;
|
||||
' \
|
||||
<src/packaging/envmods/mpich.module \
|
||||
>%{buildroot}%{_sysconfdir}/modulefiles/mpi/%{name}-%{_arch}
|
||||
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/profile.d
|
||||
cat << EOF > %{buildroot}%{_sysconfdir}/profile.d/mpich-%{_arch}.sh
|
||||
cat >%{buildroot}%{_sysconfdir}/profile.d/mpich-%{_arch}.sh <<EOF
|
||||
# Load mpich environment module
|
||||
module load mpi/%{name}-%{_arch}
|
||||
EOF
|
||||
cp -p %{buildroot}%{_sysconfdir}/profile.d/mpich-%{_arch}.{sh,csh}
|
||||
|
||||
# Install the RPM macros
|
||||
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d
|
||||
cp -p %{SOURCE1} %{buildroot}%{_rpmconfigdir}/macros.d/macros.%{name}
|
||||
install -pDm0644 %{SOURCE1} %{buildroot}%{_rpmconfigdir}/macros.d/macros.%{name}
|
||||
|
||||
find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
|
||||
mkdir -p %{buildroot}%{python_sitearch}/%{name}
|
||||
|
||||
find %{buildroot} -type f -name "*.la" -delete
|
||||
|
||||
%check
|
||||
make check VERBOSE=1
|
||||
|
@ -192,15 +198,16 @@ make check VERBOSE=1
|
|||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%doc CHANGES COPYRIGHT README README.envvar RELEASE_NOTES
|
||||
%license COPYRIGHT
|
||||
%doc CHANGES README README.envvar RELEASE_NOTES
|
||||
%dir %{_libdir}/%{name}
|
||||
%dir %{_libdir}/%{name}/lib
|
||||
%dir %{_libdir}/%{name}/bin
|
||||
%{_libdir}/%{name}/lib/*.so.*
|
||||
%{_libdir}/%{name}/bin/*
|
||||
%dir %{python_sitearch}/%{name}
|
||||
%dir %{_mandir}/%{name}
|
||||
%doc %{_mandir}/%{name}/man1/
|
||||
%dir %{_mandir}/%{name}-%{_arch}
|
||||
%doc %{_mandir}/%{name}-%{_arch}/man1/
|
||||
%{_sysconfdir}/modulefiles/mpi/
|
||||
|
||||
%files autoload
|
||||
|
@ -209,16 +216,24 @@ make check VERBOSE=1
|
|||
%files devel
|
||||
%{_includedir}/%{name}-%{_arch}/
|
||||
%{_libdir}/%{name}/lib/pkgconfig/
|
||||
##%{_fmoddir}/%{name}/
|
||||
%{_libdir}/%{name}/lib/*.so
|
||||
%{_fmoddir}/%{name}/
|
||||
%{_rpmconfigdir}/macros.d/macros.%{name}
|
||||
%{_mandir}/%{name}-%{_arch}/man3/
|
||||
|
||||
%files doc
|
||||
%dir %{_datadir}/%{name}
|
||||
%{_datadir}/%{name}/doc/
|
||||
%{_mandir}/%{name}/man3/
|
||||
|
||||
%changelog
|
||||
* Mon Nov 16 2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.1.4-7
|
||||
- Update requires and fix MPI_FORTRAN_MOD_DIR var
|
||||
|
||||
* Thu Aug 27 2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.1.4-6
|
||||
- Cleanups to the spec file
|
||||
- Move fortran .mod files to %%{_fmoddir}/mpich (#1154991)
|
||||
- Move man pages to arch-specific dir (#1264359)
|
||||
|
||||
* Sun Jul 26 2015 Sandro Mani <manisandro@gmail.com> - 3.1.4-5
|
||||
- Require, BuildRequire: rpm-mpi-hooks
|
||||
|
||||
|
|
Loading…
Reference in New Issue