debian/canfestival-virtual.postrm
author Edouard Tisserant
Thu, 24 Jan 2019 13:53:01 +0100
changeset 808 de1fc3261f21
parent 579 3126da40d469
permissions -rwxr-xr-x
Adding -fPIC isn't necessary of xeno-config is set correctly. Backed out changeset b9f1fcda7d30
531
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
     1
#!/bin/sh
579
3126da40d469 Fixed : postrm bug when upgrade package
greg
parents: 533
diff changeset
     2
# postrm script for canfestival
531
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
     3
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
     4
set -e
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
     5
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
     6
DLL_LIST=
579
3126da40d469 Fixed : postrm bug when upgrade package
greg
parents: 533
diff changeset
     7
CF_CONFIG_DIR=/usr/share/CanFestival-3/objdictgen/
531
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
     8
CF_CONFIG=/usr/share/CanFestival-3/objdictgen/canfestival_config.py
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
     9
CF_CONFIG_TEMP=/usr/share/CanFestival-3/objdictgen/canfestival_config_ori.py
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
    10
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
    11
case "$1" in
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
    12
    configure)
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
    13
    ;;
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
    14
	
579
3126da40d469 Fixed : postrm bug when upgrade package
greg
parents: 533
diff changeset
    15
    purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
3126da40d469 Fixed : postrm bug when upgrade package
greg
parents: 533
diff changeset
    16
    
3126da40d469 Fixed : postrm bug when upgrade package
greg
parents: 533
diff changeset
    17
    if [ -d $CF_CONFIG_DIR ];then
3126da40d469 Fixed : postrm bug when upgrade package
greg
parents: 533
diff changeset
    18
	    ldconfig
3126da40d469 Fixed : postrm bug when upgrade package
greg
parents: 533
diff changeset
    19
	    # Find canfestival driver library in /usr/lib
3126da40d469 Fixed : postrm bug when upgrade package
greg
parents: 533
diff changeset
    20
	    cd /usr/lib
3126da40d469 Fixed : postrm bug when upgrade package
greg
parents: 533
diff changeset
    21
		for file in `ls libcanfestival_can* 2>/dev/null`
3126da40d469 Fixed : postrm bug when upgrade package
greg
parents: 533
diff changeset
    22
		do
3126da40d469 Fixed : postrm bug when upgrade package
greg
parents: 533
diff changeset
    23
			DLL_LIST="'$file',""$DLL_LIST"
3126da40d469 Fixed : postrm bug when upgrade package
greg
parents: 533
diff changeset
    24
		done
3126da40d469 Fixed : postrm bug when upgrade package
greg
parents: 533
diff changeset
    25
		
3126da40d469 Fixed : postrm bug when upgrade package
greg
parents: 533
diff changeset
    26
		# copy template config and add the DLL_LIST 
3126da40d469 Fixed : postrm bug when upgrade package
greg
parents: 533
diff changeset
    27
		# do this to display available canfestival plugin list choice in beremiz
3126da40d469 Fixed : postrm bug when upgrade package
greg
parents: 533
diff changeset
    28
		cat $CF_CONFIG_TEMP > $CF_CONFIG
3126da40d469 Fixed : postrm bug when upgrade package
greg
parents: 533
diff changeset
    29
		echo "DLL_LIST=[$DLL_LIST]" >> $CF_CONFIG
3126da40d469 Fixed : postrm bug when upgrade package
greg
parents: 533
diff changeset
    30
	fi
531
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
    31
	;;
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
    32
    
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
    33
    *)
579
3126da40d469 Fixed : postrm bug when upgrade package
greg
parents: 533
diff changeset
    34
        echo "postrm called with unknown argument \`$1'" >&2
531
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
    35
        exit 1
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
    36
    ;;
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
    37
esac
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
    38
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
    39
# dh_installdeb will replace this with shell code automatically
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
    40
# generated by other debhelper scripts.
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
    41
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
    42
#DEBHELPER#
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
    43
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
    44
exit 0
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
    45
f912f8d26e98 updated : debian package scripts
greg
parents:
diff changeset
    46