2
0
Fork 0

genodePackages: symlink *.lib.so to lib*.so in depot outputs

This less about linking to lib*.so and more about the Bintools package
detecting that these actually are directories containing libraries.
This commit is contained in:
Emery Hemingway 2020-11-24 10:32:02 +01:00
parent 1348a45b8e
commit 143c0c5551
1 changed files with 16 additions and 2 deletions

View File

@ -223,10 +223,24 @@ let
installPhase = ''
runHook preInstall
rm -r depot/genodelabs/bin/${arch}/${name}/*\.build
local outputLibDir="''${!outputLib}/lib"
find depot/genodelabs/bin/${arch}/${name} -name '*.lib.so' \
-exec install -Dt "''${!outputLib}/lib" {} \; -delete
-exec install -Dt "$outputLibDir" {} \; -delete
if [ -d "$outputLibDir" ]; then
pushd "$outputLibDir"
for src in *.lib.so; do
dst=$src
dst="''${dst#lib}"
dst="''${dst%.lib.so}"
ln -s "$src" lib"$dst".so
done
popd
fi
find depot/genodelabs/bin/${arch}/${name} -executable \
-exec install -Dt "''${!outputBin}/bin" {} \;
runHook postInstall
'';