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 _libdir /opt/%{name}/%{version}/lib
%define _includedir /opt/%{name}/%{version}/include %define _includedir /opt/%{name}/%{version}/include
%define _mandir /opt/%{name}/%{version}/man %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 # 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 # 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 # bets are off. So feel free to install it anywhere in your tree. He
@ -206,7 +211,12 @@
%global _sysconfdir %{_prefix}/etc %global _sysconfdir %{_prefix}/etc
%endif %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} %if !%{use_check_files}
%define __check_files %{nil} %define __check_files %{nil}
@ -550,7 +560,7 @@ find $RPM_BUILD_ROOT -type f -o -type l | \
# Devel files # Devel files
find $RPM_BUILD_ROOT -type f -o -type l | \ find $RPM_BUILD_ROOT -type f -o -type l | \
sed -e "s@$RPM_BUILD_ROOT@@" | \ 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 %endif
# End of build_all_in_one_rpm # End of build_all_in_one_rpm
@ -615,13 +625,15 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
%files %files
%defattr(-, root, root, -) %defattr(-, root, root, -)
%{_prefix} %{_prefix}
# If we're not installing in /opt, then the prefix is /usr, but the # If the sysconfdir is not under the prefix, then list it explicitly.
# sysconfdir is /etc -- so list them both. Otherwise, we install in %if !%{sysconfdir_in_prefix}
# /opt/openmpi/<version>, so be sure to list /opt/openmpi as well (so
# that it can be removed).
%if !%{install_in_opt}
%{_sysconfdir} %{_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} %dir /opt/%{name}
%endif %endif
# If we're installing the modulefile, get that, too # 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 %files runtime -f runtime.files
%defattr(-, root, root, -) %defattr(-, root, root, -)
%dir %{_prefix} %dir %{_prefix}
# If we're not installing in /opt, then the prefix is /usr, but the # If the sysconfdir is not under the prefix, then list it explicitly.
# sysconfdir is /etc -- so list them both. Otherwise, we install in %if !%{sysconfdir_in_prefix}
# /opt/openmpi/<version>, so be sure to list /opt/openmpi as well (so %{_sysconfdir}
# that it can be removed). %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} %if %{install_in_opt}
%dir /opt/%{name} %dir /opt/%{name}
%dir /opt/%{name}/%{version}/share %dir /opt/%{name}/%{version}/share
%else
%{_sysconfdir}
%endif %endif
# If we're installing the modulefile, get that, too # If we're installing the modulefile, get that, too
%if %{install_modulefile} %if %{install_modulefile}
@ -672,7 +687,6 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
%dir %{_libdir} %dir %{_libdir}
%dir %{_libdir}/openmpi %dir %{_libdir}/openmpi
%doc README INSTALL LICENSE %doc README INSTALL LICENSE
%{_sysconfdir}
%{_pkgdatadir} %{_pkgdatadir}
%{_bindir}/mpirun %{_bindir}/mpirun
%{_bindir}/mpiexec %{_bindir}/mpiexec
@ -708,7 +722,16 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
# #
############################################################################# #############################################################################
%changelog %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 - Added define option for disabling the use of rpmbuild's
auto-dependency generation stuff. This is necessary for some auto-dependency generation stuff. This is necessary for some
compilers that allow themselves to be installed via tarball (not compilers that allow themselves to be installed via tarball (not