# Figure out our root directory
ROOTDIR=$(pwd)
unset CHROOT
if test "${ROOTDIR}" != "/"; then
  CHROOT="chroot ${ROOTDIR} "
  ROOTDIR="${ROOTDIR}/"
fi
if [ -f usr/lib64/xulrunner-8/components/compreg.dat ] ;then
  ${CHROOT} rm -f /usr/lib64/xulrunner-8/components/compreg.dat 1> /dev/null 2> /dev/null
fi
if [ -f usr/lib64/xulrunner-8/components/xpti.dat ] ;then
  ${CHROOT} rm -f /usr/lib64/xulrunner-8/components/xpti.dat 1> /dev/null 2> /dev/null
fi


( cd usr/lib64/pkgconfig ; rm -rf libxul-embedding-unstable.pc )
( cd usr/lib64/pkgconfig ; ln -sf libxul-embedding.pc libxul-embedding-unstable.pc )
( cd usr/lib64/pkgconfig ; rm -rf libxul-unstable.pc )
( cd usr/lib64/pkgconfig ; ln -sf libxul.pc libxul-unstable.pc )
( cd usr/lib64/xulrunner-sdk-8/sdk/lib ; rm -rf libmozalloc.so )
( cd usr/lib64/xulrunner-sdk-8/sdk/lib ; ln -sf ../../../xulrunner-8/libmozalloc.so libmozalloc.so )
( cd usr/lib64/xulrunner-sdk-8/sdk/lib ; rm -rf libxul.so )
( cd usr/lib64/xulrunner-sdk-8/sdk/lib ; ln -sf ../../../xulrunner-8/libxul.so libxul.so )
( cd usr/lib64/xulrunner-sdk-8/sdk/lib ; rm -rf libxpcom.so )
( cd usr/lib64/xulrunner-sdk-8/sdk/lib ; ln -sf ../../../xulrunner-8/libxpcom.so libxpcom.so )
( cd usr/lib64/xulrunner-sdk-8/sdk/lib ; rm -rf libmozjs.so )
( cd usr/lib64/xulrunner-sdk-8/sdk/lib ; ln -sf ../../../xulrunner-8/libmozjs.so libmozjs.so )
( cd usr/lib64/xulrunner-sdk-8/sdk ; rm -rf idl )
( cd usr/lib64/xulrunner-sdk-8/sdk ; ln -sf ../../../share/idl/xulrunner-sdk-8 idl )
( cd usr/lib64/xulrunner-sdk-8/sdk ; rm -rf include )
( cd usr/lib64/xulrunner-sdk-8/sdk ; ln -sf ../../../include/xulrunner-sdk-8 include )
( cd usr/lib64/xulrunner-sdk-8 ; rm -rf lib )
( cd usr/lib64/xulrunner-sdk-8 ; ln -sf sdk/lib lib )
( cd usr/lib64/xulrunner-sdk-8 ; rm -rf bin )
( cd usr/lib64/xulrunner-sdk-8 ; ln -sf ../xulrunner-8 bin )
( cd usr/lib64/xulrunner-sdk-8 ; rm -rf idl )
( cd usr/lib64/xulrunner-sdk-8 ; ln -sf ../../share/idl/xulrunner-sdk-8 idl )
( cd usr/lib64/xulrunner-sdk-8 ; rm -rf include )
( cd usr/lib64/xulrunner-sdk-8 ; ln -sf ../../include/xulrunner-sdk-8 include )
( cd usr/lib64/xulrunner-8 ; rm -rf dictionaries )
( cd usr/lib64/xulrunner-8 ; ln -sf ../../share/myspell dictionaries )
