#!/bin/sh # postinst script for opennx # # see: dh_installdeb(1) # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in configure|triggered) DTM=$(dpkg-architecture -qDEB_TARGET_MULTIARCH) if [ ! -f /usr/bin/nxclient ] ; then ln -snf /usr/lib/$DTM/opennx/bin/opennx /usr/bin/nxclient fi ln -snf /usr/share/opennx /usr/lib/$DTM/opennx/share ln -snf /usr/bin/nxproxy /usr/lib/$DTM/opennx/bin/nxproxy for l in smbclient cups opensc pulse ; do lp=`/sbin/ldconfig -p|awk '/lib'$l'[\.-]/ {print $4}'|head -1` if test -n "$lp" ; then bn=`echo $l|sed -e 's/[-0-9]//g'` ln -snf $lp /usr/lib/$DTM/opennx/lib/lib$l.so fi done # Install icons cd /usr/share/opennx/icons SIZES="16 32 48 128 256" ICINST="xdg-icon-resource install --noupdate --novendor --mode system" for sz in $SIZES ; do case $sz in scalable) subdir=$sz ext=svg ;; [0-9]*) subdir=${sz}x${sz} ext=png ;; esac for ctx in apps mimetypes ; do ( cd $subdir/$ctx for f in *.$ext ; do $ICINST --context $ctx --size $sz $f done ) done done xdg-icon-resource forceupdate # Install menu entries cd /usr/share/opennx/applnk/xdg xdg-desktop-menu install --novendor --mode system *.directory *.desktop ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0