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
13
if [ "$DESTDIR" ]; then
14
echo "Installing to $DESTDIR"
15
$INSTALL -D -m0644 mplayerplug-in.conf ${DESTDIR}/etc/mplayerplug-in.conf
16
$INSTALL -D -m0644 mplayerplug-in.types ${DESTDIR}/etc/mplayerplug-in.types
17
for mod in mplayerplug-in mplayerplug-in-wmp mplayerplug-in-qt mplayerplug-in-rm mplayerplug-in-gmp
19
$INSTALL -D -m0755 ${mod}.so ${DESTDIR}${libdir}/mozilla/plugins/${mod}.so
20
$INSTALL -D -m0755 Source/nsIScriptableMplayerPlugin.xpt ${DESTDIR}${libdir}/mozilla/plugins/${mod}.xpt
22
make install -C po LOCALEDIR="${LOCALEDIR}" INSTALL="$INSTALL" DESTDIR="$DESTDIR"
26
if [ `whoami` != 'root' ]; then
28
echo "Installing for user `whoami`"
29
for mod in mplayerplug-in mplayerplug-in-wmp mplayerplug-in-qt mplayerplug-in-rm mplayerplug-in-gmp
31
$INSTALL -D -m0755 ${mod}.so ${HOME}/.mozilla/plugins/${mod}.so
32
$INSTALL -D -m0755 Source/nsIScriptableMplayerPlugin.xpt ${HOME}/.mozilla/plugins/${mod}.xpt
34
$INSTALL -D -m0644 mplayerplug-in.conf ${HOME}/.mozilla/mplayerplug-in.conf
35
$INSTALL -D -m0644 mplayerplug-in.types ${HOME}/.mozilla/mplayerplug-in.types
38
echo "Installing plugin system wide"
41
MOZHOME=`grep MOZILLA_FIVE_HOME= ${MOZ} | awk -F \" '{ print $2 }'`
42
if [ -z ${MOZHOME} ]; then MOZHOME=`grep moz_libdir= ${MOZ} | awk -F \" '{ print $2 }'`; fi
43
MOZPLUGINS=`grep MOZ_PLUGIN_PATH ${MOZ} | awk -F = '{ print $2 }' | awk -F : '{ if ( $1 != "") if ( index($1,"_PLUGIN_") == 0) print $1 }'`
44
if [ ${MOZHOME} ]; then DEST=${MOZHOME}/plugins; fi
45
if [ ${MOZPLUGINS} ]; then DEST=${MOZPLUGINS}; fi
46
if [ -z ${DEST} ]; then echo "Can't find MOZILLA HOME. Please install manually"; exit 1; fi
47
echo "Installing into ${DEST}"
48
if [ ! -d ${DEST} ]; then mkdir ${DEST}; fi
49
for mod in mplayerplug-in mplayerplug-in-wmp mplayerplug-in-qt mplayerplug-in-rm mplayerplug-in-gmp
51
$INSTALL -D -m0755 ${mod}.so ${DEST}/${mod}.so
52
$INSTALL -D -m0755 Source/nsIScriptableMplayerPlugin.xpt ${DEST}/${mod}.xpt
54
$INSTALL -D -m0644 mplayerplug-in.conf /etc/mplayerplug-in.conf
55
$INSTALL -D -m0644 mplayerplug-in.types /etc/mplayerplug-in.types