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
@@ -670,7 +672,14 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
670672
671673%files
672674%defattr(-, root, root, -)
675+ %if %(test " %{_prefix}" = " /usr" && echo 1 || echo 0)
676+ %{_bindir }/*
677+ %{_includedir }/*
678+ %{_libdir }/*
679+ %{_datadir }
680+ %else
673681%{_prefix }
682+ %endif
674683# If the sysconfdir is not under the prefix, then list it explicitly.
675684%if ! %{sysconfdir_in_prefix }
676685%{_sysconfdir }
@@ -706,7 +715,13 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
706715
707716%files runtime -f runtime.files
708717%defattr(-, root, root, -)
709- %dir %{_prefix }
718+ %if %(test " %{_prefix}" = " /usr" && echo 1 || echo 0)
719+ %{_bindir }/*
720+ %{_libdir }/*
721+ %{_datadir }
722+ %else
723+ %{_prefix }
724+ %endif
710725# If the sysconfdir is not under the prefix, then list it explicitly.
711726%if ! %{sysconfdir_in_prefix }
712727%{_sysconfdir }
@@ -729,9 +744,6 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
729744%{shell_scripts_path }/%{shell_scripts_basename }.sh
730745%{shell_scripts_path }/%{shell_scripts_basename }.csh
731746%endif
732- %dir %{_bindir }
733- %dir %{_libdir }
734- %dir %{_libdir }/openmpi
735747%doc README INSTALL LICENSE
736748%{_pkgdatadir }
737749
@@ -756,6 +768,9 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
756768#
757769#############################################################################
758770%changelog
771+ * Thu Nov 12 2015 Gilles Gouaillardet <gilles@rist.or.jp>
772+ - Revamp packaging when prefix is /usr
773+
759774* Tue Jan 20 2015 Bert Wesarg <bert.wesarg@tu-dresden.de>
760775- Remove VampirTrace wrapper from package.
761776
0 commit comments