updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / thinliquidfilm / thinliquidfilm.install
blob7c0b91838e0e6c97785f1dff6adb9cd750c82a7c
1 # arg 1:  the new package version
2 post_install() {
3   pacman -Q mplayer &>/dev/null
4   hasmplayer=$?
5   pacman -Q kdebase &>/dev/null
6   haskonqueror=$?
7   # reminder notice
8   if [ $hasmplayer -eq 1 ]; then
9     echo ">>>"
10     echo ">>> Couldn't find mplayer."
11     echo ">>> Without mplayer, you will not be able to preview encoded videos."
12     echo ">>>"
13   fi
14   if [ $haskonqueror -eq 1 ]; then
15     echo ">>>"
16     echo ">>> Couldn't find konqueror. Servicemenus will not be installed."
17     echo ">>>"
18   else
19     cat << EOF > /opt/kde/share/apps/konqueror/servicemenus/thinliquidfilm.desktop
20 [Desktop Action thinliquidfilm]
21 Exec=thinliquidfilm %U
22 Icon=/usr/share/thinliquidfilm/ipod_mount.png
23 Name=Add to thinliquidfilm
24 Name[it]=Aggiungi a thinliquidfilm
26 [Desktop Entry]
27 Actions=thinliquidfilm
28 Icon=/usr/share/thinliquidfilm/ipod_mount.png
29 Name=Add to thinliquidfilm
30 Name[it]=Aggiungi a thinliquidfilm
31 ServiceTypes=video/*
32 EOF
33   fi
36 # arg 1:  the new package version
37 # arg 2:  the old package version
38 post_upgrade() {
39   post_install $1
42 # arg 1:  the old package version
43 post_remove() {
44   pacman -Q kdebase &>/dev/null
45   haskonqueror=$?
46   if [ $haskonqueror -eq 0 ]; then
47     rm /opt/kde/share/apps/konqueror/servicemenus/thinliquidfilm.desktop
48   fi
51 op=$1
52 shift
53 [ "$(type -t "$op")" = "function" ] && $op "$@"