~ubuntu-branches/ubuntu/vivid/mplayerplug-in/vivid

« back to all changes in this revision

Viewing changes to install.sh

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2005-09-16 14:46:55 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050916144655-f38cmp9o3kwepjl5
Tags: 3.05-1ubuntu1
* Sync with debian
* Build against gtk2
* Adjusted Build-Depends / Depends for firefox

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
cp $2 $3
 
1
#!/bin/bash
 
2
 
 
3
SHAREDTARGET=mplayerplug-in
 
4
INSTALL='/usr/bin/install -c'
 
5
prefix=/usr
 
6
exec_prefix=${prefix}
 
7
sysconfdir=${prefix}/etc
 
8
libdir=${exec_prefix}/lib
 
9
datadir=${prefix}/share
 
10
LOCALEDIR=${datadir}/locale
 
11
DESTDIR=$1
 
12
 
 
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
 
18
        do
 
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 
 
21
        done
 
22
        make install -C po LOCALEDIR="${LOCALEDIR}" INSTALL="$INSTALL" DESTDIR="$DESTDIR"
 
23
 
 
24
else 
 
25
 
 
26
        if [ `whoami` != 'root' ]; then
 
27
                
 
28
                echo "Installing for user `whoami`"
 
29
                for mod in     mplayerplug-in mplayerplug-in-wmp mplayerplug-in-qt mplayerplug-in-rm mplayerplug-in-gmp
 
30
                do
 
31
                        $INSTALL -D -m0755 ${mod}.so ${HOME}/.mozilla/plugins/${mod}.so 
 
32
                        $INSTALL -D -m0755 Source/nsIScriptableMplayerPlugin.xpt ${HOME}/.mozilla/plugins/${mod}.xpt 
 
33
                done
 
34
                $INSTALL -D -m0644 mplayerplug-in.conf ${HOME}/.mozilla/mplayerplug-in.conf 
 
35
                $INSTALL -D -m0644 mplayerplug-in.types ${HOME}/.mozilla/mplayerplug-in.types 
 
36
 
 
37
        else
 
38
                echo "Installing plugin system wide"
 
39
                # system install code
 
40
                MOZ=`which mozilla`
 
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
 
50
                do
 
51
                        $INSTALL -D -m0755 ${mod}.so ${DEST}/${mod}.so 
 
52
                        $INSTALL -D -m0755 Source/nsIScriptableMplayerPlugin.xpt ${DEST}/${mod}.xpt 
 
53
                done
 
54
                $INSTALL -D -m0644 mplayerplug-in.conf /etc/mplayerplug-in.conf 
 
55
                $INSTALL -D -m0644 mplayerplug-in.types /etc/mplayerplug-in.types 
 
56
                make install -C po 
 
57
        fi
 
58
fi
 
59