diff --git a/julia.spec b/julia.spec index f8b39bd..0074f0b 100644 --- a/julia.spec +++ b/julia.spec @@ -317,8 +317,12 @@ make %{?_smp_mflags} \ # This may fix other issues where libLLVM-14jl.so is not properly copied? if [ "x%{_lib}" != xlib ] ; then # The one that contains buildsubdir/build is from the build_prefix and build_libdir vars - cp -a %{_builddir}/%{buildsubdir}/usr/lib/* %{_builddir}/%{buildsubdir}/build/%{_libdir} - cp -a %{_builddir}/%{buildsubdir}/%{_libdir}/* %{_builddir}/%{buildsubdir}/build/%{_libdir} + if [ -d "%{_builddir}/%{buildsubdir}/usr/lib" ] ; then + cp -a %{_builddir}/%{buildsubdir}/usr/lib/* %{_builddir}/%{buildsubdir}/build/%{_libdir} + fi + if [ -d "%{_builddir}/%{buildsubdir}/%{_libdir}" ] ; then + cp -a %{_builddir}/%{buildsubdir}/%{_libdir}/* %{_builddir}/%{buildsubdir}/build/%{_libdir} + fi cp -a %{_builddir}/%{buildsubdir}/build/usr/lib/* %{_builddir}/%{buildsubdir}/build/%{_libdir} rm -rf %{_builddir}/%{buildsubdir}/build/usr/lib/ # make -C deps install-somepackage goes to top-level folder