Changeset 6181


Ignore:
Timestamp:
Nov 6, 2017, 5:22:06 PM (2 years ago)
Author:
kbut
Message:

add diversions

Location:
lliurex-dgti-defaults-configs/trunk/fuentes/debian
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • lliurex-dgti-defaults-configs/trunk/fuentes/debian/postinst

    r6175 r6181  
    1818# the debian-policy package
    1919
     20package='lliurex-dgti-defaults-configs'
     21
     22divert_file()
     23{
     24    file=$1
     25    theirfile=$2
     26    if ! LC_ALL=C dpkg-divert --list "$package" | \
     27        grep -xFq "diversion of $file to $theirfile by $package"; then
     28        dpkg-divert --divert "$theirfile" --rename --package "$package" --add "$file"
     29    fi
     30}
     31
    2032
    2133case "$1" in
    22     configure)
     34    configure | abort-remove )
     35        divert_file /usr/bin/firefox /usr/bin/firefox-last
     36        divert_file /usr/share/applications/firefox-esr.desktop /usr/share/applications/firefox-esr.desktop.diverted
     37        if [ ! -e '/usr/bin/firefox' ]; then
     38                ln -s /opt/firefox-esr/firefox /usr/bin/firefox
     39        fi
     40        alternative=$(readlink -f /etc/alternatives/java)
     41        oracle_value='/usr/lib/jvm/java-8-oracle/jre/bin/java'
     42        if [ '$alternative' != $oracle_value ]; then
     43                update-alternative --set java $oracle_value
     44        fi
     45        alternative=$(readlink -f /etc/alternatives/mozilla-javaplugin.so)
     46        oracle_value='/usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so'
     47        if [ '$alternative' != $oracle_value ]; then
     48                update-alternative --set mozilla-javaplugin.so $oracle_value
     49        fi
     50        alternative=$(readlink -f /etc/alternatives/javaws)
     51        oracle_value='/usr/lib/jvm/java-8-oracle/jre/bin/javaws'
     52        if [ '$alternative' != $oracle_value ]; then
     53                update-alternative --set javaws $oracle_value
     54        fi
    2355    ;;
    2456
    25     abort-upgrade|abort-remove|abort-deconfigure)
     57    abort-upgrade|abort-deconfigure)
    2658    ;;
    2759
  • lliurex-dgti-defaults-configs/trunk/fuentes/debian/prerm

    r6175 r6181  
    1717# the debian-policy package
    1818
     19package='lliurex-dgti-defaults-configs'
     20
     21undivert()
     22{
     23    file="$1"
     24    if [ ! -L "$file" ] && [ ! -e "$file" ]; then
     25        dpkg-divert --remove --rename --package "$package" "$file"
     26    else
     27        echo "Not removing diversion of $file by $package" >&2
     28    fi
     29}
     30
     31
    1932
    2033case "$1" in
    2134    remove|upgrade|deconfigure)
     35        undivert /usr/bin/firefox
     36        undivert /usr/share/applications/firefox-esr.desktop
     37
     38        alternative=$(readlink -f /etc/alternatives/java)
     39        oracle_value='/usr/lib/jvm/java-8-oracle/jre/bin/java'
     40        if [ '$alternative' = $oracle_value ]; then
     41                update-alternative --auto java
     42        fi
     43        alternative=$(readlink -f /etc/alternatives/mozilla-javaplugin.so)
     44        oracle_value='/usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so'
     45        if [ '$alternative' = $oracle_value ]; then
     46                update-alternative --auto mozilla-javaplugin.so
     47        fi
     48        alternative=$(readlink -f /etc/alternatives/javaws)
     49        oracle_value='/usr/lib/jvm/java-8-oracle/jre/bin/javaws'
     50        if [ '$alternative' = $oracle_value ]; then
     51                update-alternative --auto javaws
     52        fi
    2253    ;;
    2354
  • lliurex-dgti-defaults-configs/trunk/fuentes/debian/rules

    r6175 r6181  
    1616
    1717%:
    18         dh $@ --with=config-package
     18        dh $@
    1919
    2020# dh_make generated override targets
Note: See TracChangeset for help on using the changeset viewer.