~ubuntu-branches/ubuntu/wily/mplayerplug-in/wily

« back to all changes in this revision

Viewing changes to .#install.sh.1.25

  • Committer: Bazaar Package Importer
  • Author(s): Cesare Tirabassi
  • Date: 2008-07-06 23:35:53 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20080706233553-tfxk1bnjr8uewq0c
Tags: 3.55-1ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
  - debian/control
    + replace iceweasel with firefox3.0 | firefox 2
    + replace iceape-browser with seamonkey-browser
    + add Depends on | mplayer-nogui (>= 1.0~rc2)
    + add Xb-Npp-xxx tags accordingly to "firefox distro add-on support"
      spec
    + Modify Maintainer value to match the DebianMaintainerField
      specification.
  - debian/mozilla-mplayer.links:
    + add firefox and xulrunner symlinks
* Replace iceape-dev b-d with libxul-dev.
* Add xulrunner in lists of possible "browsers".
* Following upstream suggestion, change required mplayer version
  to be (>= 1.0~rc2).

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
MOZHOME=/usr/lib/firefox-1.5.0.9/plugins
13
 
 
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
19
 
        do
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 
22
 
        done
23
 
        make install -C po LOCALEDIR="${LOCALEDIR}" INSTALL="$INSTALL" DESTDIR="$DESTDIR"
24
 
 
25
 
else 
26
 
 
27
 
        if [ `whoami` != 'root' ]; then
28
 
                
29
 
                echo "Installing for user `whoami`"
30
 
                for mod in     mplayerplug-in mplayerplug-in-wmp mplayerplug-in-qt mplayerplug-in-rm mplayerplug-in-dvx
31
 
                do
32
 
                        $INSTALL -D -m0755 ${mod}.so ${HOME}/.mozilla/plugins/${mod}.so 
33
 
                        $INSTALL -D -m0755 Source/nsIScriptableMplayerPlugin.xpt ${HOME}/.mozilla/plugins/${mod}.xpt 
34
 
                done
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 
37
 
 
38
 
        else
39
 
                echo "Installing plugin system wide"
40
 
                # system install code
41
 
                if [ -z ${MOZHOME} ]; then
42
 
                    MOZ=`which mozilla`
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
49
 
                else
50
 
                    DEST=${MOZHOME}
51
 
                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
56
 
                do
57
 
                        $INSTALL -D -m0755 ${mod}.so ${DEST}/${mod}.so 
58
 
                        $INSTALL -D -m0755 Source/nsIScriptableMplayerPlugin.xpt ${DEST}/${mod}.xpt 
59
 
                done
60
 
                $INSTALL -b -D -m0644 mplayerplug-in.conf /etc/mplayerplug-in.conf 
61
 
                $INSTALL -b -D -m0644 mplayerplug-in.types /etc/mplayerplug-in.types 
62
 
                make install -C po 
63
 
        fi
64
 
fi
65