Install libpmi/pmi2 backward-compatible libraries normally,

not as a pmi environment module
This commit is contained in:
Philip Kovacs 2019-07-02 01:23:24 -04:00
parent e08494c4f7
commit 18632f1d02

View File

@ -1,6 +1,6 @@
Name: pmix Name: pmix
Version: 3.1.2 Version: 3.1.2
Release: 1%{?dist} Release: 2%{?dist}
Summary: Process Management Interface Exascale (PMIx) Summary: Process Management Interface Exascale (PMIx)
License: BSD License: BSD
URL: https://pmix.github.io/pmix/ URL: https://pmix.github.io/pmix/
@ -11,7 +11,6 @@ Patch0: pmix_remove_cxx_lang.patch
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: environment(modules)
BuildRequires: flex BuildRequires: flex
BuildRequires: gcc BuildRequires: gcc
BuildRequires: libevent-devel BuildRequires: libevent-devel
@ -20,9 +19,6 @@ BuildRequires: perl-interpreter
BuildRequires: pkgconfig(hwloc) BuildRequires: pkgconfig(hwloc)
BuildRequires: pkgconfig(munge) BuildRequires: pkgconfig(munge)
Provides: pmi
Requires: environment(modules)
%description %description
The Process Management Interface (PMI) has been used for quite some time as The Process Management Interface (PMI) has been used for quite some time as
a means of exchanging wireup information needed for interprocess a means of exchanging wireup information needed for interprocess
@ -77,7 +73,7 @@ find src -name \*.l -print -exec touch --no-create {} \;
--enable-pmi-backward-compatibility \ --enable-pmi-backward-compatibility \
--with-munge --with-munge
%make_build V=1 %make_build
%check %check
%make_build check %make_build check
@ -88,23 +84,6 @@ find src -name \*.l -print -exec touch --no-create {} \;
# remove libtool archives # remove libtool archives
find %{buildroot} -name '*.la' | xargs rm -f find %{buildroot} -name '*.la' | xargs rm -f
# move libpmi/libpmi2 for environment module usage
install -d -m 0755 %{buildroot}%{_libdir}/%{name}/lib
mv %{buildroot}%{_libdir}/libpmi.so* %{buildroot}%{_libdir}/%{name}/lib
mv %{buildroot}%{_libdir}/libpmi2.so* %{buildroot}%{_libdir}/%{name}/lib
# install pmi/pmix environment module file
install -d -m 0755 %{buildroot}%{_modulesdir}/pmi
cat >%{buildroot}%{_modulesdir}/pmi/%{name}-%{_arch} <<EOF
#%%Module 1.0
#
# pmi/pmix module for use with 'environment-modules' package:
#
conflict pmi
prepend-path LD_LIBRARY_PATH %{_libdir}/%{name}/lib
prepend-path PKG_CONFIG_PATH %{_libdir}/%{name}/lib/pkgconfig
EOF
# install pkgconfig file pmix.pc # install pkgconfig file pmix.pc
install -d -m 0755 %{buildroot}%{_libdir}/pkgconfig install -d -m 0755 %{buildroot}%{_libdir}/pkgconfig
cat >%{buildroot}%{_libdir}/pkgconfig/%{name}.pc <<EOF cat >%{buildroot}%{_libdir}/pkgconfig/%{name}.pc <<EOF
@ -118,11 +97,11 @@ Cflags: -I\${includedir}
Libs: -L\${libdir} -lpmix Libs: -L\${libdir} -lpmix
EOF EOF
# install pkgconfig file pmi.pc for environment module usage # install pkgconfig file pmi.pc
install -d -m 0755 %{buildroot}%{_libdir}/%{name}/lib/pkgconfig install -d -m 0755 %{buildroot}%{_libdir}/pkgconfig
cat >%{buildroot}%{_libdir}/%{name}/lib/pkgconfig/pmi.pc <<EOF cat >%{buildroot}%{_libdir}/pkgconfig/pmi.pc <<EOF
includedir=%{_includedir} includedir=%{_includedir}
libdir=%{_libdir}/%{name}/lib libdir=%{_libdir}
Name: pmi Name: pmi
Version: %{version} Version: %{version}
@ -131,11 +110,11 @@ Cflags: -I\${includedir}
Libs: -L\${libdir} -lpmi Libs: -L\${libdir} -lpmi
EOF EOF
# install pkgconfig file pmi2.pc for environment module usage # install pkgconfig file pmi2.pc
install -d -m 0755 %{buildroot}%{_libdir}/%{name}/lib/pkgconfig install -d -m 0755 %{buildroot}%{_libdir}/pkgconfig
cat >%{buildroot}%{_libdir}/%{name}/lib/pkgconfig/pmi2.pc <<EOF cat >%{buildroot}%{_libdir}/pkgconfig/pmi2.pc <<EOF
includedir=%{_includedir} includedir=%{_includedir}
libdir=%{_libdir}/%{name}/lib libdir=%{_libdir}
Name: pmi2 Name: pmi2
Version: %{version} Version: %{version}
@ -152,30 +131,32 @@ EOF
%doc README %doc README
%dir %{_datadir}/%{name} %dir %{_datadir}/%{name}
%dir %{_libdir}/%{name} %dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/lib
%dir %{_modulesdir}/pmi
%dir %{_sysconfdir}/%{name} %dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/*.conf %config(noreplace) %{_sysconfdir}/%{name}/*.conf
%{_datadir}/%{name}/*.txt %{_datadir}/%{name}/*.txt
%{_libdir}/libmca_common_dstore.so.1* %{_libdir}/libmca_common_dstore.so.1*
%{_libdir}/libpmix.so.2* %{_libdir}/libpmix.so.2*
%{_libdir}/libpmi.so.1*
%{_libdir}/libpmi2.so.1*
%{_libdir}/%{name}/*.so %{_libdir}/%{name}/*.so
%{_libdir}/%{name}/lib/*.so.*
%{_modulesdir}/pmi/*
%files devel %files devel
%{_datadir}/%{name}/*.supp %{_datadir}/%{name}/*.supp
%{_includedir}/*.h %{_includedir}/*.h
%{_libdir}/libmca_common_dstore.so %{_libdir}/libmca_common_dstore.so
%{_libdir}/libpmix.so %{_libdir}/libpmix.so
%{_libdir}/%{name}/lib/*.so %{_libdir}/libpmi.so
%{_libdir}/%{name}/lib/pkgconfig/*.pc %{_libdir}/libpmi2.so
%{_libdir}/pkgconfig/*.pc %{_libdir}/pkgconfig/*.pc
%files tools %files tools
%{_bindir}/* %{_bindir}/*
%changelog %changelog
* Tue Jul 2 2019 Philip Kovacs <pkdevel@yahoo.com> - 3.1.2-2
- Install libpmi/pmi2 backward-compatible libraries normally,
- not as a pmi environment module
* Wed Jun 19 2019 Philip Kovacs <pkdevel@yahoo.com> - 3.1.2-1 * Wed Jun 19 2019 Philip Kovacs <pkdevel@yahoo.com> - 3.1.2-1
- Update to 3.1.2 - Update to 3.1.2
- Replace __make with make - Replace __make with make