libs/glibc: initial commit
[grimoire-witchcraft.git] / libs / glibc / PRE_INSTALL
blob05ad75d21c78c078f470f9819dd4d9b3fb258b35
1 lock_resources "libgrimoire" "install"  &&
2 if [ -z $INSTALL_ROOT ]; then
3   mkdir $SOURCE_DIRECTORY.bld/old.libs  &&
4   local each  &&
5   for each in /lib{,64,32}/*; do
6     if test -f "$each"; then
7       cp "$each" $SOURCE_DIRECTORY.bld/old.libs
8     fi
9   done  &&
10   ldconfig $SOURCE_DIRECTORY.bld/old.libs  &&
11   local LD  &&
12   if [[ $(uname -m) = ppc* ]]; then
13     LD=$(readlink /lib/ld.so.1)  &&
14     ln -sf $SOURCE_DIRECTORY.bld/old.libs/$LD /lib/ld.so.1
15   elif [[ $(uname -m) = x86_64 ]] && test  -f /lib/ld-linux-x86-64.so.2 && [[ $HOST = "x86_64-unknown-linux-gnu" ]]; then
16     LD=$(readlink /lib/ld-linux-x86-64.so.2)  &&
17     ln -sf $SOURCE_DIRECTORY.bld/old.libs/$LD /lib/ld-linux-x86-64.so.2
18   elif [[ $(uname -m) = x86_64 ]] && test  -f /lib64/ld-linux-x86-64.so.2 && [[ $HOST = "x86_64-unknown-linux-gnu" ]]; then
19     LD=$(readlink /lib64/ld-linux-x86-64.so.2)  &&
20     ln -sf $SOURCE_DIRECTORY.bld/old.libs/$LD /lib64/ld-linux-x86-64.so.2
21   else
22     LD=$(readlink /lib/ld-linux.so.2)  &&
23     ln -sf $SOURCE_DIRECTORY.bld/old.libs/$LD /lib/ld-linux.so.2
24   fi
25 fi  &&
27 if  spell_ok  glibc;  then
28   dispel  --notriggers  --nosustain  glibc