Skip to content

Commit d8b7bc4

Browse files
author
rhc54
committed
Merge pull request open-mpi#763 from ggouaillardet/topic/v1.10/ompi_rpm
rpm: fix openmpi.spec not to include the /usr directory
2 parents 4e8ff39 + 9b734f3 commit d8b7bc4

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

contrib/dist/linux/openmpi.spec

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
# Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved.
1313
# Copyright (c) 2013 Mellanox Technologies, Inc.
1414
# All rights reserved.
15+
# Copyright (c) 2015 Research Organization for Information Science
16+
# and Technology (RIST). All rights reserved.
1517
# $COPYRIGHT$
1618
#
1719
# Additional copyrights may follow
@@ -672,7 +674,14 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
672674

673675
%files
674676
%defattr(-, root, root, -)
677+
%if %(test "%{_prefix}" = "/usr" && echo 1 || echo 0)
678+
%{_bindir}/*
679+
%{_includedir}/*
680+
%{_libdir}/*
681+
%{_datadir}
682+
%else
675683
%{_prefix}
684+
%endif
676685
# If the sysconfdir is not under the prefix, then list it explicitly.
677686
%if !%{sysconfdir_in_prefix}
678687
%{_sysconfdir}
@@ -708,7 +717,13 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
708717

709718
%files runtime -f runtime.files
710719
%defattr(-, root, root, -)
711-
%dir %{_prefix}
720+
%if %(test "%{_prefix}" = "/usr" && echo 1 || echo 0)
721+
%{_bindir}/*
722+
%{_libdir}/*
723+
%{_datadir}
724+
%else
725+
%{_prefix}
726+
%endif
712727
# If the sysconfdir is not under the prefix, then list it explicitly.
713728
%if !%{sysconfdir_in_prefix}
714729
%{_sysconfdir}
@@ -731,9 +746,6 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
731746
%{shell_scripts_path}/%{shell_scripts_basename}.sh
732747
%{shell_scripts_path}/%{shell_scripts_basename}.csh
733748
%endif
734-
%dir %{_bindir}
735-
%dir %{_libdir}
736-
%dir %{_libdir}/openmpi
737749
%doc README INSTALL LICENSE
738750
%{_pkgdatadir}
739751

@@ -758,6 +770,9 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
758770
#
759771
#############################################################################
760772
%changelog
773+
* Thu Nov 12 2015 Gilles Gouaillardet <[email protected]>
774+
- Revamp packaging when prefix is /usr
775+
761776
* Mon Jul 07 2014 Jeff Squyres <[email protected]>
762777
- Several minor fixes from Oliver Lahaye: fix dates in changelog,
763778
added %{?dist} tag to the Release field, and added some Provides

0 commit comments

Comments
 (0)