diff options
Diffstat (limited to 'extra/gnome-games/gnome-games.install')
-rw-r--r-- | extra/gnome-games/gnome-games.install | 59 |
1 files changed, 14 insertions, 45 deletions
diff --git a/extra/gnome-games/gnome-games.install b/extra/gnome-games/gnome-games.install index 1f67c2e01..aaa36a896 100644 --- a/extra/gnome-games/gnome-games.install +++ b/extra/gnome-games/gnome-games.install @@ -1,5 +1,4 @@ -pkgname=gnome-games -scores=(glines.Large.scores +_scores=(glines.Large.scores glines.Medium.scores glines.Small.scores gnibbles.1.0.scores @@ -88,66 +87,36 @@ scores=(glines.Large.scores quadrapassel.scores) post_install() { - usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas - usr/sbin/gconfpkg --install ${pkgname} + glib-compile-schemas usr/share/glib-2.0/schemas update-desktop-database -q gtk-update-icon-cache -q -t -f usr/share/icons/hicolor - for sz in Large Medium Small; do - if [ -e "opt/gnome/var/games/same-gnome.${sz}.scores" ]; then - mv "opt/gnome/var/games/same-gnome.${sz}.scores" \ - "var/games/swell-foop.${sz}.scores" - elif [ -e "var/games/same-gnome.${sz}.scores" ]; then - mv "var/games/same-gnome.${sz}.scores" \ - "var/games/swell-foop.${sz}.scores" - fi - done - if [ -e "opt/gnome/var/games/gnometris.scores" ]; then - mv "opt/gnome/var/games/gnometris.scores" \ - "var/games/quadrapassel.scores" - elif [ -e "var/games/gnometris.scores" ]; then - mv "var/games/gnometris.scores" \ - "var/games/quadrapassel.scores" - fi - - for score in "${scores[@]}" ; do - if [ -e "var/games/${score}" ]; then + for score in "${_scores[@]}" ; do + if [ -e "var/games/$score" ]; then continue fi - if [ -e "opt/gnome/var/games/${score}" ]; then - mv "opt/gnome/var/games/${score}" var/games/ - else - touch "var/games/${score}" - fi - chown root:games "var/games/${score}" - chmod 664 "var/games/${score}" + + touch "var/games/$score" + chown root:games "var/games/$score" + chmod 664 "var/games/$score" done } pre_upgrade() { - pre_remove $1 + (( $(vercmp $2 3.3.5) < 0 )) && gconfpkg --uninstall gnome-games + return 0 } post_upgrade() { - post_install $1 -} - -pre_remove() { - usr/sbin/gconfpkg --uninstall ${pkgname} - - if [ -f usr/share/ggz/gnect-client.dsc ]; then - ggz-config -r -m usr/share/ggz/gnect-client.dsc >& /dev/null - ggz-config -r -m usr/share/ggz/gnibbles-client.dsc >& /dev/null - ggz-config -r -m usr/share/ggz/iagno-client.dsc >& /dev/null - fi + post_install } post_remove() { - usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas + glib-compile-schemas usr/share/glib-2.0/schemas update-desktop-database -q gtk-update-icon-cache -q -f -t usr/share/icons/hicolor - for score in "${scores[@]}" ; do - rm -f "var/games/${score}" + for score in "${_scores[@]}" ; do + rm -f "var/games/$score" done } |