[SCM] Debian package of greed branch, master, updated. upstream/3.6-69-gfee6618
Josue Abarca
jmaslibre at debian.org.gt
Wed Nov 16 03:52:55 UTC 2011
The following commit has been merged in the master branch:
commit fee66187c4cbade8ba5c2bd1aef8d63aee5a899c
Author: Josue Abarca <jmaslibre at debian.org.gt>
Date: Tue Nov 15 21:24:25 2011 -0600
+ * debian/postinst and debian/postrm were rewritten in to properly handle
+ the transition to the new format of the score file.
* debian/postinst and debian/postrm were rewritten in order to properly handle
the transition to the new format of the score file.
* debian/changelog updated.
diff --git a/debian/changelog b/debian/changelog
index e81ed15..de84584 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,13 +2,15 @@ greed (3.7-1) unstable; urgency=low
* Imported Upstream version 3.7.
* debian/patch/fix_quit_option.diff removed because the bug was fixed by
- upstreamer.
+ upstream.
* debian/patch/fix_quit_option.diff removed because the bug was fixed by
- upstreamer.
+ upstream.
* debian/patch/Makefile.diff updated.
* debian/copyright
- The license has been changed from GPL-2 to BSD-3-clause.
- Updated as per the latest version of the DEP-5 specification.
+ * debian/postinst and debian/postrm were rewritten in to properly handle
+ the transition to the new format of the score file.
-- Josue Abarca <jmaslibre at debian.org.gt> Wed, 26 Jan 2011 00:56:19 -0600
diff --git a/debian/postinst b/debian/postinst
index ba6d19d..c1d3c7e 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -1,20 +1,59 @@
#!/bin/sh
+# postinst script for greed
+#
+# see: dh_installdeb(1)
+
set -e
-#DEBHELPER#
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <postinst> `abort-remove'
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
-# none of the following checks script arguments because it's all
-# harmless and can be done repeatedly without danger.
-# Create empty hi-score files if needed
-cd /var/games/greed/
+case "$1" in
+ configure)
+ SCOREFILE="/var/games/greed/greed.hs"
+ if [ "$2" != "" ]; then
+ # Old score files are now incompatible
+ if dpkg --compare-versions "$2" lt "3.7-1"; then
+ if [ -f $SCOREFILE ]; then
+ echo -n "Preserving user scores to $SCOREFILE.dpkg-old..."
+ mv -f "$SCOREFILE" "$SCOREFILE".dpkg-old
+ echo "done."
+ fi
+ fi
+ fi
+ if [ ! -e $SCOREFILE ]; then
+ touch $SCOREFILE
+ fi
+ # Debian Policy 11.11
+ # Set permissions, owner and group (fixes permissions of pre 3.4-2 files)
+ chown root:games $SCOREFILE
+ chmod 664 $SCOREFILE
+ ;;
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
-if [ ! -e greed.hs ]; then
- touch greed.hs
-fi
-# Debian Policy 11.11
-# Set permissions, owner and group (fixes permissions of pre 3.4-2 files)
-chown root:games greed.hs
-chmod 664 greed.hs
+ *)
+ 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
diff --git a/debian/postrm b/debian/postrm
index f56da4a..86303ff 100644
--- a/debian/postrm
+++ b/debian/postrm
@@ -1,8 +1,62 @@
#!/bin/sh
+# postrm script for greed
+#
+# see: dh_installdeb(1)
+
set -e
-if [ "$1" = "purge" ]; then
- rm -rf /var/games/greed
-fi
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <overwriter>
+# <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ purge)
+ SCOREFILE="/var/games/greed/greed.hs"
+ OLDSCOREFILE="/var/games/greed/greed.hs.dpkg-old"
+ NEWSCOREFILE="/var/games/greed/greed.hs.dpkg-new"
+ if [ -f $SCOREFILE ]; then
+ rm -rf $SCOREFILE
+ fi
+ if [ -f $OLDSCOREFILE ]; then
+ rm -rf $OLDSCOREFILE
+ fi
+ if [ -f $NEWSCOREFILE ]; then
+ rm -rf $OLDSCOREFILE
+ fi
+ ;;
+ upgrade)
+ if [ "$2" != "" ]; then
+ if dpkg --compare-versions "$2" lt "3.7-1"; then
+ if [ -f $SCOREFILE ]; then
+ echo -n "Preserving user scores to $SCOREFILE.dpkg-new..."
+ mv -f "$SCOREFILE" "$SCOREFILE".dpkg-new
+ echo "done."
+ fi
+ fi
+ fi
+ ;;
+ remove|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "postrm 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
--
Debian package of greed
More information about the Pkg-games-commits
mailing list