1
1
* Remove duplicate %{_sysconfdir} in the % files sections when
  building the sub-packages.
* When building the sub-packages, ensure that devel.files also picks
  up the F90 module.
* Hard-code the directory name "openmpi" into _pkglibdir (vs. using
  %{name}) because the OMPI code base has it hard-coded as well.
  Thanks to Jim Kusznir for noticing the problem.

This commit was SVN r17036.
Этот коммит содержится в:
Jeff Squyres 2008-01-02 21:52:59 +00:00
родитель a234ba198a
Коммит fe244271f2

57
contrib/dist/linux/openmpi.spec поставляемый
Просмотреть файл

@ -188,7 +188,12 @@
%define _libdir /opt/%{name}/%{version}/lib
%define _includedir /opt/%{name}/%{version}/include
%define _mandir /opt/%{name}/%{version}/man
%define _pkgdatadir /opt/%{name}/%{version}/share/%{name}
# Note that the name "openmpi" is hard-coded in
# opal/mca/installdirs/config for pkgdatadir; there is currently no
# easy way to have OMPI change this directory name internally. So we
# just hard-code that name here as well (regardless of the value of
# %{name} or %{_name}).
%define _pkgdatadir /opt/%{name}/%{version}/share/openmpi
# Per advice from Doug Ledford at Red Hat, docdir is supposed to be in
# a fixed location. But if you're installing a package in /opt, all
# bets are off. So feel free to install it anywhere in your tree. He
@ -206,7 +211,12 @@
%global _sysconfdir %{_prefix}/etc
%endif
%{!?_pkgdatadir: %define _pkgdatadir %{_datadir}/%{name}}
# Is the sysconfdir under the prefix directory? This affects
# whether we list the sysconfdir separately in the files sections,
# below.
%define sysconfdir_in_prefix %(test "`echo %{_sysconfdir} | grep %{_prefix}`" = "" && echo 0 || echo 1)
%{!?_pkgdatadir: %define _pkgdatadir %{_datadir}/openmpi}
%if !%{use_check_files}
%define __check_files %{nil}
@ -550,7 +560,7 @@ find $RPM_BUILD_ROOT -type f -o -type l | \
# Devel files
find $RPM_BUILD_ROOT -type f -o -type l | \
sed -e "s@$RPM_BUILD_ROOT@@" | \
egrep "lib.*\.a|lib.*\.la" > devel.files | /bin/true
egrep "lib.*\.a|lib.*\.la|mpi.*mod" > devel.files | /bin/true
%endif
# End of build_all_in_one_rpm
@ -615,13 +625,15 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root, -)
%{_prefix}
# If we're not installing in /opt, then the prefix is /usr, but the
# sysconfdir is /etc -- so list them both. Otherwise, we install in
# /opt/openmpi/<version>, so be sure to list /opt/openmpi as well (so
# that it can be removed).
%if !%{install_in_opt}
# If the sysconfdir is not under the prefix, then list it explicitly.
%if !%{sysconfdir_in_prefix}
%{_sysconfdir}
%else
%endif
# If %{instal_in_opt}, then we're instaling OMPI to
# /opt/openmpi/<version>. But be sure to also explicitly mention
# /opt/openmpi so that it can be removed by RPM when everything under
# there is also removed.
%if %{install_in_opt}
%dir /opt/%{name}
%endif
# If we're installing the modulefile, get that, too
@ -649,15 +661,18 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
%files runtime -f runtime.files
%defattr(-, root, root, -)
%dir %{_prefix}
# If we're not installing in /opt, then the prefix is /usr, but the
# sysconfdir is /etc -- so list them both. Otherwise, we install in
# /opt/openmpi/<version>, so be sure to list /opt/openmpi as well (so
# that it can be removed).
# If the sysconfdir is not under the prefix, then list it explicitly.
%if !%{sysconfdir_in_prefix}
%{_sysconfdir}
%endif
# If %{instal_in_opt}, then we're instaling OMPI to
# /opt/openmpi/<version>. But be sure to also explicitly mention
# /opt/openmpi so that it can be removed by RPM when everything under
# there is also removed. Also list /opt/openmpi/<version>/share so
# that it can be removed as well.
%if %{install_in_opt}
%dir /opt/%{name}
%dir /opt/%{name}/%{version}/share
%else
%{_sysconfdir}
%endif
# If we're installing the modulefile, get that, too
%if %{install_modulefile}
@ -672,7 +687,6 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
%dir %{_libdir}
%dir %{_libdir}/openmpi
%doc README INSTALL LICENSE
%{_sysconfdir}
%{_pkgdatadir}
%{_bindir}/mpirun
%{_bindir}/mpiexec
@ -708,7 +722,16 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
#
#############################################################################
%changelog
* Tue Dec 4 2008 Jeff Squyres <jsquyres@cisco.com>
* Wed Jan 2 2008 Jeff Squyres <jsquyres@cisco.com>
- Remove duplicate %{_sysconfdir} in the % files sections when
building the sub-packages.
- When building the sub-packages, ensure that devel.files also picks
up the F90 module.
- Hard-code the directory name "openmpi" into _pkglibdir (vs. using
%{name}) because the OMPI code base has it hard-coded as well.
Thanks to Jim Kusznir for noticing the problem.
* Tue Dec 4 2007 Jeff Squyres <jsquyres@cisco.com>
- Added define option for disabling the use of rpmbuild's
auto-dependency generation stuff. This is necessary for some
compilers that allow themselves to be installed via tarball (not