3
SHAREDTARGET=mplayerplug-in
4
INSTALL='/usr/bin/install -c'
7
sysconfdir=${prefix}/etc
8
libdir=${exec_prefix}/lib
9
datadir=${prefix}/share
10
LOCALEDIR=${datadir}/locale
12
MOZHOME=/usr/lib/firefox-1.5.0.9/plugins
14
if [ "$DESTDIR" ]; then
15
echo "Installing to $DESTDIR"
16
$INSTALL -b -D -m0644 mplayerplug-in.conf ${DESTDIR}/etc/mplayerplug-in.conf
17
$INSTALL -b -D -m0644 mplayerplug-in.types ${DESTDIR}/etc/mplayerplug-in.types
18
for mod in mplayerplug-in mplayerplug-in-wmp mplayerplug-in-qt mplayerplug-in-rm mplayerplug-in-dvx
20
$INSTALL -D -m0755 ${mod}.so ${DESTDIR}${libdir}/mozilla/plugins/${mod}.so
21
$INSTALL -D -m0755 Source/nsIScriptableMplayerPlugin.xpt ${DESTDIR}${libdir}/mozilla/plugins/${mod}.xpt
23
make install -C po LOCALEDIR="${LOCALEDIR}" INSTALL="$INSTALL" DESTDIR="$DESTDIR"
27
if [ `whoami` != 'root' ]; then
29
echo "Installing for user `whoami`"
30
for mod in mplayerplug-in mplayerplug-in-wmp mplayerplug-in-qt mplayerplug-in-rm mplayerplug-in-dvx
32
$INSTALL -D -m0755 ${mod}.so ${HOME}/.mozilla/plugins/${mod}.so
33
$INSTALL -D -m0755 Source/nsIScriptableMplayerPlugin.xpt ${HOME}/.mozilla/plugins/${mod}.xpt
35
$INSTALL -b -D -m0644 mplayerplug-in.conf ${HOME}/.mozilla/mplayerplug-in.conf
36
$INSTALL -b -D -m0644 mplayerplug-in.types ${HOME}/.mozilla/mplayerplug-in.types
39
echo "Installing plugin system wide"
41
if [ -z ${MOZHOME} ]; then
43
MOZHOME=`grep MOZILLA_FIVE_HOME= ${MOZ} | awk -F \" '{ print $2 }'`
44
if [ -z ${MOZHOME} ]; then MOZHOME=`grep moz_libdir= ${MOZ} | awk -F \" '{ print $2 }'`; fi
45
if [ -z ${MOZHOME} ]; then MOZHOME=`grep moz_libdir= ${MOZ} | awk -F = '{ print $2 }'`; fi
46
MOZPLUGINS=`grep MOZ_PLUGIN_PATH ${MOZ} | awk -F = '{ print $2 }' | awk -F : '{ if ( $1 != "") if ( index($1,"_PLUGIN_") == 0) print $1 }'`
47
if [ ${MOZHOME} ]; then DEST=${MOZHOME}/plugins; fi
48
if [ ${MOZPLUGINS} ]; then DEST=${MOZPLUGINS}; fi
52
if [ -z ${DEST} ]; then echo "Can't find MOZILLA HOME. Please install manually"; exit 1; fi
53
echo "Installing into ${DEST}"
54
if [ ! -d ${DEST} ]; then mkdir ${DEST}; fi
55
for mod in mplayerplug-in mplayerplug-in-wmp mplayerplug-in-qt mplayerplug-in-rm mplayerplug-in-dvx
57
$INSTALL -D -m0755 ${mod}.so ${DEST}/${mod}.so
58
$INSTALL -D -m0755 Source/nsIScriptableMplayerPlugin.xpt ${DEST}/${mod}.xpt
60
$INSTALL -b -D -m0644 mplayerplug-in.conf /etc/mplayerplug-in.conf
61
$INSTALL -b -D -m0644 mplayerplug-in.types /etc/mplayerplug-in.types