# Ensure that xulrunner libraries are found by applications that need them
# (this way you can remove seamonkey completely):
if ! grep -q /usr/lib/xulrunner etc/ld.so.conf ; then
  echo "/usr/lib/xulrunner" >> etc/ld.so.conf
fi

( cd usr/lib ; rm -rf xulrunner )
( cd usr/lib ; ln -sf xulrunner-15.0.1 xulrunner )
( cd usr/lib/xulrunner-devel-15.0.1 ; rm -rf idl )
( cd usr/lib/xulrunner-devel-15.0.1 ; ln -sf /usr/share/idl/xulrunner-15.0.1 idl )
( cd usr/lib/xulrunner-devel-15.0.1 ; rm -rf include )
( cd usr/lib/xulrunner-devel-15.0.1 ; ln -sf /usr/include/xulrunner-15.0.1 include )
( cd usr/lib/xulrunner-devel-15.0.1 ; rm -rf lib )
( cd usr/lib/xulrunner-devel-15.0.1 ; ln -sf /usr/lib/xulrunner-devel-15.0.1/sdk/lib lib )
( cd usr/lib/xulrunner-devel-15.0.1 ; rm -rf bin )
( cd usr/lib/xulrunner-devel-15.0.1 ; ln -sf /usr/lib/xulrunner-15.0.1 bin )
( cd usr/lib/xulrunner-devel-15.0.1/sdk/lib ; rm -rf libxpcom.so )
( cd usr/lib/xulrunner-devel-15.0.1/sdk/lib ; ln -sf /usr/lib/xulrunner-15.0.1/libxpcom.so libxpcom.so )
( cd usr/lib/xulrunner-devel-15.0.1/sdk/lib ; rm -rf libmozalloc.so )
( cd usr/lib/xulrunner-devel-15.0.1/sdk/lib ; ln -sf /usr/lib/xulrunner-15.0.1/libmozalloc.so libmozalloc.so )
( cd usr/lib/xulrunner-devel-15.0.1/sdk/lib ; rm -rf libxul.so )
( cd usr/lib/xulrunner-devel-15.0.1/sdk/lib ; ln -sf /usr/lib/xulrunner-15.0.1/libxul.so libxul.so )
( cd usr/lib/pkgconfig ; rm -rf xulrunner-plugin.pc )
( cd usr/lib/pkgconfig ; ln -sf mozilla-plugin.pc xulrunner-plugin.pc )
( cd usr/lib/pkgconfig ; rm -rf xulrunner-gtkmozembed.pc )
( cd usr/lib/pkgconfig ; ln -sf mozilla-gtkmozembed.pc xulrunner-gtkmozembed.pc )
( cd usr/lib/pkgconfig ; rm -rf xulrunner-xpcom.pc )
( cd usr/lib/pkgconfig ; ln -sf mozilla-xpcom.pc xulrunner-xpcom.pc )
( cd usr/lib/pkgconfig ; rm -rf xulrunner-js.pc )
( cd usr/lib/pkgconfig ; ln -sf mozilla-js.pc xulrunner-js.pc )
( cd usr/lib/pkgconfig ; rm -rf xulrunner-nspr.pc )
( cd usr/lib/pkgconfig ; ln -sf mozilla-nspr.pc xulrunner-nspr.pc )
( cd usr/lib/pkgconfig ; rm -rf xulrunner-gtkmozembed-embedding.pc )
( cd usr/lib/pkgconfig ; ln -sf mozilla-gtkmozembed-embedding.pc xulrunner-gtkmozembed-embedding.pc )
( cd usr/lib/pkgconfig ; rm -rf xulrunner-nss.pc )
( cd usr/lib/pkgconfig ; ln -sf mozilla-nss.pc xulrunner-nss.pc )
( cd usr/lib ; rm -rf xulrunner-devel )
( cd usr/lib ; ln -sf xulrunner-devel-15.0.1 xulrunner-devel )
( cd usr/bin ; rm -rf xulrunner )
( cd usr/bin ; ln -sf /usr/lib/xulrunner-15.0.1/xulrunner xulrunner )
