chrootenv: fix include directories

This commit is contained in:
Nikolay Amiantov 2015-11-23 19:49:20 +03:00
parent d0589b0c54
commit 6d6c1d3523

View File

@ -157,29 +157,25 @@ let
setupLibDirs = if isTargetBuild then setupLibDirs_target setupLibDirs = if isTargetBuild then setupLibDirs_target
else setupLibDirs_multi; else setupLibDirs_multi;
setupIncludeDir = ''
if [ -x "${staticUsrProfileTarget}/include" ]
then
ln -s "${staticUsrProfileTarget}/include"
fi
'';
# the target profile is the actual profile that will be used for the chroot # the target profile is the actual profile that will be used for the chroot
setupTargetProfile = '' setupTargetProfile = ''
mkdir -m0755 usr mkdir -m0755 usr
cd usr cd usr
${setupLibDirs} ${setupLibDirs}
${setupIncludeDir}
for i in bin sbin share include; do for i in bin sbin share include; do
cp -r "${staticUsrProfileTarget}/$i" $i if [ -d "${staticUsrProfileTarget}/$i" ]; then
cp -r "${staticUsrProfileTarget}/$i" "$i"
fi
done done
cd .. cd ..
for i in var etc; do for i in var etc; do
cp -r "${staticUsrProfileTarget}/$i" "$i" if [ -d "${staticUsrProfileTarget}/$i" ]; then
cp -r "${staticUsrProfileTarget}/$i" "$i"
fi
done done
for i in usr/{bin,sbin,lib,lib32,lib64}; do for i in usr/{bin,sbin,lib,lib32,lib64}; do
if [ -x "$i" ]; then if [ -d "$i" ]; then
ln -s "$i" ln -s "$i"
fi fi
done done