1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-28 05:29:48 +00:00
freebsd-ports/www/mozex/pkg-install.xpi
Joe Marcus Clarke 29747f458a Chase the GNOME X11BASE to LOCALBASE move, and fix the build with the
new freetype2 where needed.

Submitted by:	mezz, ahze, pav, and many others
Approved by:	portmgr (implicit, kris)
2006-10-14 08:54:54 +00:00

57 lines
1.3 KiB
Bash

#!/bin/sh
#
# $FreeBSD$
#
# Date created: Mon Oct 27, 2003
# Whom: Thierry Thomas (<thierry@pompo.net>)
# Register the extension $1 in the chrome registry for the browser %%GECKO%%.
umask 022
PATH=/bin:/usr/bin
[ "x$1" = "x" ] && exit 1
[ "x$2" = "xPRE-INSTALL" ] && exit 0
[ "x$2" = "xDEINSTALL" ] && exit 0
PREFIX=${PKG_PREFIX:-/usr/local}
PKG_NAME=${1%%-[0-9._]*}
MOZDIR=$PREFIX/lib/%%GECKO%%
REGXPCOM=$MOZDIR/regxpcom
REGCHROME=$MOZDIR/regchrome
if [ "x$2" = "xPOST-DEINSTALL" ]; then
case $PKG_NAME in
fr-mozilla-flp)
MODEXT="FR.jar fr-unix.jar"
;;
*)
MODEXT=$PKG_NAME
;;
esac
# Removing definition of extension $MODEXT
for mod in $MODEXT; do
sed -i .bak -e "/$mod/d" $MOZDIR/chrome/installed-chrome.txt
done
fi
echo "===> Re-building Chrome's registry..."
rm -rf $MOZDIR/chrome/overlayinfo
rm -f $MOZDIR/chrome/*.rdf
mkdir -p $MOZDIR/chrome/overlayinfo
rm -f $MOZDIR/component.reg
LD_LIBRARY_PATH=$MOZDIR MOZILLA_FIVE_HOME=$MOZDIR $MOZDIR/regxpcom || true
LD_LIBRARY_PATH=$MOZDIR MOZILLA_FIVE_HOME=$MOZDIR $MOZDIR/regchrome || true
if [ -d "$MOZDIR/searchplugins" ]; then
chmod -R u+w "$MOZDIR/searchplugins"
fi
#touch $MOZDIR/chrome/user-skins.rdf $MOZDIR/chrome/user-locales.rdf
[ "x$2" = "xPOST-INSTALL" ] || rm $MOZDIR/chrome/installed-chrome.txt.bak
exit 0