~ubuntu-branches/ubuntu/raring/icedtea-web/raring

« back to all changes in this revision

Viewing changes to debian/PLUGIN7.postinst.in

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-02-04 18:19:46 UTC
  • mfrom: (1.1.16)
  • Revision ID: package-import@ubuntu.com-20120204181946-jngobgzz4mlen9yl
Tags: 1.2~pre1-0ubuntu1
* Update to hg 20120203, taken from the icedtea-web-1.2 release branch.
* Build separate plugin packages for OpenJDK 6 and OpenJDK 7, needed
  to provide the path to the runtime and the mime description in the plugin.
* Use icedtea-<jre version>-plugin as the name for both plugin packages.
* Remove icedtea-web-1.1.4-npapi-fix.patch, fixed upstream.
* Pass -n to gzip when compressing manpages to be Multi-Arch: same safe.
* Build multiarch packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -e
 
2
 
 
3
PATH=/sbin:/bin:/usr/sbin:/usr/bin
 
4
 
 
5
multiarch=@multiarch@
 
6
priority=@priority7@
 
7
browser_dirs="@browser_dirs@"
 
8
PLUGIN=@plugin_name@
 
9
basedir=/@base7dir@
 
10
old_basedir=/usr/lib/jvm/java-7/openjdk
 
11
PLUGINPTH=$basedir/jre/lib/@archdir@/$PLUGIN
 
12
 
 
13
case "$1" in
 
14
    configure)
 
15
        for browser_dir in $browser_dirs; do
 
16
            if [ $browser_dir = xulrunner-addons ]; then
 
17
                browser=xulrunner-1.9
 
18
            else
 
19
                browser=$browser_dir
 
20
            fi
 
21
 
 
22
            if [ -n "$multiarch" ] && [ "$DPKG_MAINTSCRIPT_ARCH" != $(dpkg --print-architecture) ]; then
 
23
                priority=$(expr $priority - 1)
 
24
            fi
 
25
 
 
26
            if [ -n "$multiarch" ] && [ -n "$2" ]; then
 
27
                if [ -n `update-alternatives --list $browser-javaplugin.so | grep "^$old_basedir/"` ]; then
 
28
                    update-alternatives --remove $browser-javaplugin.so $OLD_PLUGINPTH || true
 
29
                fi
 
30
            fi
 
31
 
 
32
            if [ -z `update-alternatives --list $browser-javaplugin.so | grep "^$basedir/"` ]; then
 
33
                update-alternatives --quiet --install \
 
34
                    /usr/lib/$browser_dir/plugins/libjavaplugin.so \
 
35
                    $browser-javaplugin.so \
 
36
                    $PLUGINPTH \
 
37
                    $priority
 
38
            fi
 
39
        done
 
40
esac
 
41
 
 
42
#DEBHELPER#
 
43
 
 
44
exit 0