File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 150
150
%global _binary_filedigest_algorithm 1
151
151
%global _source_filedigest_algorithm 1
152
152
153
+ # Define this to 1 if you want to keep libtool achive files
154
+ # Default is 0 (remove *.la files)
155
+ # type: bool (0/1)
156
+ %{! ?install_libtool_archive: %define install_libtool_archive 0}
153
157
#############################################################################
154
158
#
155
159
# Configuration Logic
@@ -478,6 +482,18 @@ export CFLAGS CXXFLAGS FCFLAGS
478
482
# We don't need that in an RPM.
479
483
find $RPM_BUILD_ROOT -name config.log -exec rm -f {} \;
480
484
485
+ %if ! %{install_libtool_archive }
486
+ # Libtool archive files (.la files) create an unnecessary dependency
487
+ # between linked applications and the development versions of packages
488
+ # upon which Open MPI depends. For example, when building an application
489
+ # which uses Libtool, Open MPI would create a dependency not just on
490
+ # the HWLOC libs package, but the HWLOC devel package
491
+ # (to get the .so.1 -> .so symlink). Best practice in package builders
492
+ # appears to be to skip shipping .la files because of this issue.
493
+ find $RPM_BUILD_ROOT/%{_libdir } -name \*.la -exec rm -f {} \;
494
+ %endif
495
+ # End of libotool_archive if
496
+
481
497
# First, the [optional] modulefile
482
498
483
499
%if %{install_modulefile }
You can’t perform that action at this time.
0 commit comments