From 2a61dffe127e22c1aaf955db6f085ac2eefbebba Mon Sep 17 00:00:00 2001 From: Manoj Srivastava Date: Wed, 27 Jan 2016 10:45:26 -0800 Subject: Packaging cleanup Git development has moved to github, moved away from lua to C++, and made a tonne of changes. This release is just making a few cleanups to prepare for the major update. Signed-off-by: Manoj Srivastava --- debian/Tome.sh | 0 debian/changelog | 8 + debian/control | 6 +- debian/patches/0001-debcherry-fixup-patch.patch | 80 ------- ...ich-needed-a-32-bit-int-to-not-use-int-lo.patch | 58 ----- ...e-fixes-Change-install-paths-to-FHS-compl.patch | 63 ----- debian/patches/series | 4 - debian/postinst | 253 --------------------- debian/postrm | 175 -------------- debian/preinst | 103 --------- debian/prerm | 133 ----------- debian/rules | 8 +- debian/source/format | 2 +- debian/tome.postinst | 253 +++++++++++++++++++++ debian/tome.postrm | 175 ++++++++++++++ debian/tome.preinst | 103 +++++++++ debian/tome.prerm | 133 +++++++++++ debian/watch | 5 - 18 files changed, 680 insertions(+), 882 deletions(-) mode change 100755 => 100644 debian/Tome.sh delete mode 100644 debian/patches/0001-debcherry-fixup-patch.patch delete mode 100644 debian/patches/0002-Fix-code-which-needed-a-32-bit-int-to-not-use-int-lo.patch delete mode 100644 debian/patches/0003-debian-cmake-fixes-Change-install-paths-to-FHS-compl.patch delete mode 100644 debian/patches/series delete mode 100755 debian/postinst delete mode 100755 debian/postrm delete mode 100755 debian/preinst delete mode 100755 debian/prerm create mode 100644 debian/tome.postinst create mode 100644 debian/tome.postrm create mode 100644 debian/tome.preinst create mode 100644 debian/tome.prerm delete mode 100644 debian/watch diff --git a/debian/Tome.sh b/debian/Tome.sh old mode 100755 new mode 100644 diff --git a/debian/changelog b/debian/changelog index 22735270..0c64929e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +tome (2.3.11-ah-3) unstable; urgency=low + + * Update standards version to 3.9.6. No changes needed + * Update the VCS-* fields in the control file to use https + * Move to source format 1.0 and use dgit to release + + -- Manoj Srivastava Wed, 27 Jan 2016 10:43:27 -0800 + tome (2.3.11-ah-2) unstable; urgency=low * Modified the install paths to deploy to the FHS compliant diff --git a/debian/control b/debian/control index 65950528..73401acc 100644 --- a/debian/control +++ b/debian/control @@ -1,6 +1,6 @@ Source: tome -VCS-Git: git://anonscm.debian.org/users/srivasta/debian/tome.git -VCS-Browser: http://anonscm.debian.org/gitweb/?p=users/srivasta/debian/tome.git;a=summary +VCS-Git: https://anonscm.debian.org/git/users/srivasta/debian/tome.git +VCS-Browser: https://anonscm.debian.org/gitweb/?p=users/srivasta/debian/tome.git;a=summary Section: non-free/games Priority: optional Maintainer: Manoj Srivastava @@ -9,7 +9,7 @@ Build-Depends: libxaw7-dev, debhelper (>= 9.0.0), libsdl1.2-dev | libsdl-dev, libsdl-mixer1.2-dev, libsdl-gfx1.2-dev, libsdl-image1.2-dev, libsdl-ttf2.0-dev, libsdl-net1.2-dev, dpkg-dev (>= 1.16.0), cmake -Standards-Version: 3.9.5.0 +Standards-Version: 3.9.6 Package: tome Architecture: any diff --git a/debian/patches/0001-debcherry-fixup-patch.patch b/debian/patches/0001-debcherry-fixup-patch.patch deleted file mode 100644 index 28c45ba4..00000000 --- a/debian/patches/0001-debcherry-fixup-patch.patch +++ /dev/null @@ -1,80 +0,0 @@ -From c1f79e5b7f2dc335983ba7df981b5d45170295fb Mon Sep 17 00:00:00 2001 -From: Manoj Srivastava -Date: Wed, 14 May 2014 23:48:09 -0700 -Subject: [PATCH 1/3] debcherry fixup patch - -32318ec [master]: New upstream release - - no changes against upstream or conflicts -786d26c [master]: New upstream release - - extra changes or conflicts -36e907c [topic--debian]: FTBFS due to binutils-gold - - extra changes or conflicts -1021e15 [master]: First phase of a ove to a new build system using dh. - - no changes against upstream or conflicts -23433b4 Added the debian submodule. - - extra changes or conflicts -b15c77f Reduce divergence from upstream, and move to sdl variant - - extra changes or conflicts -815d966 Set the maintainewr address to be a debian role address - - no changes against upstream or conflicts -a83a04d Fix typo in man page - - extra changes or conflicts -a3d690b Revert the -m32 flags; use linux32 instead at run-time - - extra changes or conflicts -79cab02 Build in 32bit mode - - extra changes or conflicts -de0507e Fix initialization of directory for loading/saving games. - - extra changes or conflicts -ae5a5b4 Really synch with upstream - - extra changes or conflicts -a2f1a5c Added a manual page - - extra changes or conflicts -18bd448 Changes to integrate tome into Debian - - extra changes or conflicts ---- - src/config.h | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/config.h b/src/config.h -index 7c1cf1d..c9f460e 100644 ---- a/src/config.h -+++ b/src/config.h -@@ -89,7 +89,7 @@ - /* - * OPTION: Include "ncurses.h" instead of "curses.h" in "main-gcu.c" - */ --/* #define USE_NCURSES */ -+#define USE_NCURSES - - - /* -@@ -226,7 +226,7 @@ - * that file. - */ - #ifndef DEFAULT_PATH --# define DEFAULT_PATH "./lib/" -+# define DEFAULT_PATH "/var/games/tome" - #endif - - -@@ -261,7 +261,7 @@ - /* - * OPTION: Person to bother if something goes wrong. - */ --#define MAINTAINER "darkgod@t-o-m-e.net" -+#define MAINTAINER "tome@packages.debian.org" - - - /* -@@ -282,7 +282,7 @@ - /* ToME options: */ - - /* Should the player know his / her starting life rate? */ --/* #define SHOW_LIFE_RATE */ -+#define SHOW_LIFE_RATE - - /* Allow hordes of 'similar' monsters */ - #define MONSTER_HORDES --- -2.0.0.rc2 - diff --git a/debian/patches/0002-Fix-code-which-needed-a-32-bit-int-to-not-use-int-lo.patch b/debian/patches/0002-Fix-code-which-needed-a-32-bit-int-to-not-use-int-lo.patch deleted file mode 100644 index 3cc54503..00000000 --- a/debian/patches/0002-Fix-code-which-needed-a-32-bit-int-to-not-use-int-lo.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 448e655d55608b18ed6e8e387d5f9c86356900c8 Mon Sep 17 00:00:00 2001 -From: Manoj Srivastava -Date: Tue, 21 Oct 2008 08:25:47 -0500 -Subject: [PATCH 2/3] Fix code which needed a 32 bit int to not use int/long - -On amd64, but not on i386, tome produces LUA errors at various -times. The errors occur at savefile load, when wileding a weapon, -unweilding a weapon, and for other events. The same homedir, same -savefiles, same config, same etc., does not produce errors in the -32bit build of the package. - -The error seems to be that the type Number needs to be a 32bit wide -integer; and seems to be defined by default as an long, with an option -to define it as an int for amd64. However, for the 11 arches Debian -supports, this would lead to a morass of selecting architectures in -the makefile to override the type; a better solution is to use -stdint.h and use a type which is 32 bits wide by design: int32_t. - -This fixes the LUA errors, and Closes: Bug#419825 - -Signed-off-by: Manoj Srivastava ---- - src/lua/llimits.h | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/lua/llimits.h b/src/lua/llimits.h -index 4b12450..39a1e0d 100644 ---- a/src/lua/llimits.h -+++ b/src/lua/llimits.h -@@ -10,6 +10,7 @@ - - #include - #include -+#include - - - -@@ -36,7 +37,7 @@ - ** GREP LUA_NUMBER to change that - */ - #ifndef LUA_NUM_TYPE --#define LUA_NUM_TYPE long -+#define LUA_NUM_TYPE int32_t - #endif - - typedef LUA_NUM_TYPE Number; -@@ -50,7 +51,7 @@ typedef LUA_NUM_TYPE Number; - - - --typedef unsigned long lint32; /* unsigned int with at least 32 bits */ -+typedef int_least32_t lint32; /* unsigned int with at least 32 bits */ - - - #define MAX_SIZET ((size_t)(~(size_t)0)-2) --- -2.0.0.rc2 - diff --git a/debian/patches/0003-debian-cmake-fixes-Change-install-paths-to-FHS-compl.patch b/debian/patches/0003-debian-cmake-fixes-Change-install-paths-to-FHS-compl.patch deleted file mode 100644 index ab1799f1..00000000 --- a/debian/patches/0003-debian-cmake-fixes-Change-install-paths-to-FHS-compl.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 1212be6727cfaa14760f0130cdea635c38fb523b Mon Sep 17 00:00:00 2001 -From: Manoj Srivastava -Date: Wed, 14 May 2014 23:46:05 -0700 -Subject: [PATCH 3/3] [debian-cmake-fixes]: Change install paths to FHS - compliant games - -So the binary lives in /usr/games/tome, instead of /usr/bin/tome - -Signed-off-by: Manoj Srivastava ---- - CMakeLists.txt | 2 +- - src/CMakeLists.txt | 10 +++++----- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 91512a6..72cd53e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -94,7 +94,7 @@ endif(WIN32) - # Set the path for loading the library bits. - # - IF(SYSTEM_INSTALL) -- SET(DEFAULT_PATH "${CMAKE_INSTALL_PREFIX}/lib/tome") -+ SET(DEFAULT_PATH "/var/games/tome") - ELSE() - SET(DEFAULT_PATH "./lib") - ENDIF() -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index e2e6264..932fef4 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -4,9 +4,9 @@ ADD_SUBDIRECTORY(lua) - SET(SRCS - main-gcu.c main-x11.c main-xaw.c main-sdl.c main-gtk2.c - z-rand.c z-util.c z-form.c z-virt.c z-term.c -- variable.c tables.c plots.c util.c cave.c dungeon.c -- melee1.c melee2.c modules.c -- object1.c object2.c randart.c squeltch.c traps.c -+ variable.c tables.c plots.c util.c cave.c dungeon.c -+ melee1.c melee2.c modules.c -+ object1.c object2.c randart.c squeltch.c traps.c - monster1.c monster2.c monster3.c - xtra1.c xtra2.c skills.c powers.c gods.c - spells1.c spells2.c -@@ -15,7 +15,7 @@ SET(SRCS - help.c - generate.c gen_maze.c gen_evol.c wild.c levels.c store.c bldg.c - cmovie.c -- wizard2.c init2.c birth.c wizard1.c init1.c main.c -+ wizard2.c init2.c birth.c wizard1.c init1.c main.c - # Lua bits: - lua_bind.c script.c w_mnster.c w_player.c w_play_c.c w_z_pack.c - w_obj.c w_util.c w_spells.c w_quest.c w_dun.c -@@ -68,5 +68,5 @@ TARGET_LINK_LIBRARIES(tome lua ${LIBS}) - - # Installation - INSTALL(TARGETS tome -- RUNTIME DESTINATION bin -+ RUNTIME DESTINATION games - ) --- -2.0.0.rc2 - diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index bb1818e2..00000000 --- a/debian/patches/series +++ /dev/null @@ -1,4 +0,0 @@ -# exported from git by git-debcherry -0001-debcherry-fixup-patch.patch -0002-Fix-code-which-needed-a-32-bit-int-to-not-use-int-lo.patch -0003-debian-cmake-fixes-Change-install-paths-to-FHS-compl.patch diff --git a/debian/postinst b/debian/postinst deleted file mode 100755 index 50a53dec..00000000 --- a/debian/postinst +++ /dev/null @@ -1,253 +0,0 @@ -#! /bin/sh -# -*- Mode: Sh -*- -# postinst --- -# Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) -# Created On : Fri Nov 14 11:25:07 2003 -# Created On Node : glaurung.green-gryphon.com -# Last Modified By : Manoj Srivastava -# Last Modified On : Sun Mar 14 12:19:27 2004 -# Last Machine Used: glaurung.internal.golden-gryphon.com -# Update Count : 16 -# Status : Unknown, Use with caution! -# HISTORY : -# Description : -# -# arch-tag: 5401e9ef-39cc-4aee-96a4-61dfb8f32cf7 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# - -# Abort if any command returns an error value -set -e - -package_name=tome - -if [ -z "$package_name" ]; then - print >&2 "Internal Error. Please report a bug." - exit 1; -fi - -# This script is called as the last step of the installation of the -# package. All the package's files are in place, dpkg has already done -# its automatic conffile handling, and all the packages we depend of -# are already fully installed and configured. -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package -# -# quoting from the policy: -# Any necessary prompting should almost always be confined to the -# post-installation script, and should be protected with a conditional -# so that unnecessary prompting doesn't happen if a package's -# installation fails and the `postinst' is called with `abort-upgrade', -# `abort-remove' or `abort-deconfigure'. - -# The following idempotent stuff doesn't generally need protecting -# against being run in the abort-* cases. - -# Install info files into the dir file -##: install-info --quiet --section "section pattern" "Section Title" \ -##: --description="Name of the document" /usr/info/${package_name}.info - -# Create stub directories under /usr/local -##: if test ! -d /usr/local/lib/${package_name}; then -##: if test ! -d /usr/local/lib; then -##: if mkdir /usr/local/lib; then -##: chown root.staff /usr/local/lib || true -##: chmod 2775 /usr/local/lib || true -##: fi -##: fi -##: if mkdir /usr/local/lib/${package_name}; then -##: chown root.staff /usr/local/lib/${package_name} || true -##: chmod 2775 /usr/local/lib/${package_name} || true -##: fi -##: fi - -# Arrange for a daemon to be started at system boot time -##: update-rc.d ${package_name} default >/dev/null - -case "$1" in - configure) - # Configure this package. If the package must prompt the user for - # information, do it here. - # Install emacs lisp files - ##:if [ -x /usr/lib/emacsen-common/emacs-package-install ]; then - ##: /usr/lib/emacsen-common/emacs-package-install $package_name - ##:fi - - for file in /var/games/${package_name}/edit/*.txt; do - base_file=$(basename $file .txt); - cp -f $file /var/games/${package_name}/data/${base_file}.raw; - done - - if [ ! -e /var/lib/games/${package_name}/apex/scores.raw ]; then - touch /var/games/${package_name}/apex/scores.old - fi - - if [ -d /var/lib/games/${package_name}/save ]; then - for file in $(find /var/lib/games/${package_name}/save/ -type f); do - if [ ! -f $file ]; then - continue; - fi - base=$(basename $file) - if [ "X$base" = "Xdelete.me" ]; then - continue; - fi - if [ -s /var/games/${package_name}/save/$base ]; then - mv -f $file /var/games/${package_name}/save/$base.old - else - mv -f $file /var/games/${package_name}/save/$base - fi - done - fi - - # create a scores file if none exists - test ! -d /var/games/${package_name}/apex || touch /var/games/${package_name}/apex/scores.raw - - # Clean up ownership - chown -R root:games /var/games/${package_name}/ - - # Make sure the game can write the files it needs to write to - test ! -d /var/games/${package_name}/user || chmod -R g+w /var/games/${package_name}/user - test ! -d /var/games/${package_name}/bone || chmod -R g+w /var/games/${package_name}/bone - test ! -d /var/games/${package_name}/save || chmod -R g+w /var/games/${package_name}/save - test ! -d /var/games/${package_name}/apex || chmod -R g+w /var/games/${package_name}/apex - - # Activate menu-methods script - ##: chmod a+x /etc/menu-methods/${package_name} - - # Update ld.so cache - ##: ldconfig - - # Make our version of a program available - ##: update-alternatives \ - ##: --install /usr/bin/program program /usr/bin/alternative 50 \ - ##: --slave /usr/man/man1/program.1.gz program.1.gz \ - ##: /usr/man/man1/alternative.1.gz - - # Tell ucf that the file in /usr/share/foo is the latest - # maintainer version, and let it handle how to manage the real - # confuguration file in /etc. This is how a static configuration - # file can be handled: - ##:if which ucf >/dev/null 2>&1; then - ##: ucf /usr/share/${package_name}/configuration /etc/${package_name}.conf - ##:fi - - ### We could also do this on the fly. The following is from Tore - ### Anderson: - - #. /usr/share/debconf/confmodule - - ### find out what the user answered. - # db_get foo/run_on_boot - # run_on_boot=$RET - # db_stop - - ### safely create a temporary file to generate our suggested - ### configuration file. - # tempfile=`tempfile` - # cat << _eof > $tempfile - ### Configuration file for Foo. - - ### this was answered by you, the user in a debconf dialogue - # RUNONBOOT=$run_on_boot - - ### this was not, as it has a sane default value. - # COLOUROFSKY=blue - - #_eof - - ### Note that some versions of debconf do not release stdin, so - ### the following invocation of ucf may not work, since the stdin - ### is never coneected to ucfr. - - ### now, invoke ucf, which will take care of the rest, and ask - ### the user if he wants to update his file, if it is modified. - #ucf $tempfile /etc/foo.conf - - ### done! now we'll just clear up our cruft. - #rm -f $tempfile - - - - # There are three sub-cases: - if test "${2+set}" != set; then - # We're being installed by an ancient dpkg which doesn't remember - # which version was most recently configured, or even whether - # there is a most recently configured version. - : - - elif test -z "$2" || test "$2" = ""; then - # The package has not ever been configured on this system, or was - # purged since it was last configured. - : - - else - # Version $2 is the most recently configured version of this - # package. - : - - fi ;; - abort-upgrade) - # Back out of an attempt to upgrade this package FROM THIS VERSION - # to version $2. Undo the effects of "prerm upgrade $2". - ##: - - ;; - abort-remove) - if test "$2" != in-favour; then - echo "$0: undocumented call to \`postinst $*'" 1>&2 - exit 0 - fi - # Back out of an attempt to remove this package, which was due to - # a conflict with package $3 (version $4). Undo the effects of - # "prerm remove in-favour $3 $4". - : - - ;; - abort-deconfigure) - if test "$2" != in-favour || test "$5" != removing; then - echo "$0: undocumented call to \`postinst $*'" 1>&2 - exit 0 - fi - # Back out of an attempt to deconfigure this package, which was - # due to package $6 (version $7) which we depend on being removed - # to make way for package $3 (version $4). Undo the effects of - # "prerm deconfigure in-favour $3 $4 removing $6 $7". - : - - ;; - *) echo "$0: didn't understand being called with \`$1'" 1>&2 - exit 0;; -esac - -#DEBHELPER# - -# Install doc base documentation -##:if which install-docs >/dev/null 2>&1; then -##: if [ -e /usr/share/doc-base/${package_name} ]; then -##: install-docs -i /usr/share/doc-base/${package_name} -##: fi -##:fi - -exit 0 diff --git a/debian/postrm b/debian/postrm deleted file mode 100755 index f813beec..00000000 --- a/debian/postrm +++ /dev/null @@ -1,175 +0,0 @@ -#! /bin/sh -# -*- Mode: Sh -*- -# postrm --- -# Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) -# Created On : Fri Nov 14 12:22:20 2003 -# Created On Node : glaurung.green-gryphon.com -# Last Modified By : Manoj Srivastava -# Last Modified On : Sat Nov 29 01:54:26 2003 -# Last Machine Used: glaurung.green-gryphon.com -# Update Count : 10 -# Status : Unknown, Use with caution! -# HISTORY : -# Description : -# -# arch-tag: 56802d51-d980-4822-85c0-28fce19ed430 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# - - -# Abort if any command returns an error value -set -e - -package_name=tome - -if [ -z "$package_name" ]; then - print >&2 "Internal Error. Please report a bug." - exit 1; -fi - -# This script is called twice during the removal of the package; once -# after the removal of the package's files from the system, and as -# the final step in the removal of this package, after the package's -# conffiles have been removed. -# summary of how this script can be called: -# * `remove' -# * `purge' -# * `upgrade' -# * `failed-upgrade' -# * `abort-install' -# * `abort-install' -# * `abort-upgrade' -# * `disappear' overwrit>r> -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - -case "$1" in - remove) - # This package is being removed, but its configuration has not yet - # been purged. - : - - # Remove diversion - ##: dpkg-divert --package ${package_name} --remove --rename \ - ##: --divert /usr/bin/other.real /usr/bin/other - - # ldconfig is NOT needed during removal of a library, only during - # installation - - ;; - purge) - # This package has previously been removed and is now having - # its configuration purged from the system. - ##: - - # we mimic dpkg as closely as possible, so we remove configuration - # files with dpkg backup extensions too: - ### Some of the following is from Tore Anderson: - ##: for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist; do - ##: rm -f /etc/${package_name}.conf$ext - ##: done - - if [ -d /var/lib/games/${package_name}/ ]; then - rm -rf /var/lib/games/${package_name}/ - fi - if [ -d "/var/games/${package_name}" ]; then - rm -rf "/var/games/${package_name}" - fi - - # remove the configuration file itself - ##: rm -f /etc/${package_name}.conf - - # and finally clear it out from the ucf database - ##: ucf --purge /etc/${package_name}.conf - - # Remove symlinks from /etc/rc?.d - ##: update-rc.d ${package_name} remove >/dev/null - - ##: if [ -e /usr/share/debconf/confmodule ]; then - ##: # Purge this package's data from the debconf database. - ##: . /usr/share/debconf/confmodule - ##: db_purge - ##: fi - - # This package has previously been removed and is now having - # its configuration purged from the system. - ##: for flavour in emacs20 emacs21; do - ##: STARTDIR=/etc/$flavour/site-start.d; - ##: STARTFILE="${package_name}-init.el"; - ##: if [ -e "$STARTDIR/20$STARTFILE" ]; then - ##: rm -f "$STARTDIR/20$STARTFILE" - ##: fi - ##: done - - ;; - disappear) - if test "$2" != overwriter; then - echo "$0: undocumented call to \`postrm $*'" 1>&2 - exit 0 - fi - # This package has been completely overwritten by package $3 - # (version $4). All our files are already gone from the system. - # This is a special case: neither "prerm remove" nor "postrm remove" - # have been called, because dpkg didn't know that this package would - # disappear until this stage. - ##: - - ;; - upgrade) - # About to upgrade FROM THIS VERSION to version $2 of this package. - # "prerm upgrade" has been called for this version, and "preinst - # upgrade" has been called for the new version. Last chance to - # clean up. - ##: - - ;; - failed-upgrade) - # About to upgrade from version $2 of this package TO THIS VERSION. - # "prerm upgrade" has been called for the old version, and "preinst - # upgrade" has been called for this version. This is only used if - # the previous version's "postrm upgrade" couldn't handle it and - # returned non-zero. (Fix old postrm bugs here.) - ##: - - ;; - abort-install) - # Back out of an attempt to install this package. Undo the effects of - # "preinst install...". There are two sub-cases. - ##: - - if test "${2+set}" = set; then - # When the install was attempted, version $2's configuration - # files were still on the system. Undo the effects of "preinst - # install $2". - : - - else - # We were being installed from scratch. Undo the effects of - # "preinst install". - : - - fi ;; - abort-upgrade) - # Back out of an attempt to upgrade this package from version $2 - # TO THIS VERSION. Undo the effects of "preinst upgrade $2". - ##: - - ;; - *) echo "$0: didn't understand being called with \`$1'" 1>&2 - exit 0;; -esac -#DEBHELPER# -exit 0 diff --git a/debian/preinst b/debian/preinst deleted file mode 100755 index 482380f0..00000000 --- a/debian/preinst +++ /dev/null @@ -1,103 +0,0 @@ -#! /bin/sh -# -*- Mode: Sh -*- -# preinst --- -# Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) -# Created On : Fri Nov 14 12:12:04 2003 -# Created On Node : glaurung.green-gryphon.com -# Last Modified By : Manoj Srivastava -# Last Modified On : Sat Nov 29 01:53:45 2003 -# Last Machine Used: glaurung.green-gryphon.com -# Update Count : 6 -# Status : Unknown, Use with caution! -# HISTORY : -# Description : -# -# arch-tag: d6a3672d-acb3-4f6c-9984-bad17d8ce0aa -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# - - -# Abort if any command returns an error value -set -e - -package_name=tome - -if [ -z "$package_name" ]; then - print >&2 "Internal Error. Please report a bug." - exit 1; -fi - - - -# This script is called before this version of this package is installed. -# When this script is called, the package's files have not been unpacked -# yet. - -case "$1" in - install) - # About to install this package. - ##: - if [ -L /var/games/${package_name}/data ]; then - rm /var/games/${package_name}/data - fi - - if [ -d /usr/lib/${package_name}/data ]; then - rm -rf /usr/lib/${package_name}/data - fi - - # Add a diversion. This is one of the few things which may be done - # before installing any files from the package. - #: dpkg-divert --package foo --add --rename \ - ##: --divert /usr/bin/other.real /usr/bin/other - - # There are two sub-cases: - if test "${2+set}" = set; then - # The configuration files from version $2 of this package are - # still on the system. - : - - else - # There is no existing configuration; install from scratch. - : - - fi ;; - upgrade) - # About to upgrade this package from version $2 TO THIS VERSION. - # "prerm upgrade" has already been called for the old version of - # this package. - ##: - if [ -L /var/games/${package_name}/data ]; then - rm /var/games/${package_name}/data - fi - - if [ -d /usr/lib/${package_name}/data ]; then - rm -rf /usr/lib/${package_name}/data - fi - - ;; - abort-upgrade) - # Back out of an attempt to upgrade this package FROM THIS VERSION to - # version $2. Undo the effects of "postrm upgrade $2". - : - - ;; - *) echo "$0: didn't understand being called with \`$1'" 1>&2 - exit 0;; -esac -#DEBHELPER# - -exit 0 diff --git a/debian/prerm b/debian/prerm deleted file mode 100755 index d6b5bd27..00000000 --- a/debian/prerm +++ /dev/null @@ -1,133 +0,0 @@ -#! /bin/sh -# -*- Mode: Sh -*- -# prerm --- -# Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) -# Created On : Fri Nov 14 12:16:39 2003 -# Created On Node : glaurung.green-gryphon.com -# Last Modified By : Manoj Srivastava -# Last Modified On : Sun Mar 14 12:19:51 2004 -# Last Machine Used: glaurung.internal.golden-gryphon.com -# Update Count : 11 -# Status : Unknown, Use with caution! -# HISTORY : -# Description : -# -# arch-tag: a4c1a888-137d-4800-98f8-93d0365422d8 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# - -# Abort if any command returns an error value -set -e - -package_name=tome - -if [ -z "$package_name" ]; then - print >&2 "Internal Error. Please report a bug." - exit 1; -fi - - -# This script is called as the first step in removing the package from -# the system. This includes cases where the user explicitly asked for -# the package to be removed, upgrade, automatic removal due to conflicts, -# and deconfiguration due to temporary removal of a depended-on package. - -# Info files should be uninstalled from the dir file in any case. -##: install-info --quiet --remove /usr/info/${package_name}.info - -case "$1" in - remove) - # This package about to be removed. - ##: - if [ -L /usr/doc/$package_name ]; then - rm -f /usr/doc/$package_name - fi - - # Remove package-specific directories from /usr/local. Don't try - # to remove standard directories such as /usr/local/lib. - ##: if test -d /usr/local/lib/${package_name}; then - ##: rmdir /usr/local/lib/${package_name} || true - ##: fi - - # Deactivate menu-methods script. - ##: chmod a-x /etc/menu-methods/${package_name} - - # Withdraw our version of a program. - ##: update-alternatives --remove program /usr/bin/alternative - - # Get rid of the installed docs - ##: if which install-docs >/dev/null 2>&1; then - ##: install-docs -r $package_name - ##: fi - - # Get rid of the byte compiled files - ##: if [ -x /usr/lib/emacsen-common/emacs-package-remove ]; then - ##: /usr/lib/emacsen-common/emacs-package-remove $package_name - ##: fi - - if [ -L /usr/doc/$package_name ]; then - rm -f /usr/doc/$package_name - fi - - # There are two sub-cases: - if test "${2+set}" = set; then - if test "$2" != in-favour; then - echo "$0: undocumented call to \`prerm $*'" 1>&2 - exit 0 - fi - # We are being removed because of a conflict with package $3 - # (version $4), which is now being installed. - : - - else - # The package is being removed in its own right. - : - - fi ;; - deconfigure) - if test "$2" != in-favour || test "$5" != removing; then - echo "$0: undocumented call to \`prerm $*'" 1>&2 - exit 0 - fi - # Package $6 (version $7) which we depend on is being removed due - # to a conflict with package $3 (version $4), and this package is - # being deconfigured until $6 can be reinstalled. - : - - ;; - upgrade) - # Prepare to upgrade FROM THIS VERSION of this package to version $2. - ##: - - if [ -L /usr/doc/$package_name ]; then - rm -f /usr/doc/$package_name - fi - - ;; - failed-upgrade) - # Prepare to upgrade from version $2 of this package TO THIS VERSION. - # This is only used if the old version's prerm couldn't handle it, - # and returned non-zero. (Fix old prerm bugs here.) - : - - ;; - *) echo "$0: didn't understand being called with \`$1'" 1>&2 - exit 0;; -esac -#DEBHELPER# - -exit 0 diff --git a/debian/rules b/debian/rules index 7e771906..c31c20b0 100755 --- a/debian/rules +++ b/debian/rules @@ -44,10 +44,10 @@ override_dh_auto_configure: dh_auto_configure -- -DSYSTEM_INSTALL:BOOL=true override_dh_auto_build: - bash -n debian/postinst - bash -n debian/postrm - bash -n debian/prerm - bash -n debian/preinst + bash -n debian/tome.postinst + bash -n debian/tome.postrm + bash -n debian/tome.prerm + bash -n debian/tome.preinst bash -n debian/Tome.sh override_dh_install: diff --git a/debian/source/format b/debian/source/format index 163aaf8d..d3827e75 100644 --- a/debian/source/format +++ b/debian/source/format @@ -1 +1 @@ -3.0 (quilt) +1.0 diff --git a/debian/tome.postinst b/debian/tome.postinst new file mode 100644 index 00000000..50a53dec --- /dev/null +++ b/debian/tome.postinst @@ -0,0 +1,253 @@ +#! /bin/sh +# -*- Mode: Sh -*- +# postinst --- +# Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) +# Created On : Fri Nov 14 11:25:07 2003 +# Created On Node : glaurung.green-gryphon.com +# Last Modified By : Manoj Srivastava +# Last Modified On : Sun Mar 14 12:19:27 2004 +# Last Machine Used: glaurung.internal.golden-gryphon.com +# Update Count : 16 +# Status : Unknown, Use with caution! +# HISTORY : +# Description : +# +# arch-tag: 5401e9ef-39cc-4aee-96a4-61dfb8f32cf7 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# + +# Abort if any command returns an error value +set -e + +package_name=tome + +if [ -z "$package_name" ]; then + print >&2 "Internal Error. Please report a bug." + exit 1; +fi + +# This script is called as the last step of the installation of the +# package. All the package's files are in place, dpkg has already done +# its automatic conffile handling, and all the packages we depend of +# are already fully installed and configured. +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# +# quoting from the policy: +# Any necessary prompting should almost always be confined to the +# post-installation script, and should be protected with a conditional +# so that unnecessary prompting doesn't happen if a package's +# installation fails and the `postinst' is called with `abort-upgrade', +# `abort-remove' or `abort-deconfigure'. + +# The following idempotent stuff doesn't generally need protecting +# against being run in the abort-* cases. + +# Install info files into the dir file +##: install-info --quiet --section "section pattern" "Section Title" \ +##: --description="Name of the document" /usr/info/${package_name}.info + +# Create stub directories under /usr/local +##: if test ! -d /usr/local/lib/${package_name}; then +##: if test ! -d /usr/local/lib; then +##: if mkdir /usr/local/lib; then +##: chown root.staff /usr/local/lib || true +##: chmod 2775 /usr/local/lib || true +##: fi +##: fi +##: if mkdir /usr/local/lib/${package_name}; then +##: chown root.staff /usr/local/lib/${package_name} || true +##: chmod 2775 /usr/local/lib/${package_name} || true +##: fi +##: fi + +# Arrange for a daemon to be started at system boot time +##: update-rc.d ${package_name} default >/dev/null + +case "$1" in + configure) + # Configure this package. If the package must prompt the user for + # information, do it here. + # Install emacs lisp files + ##:if [ -x /usr/lib/emacsen-common/emacs-package-install ]; then + ##: /usr/lib/emacsen-common/emacs-package-install $package_name + ##:fi + + for file in /var/games/${package_name}/edit/*.txt; do + base_file=$(basename $file .txt); + cp -f $file /var/games/${package_name}/data/${base_file}.raw; + done + + if [ ! -e /var/lib/games/${package_name}/apex/scores.raw ]; then + touch /var/games/${package_name}/apex/scores.old + fi + + if [ -d /var/lib/games/${package_name}/save ]; then + for file in $(find /var/lib/games/${package_name}/save/ -type f); do + if [ ! -f $file ]; then + continue; + fi + base=$(basename $file) + if [ "X$base" = "Xdelete.me" ]; then + continue; + fi + if [ -s /var/games/${package_name}/save/$base ]; then + mv -f $file /var/games/${package_name}/save/$base.old + else + mv -f $file /var/games/${package_name}/save/$base + fi + done + fi + + # create a scores file if none exists + test ! -d /var/games/${package_name}/apex || touch /var/games/${package_name}/apex/scores.raw + + # Clean up ownership + chown -R root:games /var/games/${package_name}/ + + # Make sure the game can write the files it needs to write to + test ! -d /var/games/${package_name}/user || chmod -R g+w /var/games/${package_name}/user + test ! -d /var/games/${package_name}/bone || chmod -R g+w /var/games/${package_name}/bone + test ! -d /var/games/${package_name}/save || chmod -R g+w /var/games/${package_name}/save + test ! -d /var/games/${package_name}/apex || chmod -R g+w /var/games/${package_name}/apex + + # Activate menu-methods script + ##: chmod a+x /etc/menu-methods/${package_name} + + # Update ld.so cache + ##: ldconfig + + # Make our version of a program available + ##: update-alternatives \ + ##: --install /usr/bin/program program /usr/bin/alternative 50 \ + ##: --slave /usr/man/man1/program.1.gz program.1.gz \ + ##: /usr/man/man1/alternative.1.gz + + # Tell ucf that the file in /usr/share/foo is the latest + # maintainer version, and let it handle how to manage the real + # confuguration file in /etc. This is how a static configuration + # file can be handled: + ##:if which ucf >/dev/null 2>&1; then + ##: ucf /usr/share/${package_name}/configuration /etc/${package_name}.conf + ##:fi + + ### We could also do this on the fly. The following is from Tore + ### Anderson: + + #. /usr/share/debconf/confmodule + + ### find out what the user answered. + # db_get foo/run_on_boot + # run_on_boot=$RET + # db_stop + + ### safely create a temporary file to generate our suggested + ### configuration file. + # tempfile=`tempfile` + # cat << _eof > $tempfile + ### Configuration file for Foo. + + ### this was answered by you, the user in a debconf dialogue + # RUNONBOOT=$run_on_boot + + ### this was not, as it has a sane default value. + # COLOUROFSKY=blue + + #_eof + + ### Note that some versions of debconf do not release stdin, so + ### the following invocation of ucf may not work, since the stdin + ### is never coneected to ucfr. + + ### now, invoke ucf, which will take care of the rest, and ask + ### the user if he wants to update his file, if it is modified. + #ucf $tempfile /etc/foo.conf + + ### done! now we'll just clear up our cruft. + #rm -f $tempfile + + + + # There are three sub-cases: + if test "${2+set}" != set; then + # We're being installed by an ancient dpkg which doesn't remember + # which version was most recently configured, or even whether + # there is a most recently configured version. + : + + elif test -z "$2" || test "$2" = ""; then + # The package has not ever been configured on this system, or was + # purged since it was last configured. + : + + else + # Version $2 is the most recently configured version of this + # package. + : + + fi ;; + abort-upgrade) + # Back out of an attempt to upgrade this package FROM THIS VERSION + # to version $2. Undo the effects of "prerm upgrade $2". + ##: + + ;; + abort-remove) + if test "$2" != in-favour; then + echo "$0: undocumented call to \`postinst $*'" 1>&2 + exit 0 + fi + # Back out of an attempt to remove this package, which was due to + # a conflict with package $3 (version $4). Undo the effects of + # "prerm remove in-favour $3 $4". + : + + ;; + abort-deconfigure) + if test "$2" != in-favour || test "$5" != removing; then + echo "$0: undocumented call to \`postinst $*'" 1>&2 + exit 0 + fi + # Back out of an attempt to deconfigure this package, which was + # due to package $6 (version $7) which we depend on being removed + # to make way for package $3 (version $4). Undo the effects of + # "prerm deconfigure in-favour $3 $4 removing $6 $7". + : + + ;; + *) echo "$0: didn't understand being called with \`$1'" 1>&2 + exit 0;; +esac + +#DEBHELPER# + +# Install doc base documentation +##:if which install-docs >/dev/null 2>&1; then +##: if [ -e /usr/share/doc-base/${package_name} ]; then +##: install-docs -i /usr/share/doc-base/${package_name} +##: fi +##:fi + +exit 0 diff --git a/debian/tome.postrm b/debian/tome.postrm new file mode 100644 index 00000000..f813beec --- /dev/null +++ b/debian/tome.postrm @@ -0,0 +1,175 @@ +#! /bin/sh +# -*- Mode: Sh -*- +# postrm --- +# Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) +# Created On : Fri Nov 14 12:22:20 2003 +# Created On Node : glaurung.green-gryphon.com +# Last Modified By : Manoj Srivastava +# Last Modified On : Sat Nov 29 01:54:26 2003 +# Last Machine Used: glaurung.green-gryphon.com +# Update Count : 10 +# Status : Unknown, Use with caution! +# HISTORY : +# Description : +# +# arch-tag: 56802d51-d980-4822-85c0-28fce19ed430 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + + +# Abort if any command returns an error value +set -e + +package_name=tome + +if [ -z "$package_name" ]; then + print >&2 "Internal Error. Please report a bug." + exit 1; +fi + +# This script is called twice during the removal of the package; once +# after the removal of the package's files from the system, and as +# the final step in the removal of this package, after the package's +# conffiles have been removed. +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +case "$1" in + remove) + # This package is being removed, but its configuration has not yet + # been purged. + : + + # Remove diversion + ##: dpkg-divert --package ${package_name} --remove --rename \ + ##: --divert /usr/bin/other.real /usr/bin/other + + # ldconfig is NOT needed during removal of a library, only during + # installation + + ;; + purge) + # This package has previously been removed and is now having + # its configuration purged from the system. + ##: + + # we mimic dpkg as closely as possible, so we remove configuration + # files with dpkg backup extensions too: + ### Some of the following is from Tore Anderson: + ##: for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist; do + ##: rm -f /etc/${package_name}.conf$ext + ##: done + + if [ -d /var/lib/games/${package_name}/ ]; then + rm -rf /var/lib/games/${package_name}/ + fi + if [ -d "/var/games/${package_name}" ]; then + rm -rf "/var/games/${package_name}" + fi + + # remove the configuration file itself + ##: rm -f /etc/${package_name}.conf + + # and finally clear it out from the ucf database + ##: ucf --purge /etc/${package_name}.conf + + # Remove symlinks from /etc/rc?.d + ##: update-rc.d ${package_name} remove >/dev/null + + ##: if [ -e /usr/share/debconf/confmodule ]; then + ##: # Purge this package's data from the debconf database. + ##: . /usr/share/debconf/confmodule + ##: db_purge + ##: fi + + # This package has previously been removed and is now having + # its configuration purged from the system. + ##: for flavour in emacs20 emacs21; do + ##: STARTDIR=/etc/$flavour/site-start.d; + ##: STARTFILE="${package_name}-init.el"; + ##: if [ -e "$STARTDIR/20$STARTFILE" ]; then + ##: rm -f "$STARTDIR/20$STARTFILE" + ##: fi + ##: done + + ;; + disappear) + if test "$2" != overwriter; then + echo "$0: undocumented call to \`postrm $*'" 1>&2 + exit 0 + fi + # This package has been completely overwritten by package $3 + # (version $4). All our files are already gone from the system. + # This is a special case: neither "prerm remove" nor "postrm remove" + # have been called, because dpkg didn't know that this package would + # disappear until this stage. + ##: + + ;; + upgrade) + # About to upgrade FROM THIS VERSION to version $2 of this package. + # "prerm upgrade" has been called for this version, and "preinst + # upgrade" has been called for the new version. Last chance to + # clean up. + ##: + + ;; + failed-upgrade) + # About to upgrade from version $2 of this package TO THIS VERSION. + # "prerm upgrade" has been called for the old version, and "preinst + # upgrade" has been called for this version. This is only used if + # the previous version's "postrm upgrade" couldn't handle it and + # returned non-zero. (Fix old postrm bugs here.) + ##: + + ;; + abort-install) + # Back out of an attempt to install this package. Undo the effects of + # "preinst install...". There are two sub-cases. + ##: + + if test "${2+set}" = set; then + # When the install was attempted, version $2's configuration + # files were still on the system. Undo the effects of "preinst + # install $2". + : + + else + # We were being installed from scratch. Undo the effects of + # "preinst install". + : + + fi ;; + abort-upgrade) + # Back out of an attempt to upgrade this package from version $2 + # TO THIS VERSION. Undo the effects of "preinst upgrade $2". + ##: + + ;; + *) echo "$0: didn't understand being called with \`$1'" 1>&2 + exit 0;; +esac +#DEBHELPER# +exit 0 diff --git a/debian/tome.preinst b/debian/tome.preinst new file mode 100644 index 00000000..482380f0 --- /dev/null +++ b/debian/tome.preinst @@ -0,0 +1,103 @@ +#! /bin/sh +# -*- Mode: Sh -*- +# preinst --- +# Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) +# Created On : Fri Nov 14 12:12:04 2003 +# Created On Node : glaurung.green-gryphon.com +# Last Modified By : Manoj Srivastava +# Last Modified On : Sat Nov 29 01:53:45 2003 +# Last Machine Used: glaurung.green-gryphon.com +# Update Count : 6 +# Status : Unknown, Use with caution! +# HISTORY : +# Description : +# +# arch-tag: d6a3672d-acb3-4f6c-9984-bad17d8ce0aa +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# + + +# Abort if any command returns an error value +set -e + +package_name=tome + +if [ -z "$package_name" ]; then + print >&2 "Internal Error. Please report a bug." + exit 1; +fi + + + +# This script is called before this version of this package is installed. +# When this script is called, the package's files have not been unpacked +# yet. + +case "$1" in + install) + # About to install this package. + ##: + if [ -L /var/games/${package_name}/data ]; then + rm /var/games/${package_name}/data + fi + + if [ -d /usr/lib/${package_name}/data ]; then + rm -rf /usr/lib/${package_name}/data + fi + + # Add a diversion. This is one of the few things which may be done + # before installing any files from the package. + #: dpkg-divert --package foo --add --rename \ + ##: --divert /usr/bin/other.real /usr/bin/other + + # There are two sub-cases: + if test "${2+set}" = set; then + # The configuration files from version $2 of this package are + # still on the system. + : + + else + # There is no existing configuration; install from scratch. + : + + fi ;; + upgrade) + # About to upgrade this package from version $2 TO THIS VERSION. + # "prerm upgrade" has already been called for the old version of + # this package. + ##: + if [ -L /var/games/${package_name}/data ]; then + rm /var/games/${package_name}/data + fi + + if [ -d /usr/lib/${package_name}/data ]; then + rm -rf /usr/lib/${package_name}/data + fi + + ;; + abort-upgrade) + # Back out of an attempt to upgrade this package FROM THIS VERSION to + # version $2. Undo the effects of "postrm upgrade $2". + : + + ;; + *) echo "$0: didn't understand being called with \`$1'" 1>&2 + exit 0;; +esac +#DEBHELPER# + +exit 0 diff --git a/debian/tome.prerm b/debian/tome.prerm new file mode 100644 index 00000000..d6b5bd27 --- /dev/null +++ b/debian/tome.prerm @@ -0,0 +1,133 @@ +#! /bin/sh +# -*- Mode: Sh -*- +# prerm --- +# Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) +# Created On : Fri Nov 14 12:16:39 2003 +# Created On Node : glaurung.green-gryphon.com +# Last Modified By : Manoj Srivastava +# Last Modified On : Sun Mar 14 12:19:51 2004 +# Last Machine Used: glaurung.internal.golden-gryphon.com +# Update Count : 11 +# Status : Unknown, Use with caution! +# HISTORY : +# Description : +# +# arch-tag: a4c1a888-137d-4800-98f8-93d0365422d8 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# + +# Abort if any command returns an error value +set -e + +package_name=tome + +if [ -z "$package_name" ]; then + print >&2 "Internal Error. Please report a bug." + exit 1; +fi + + +# This script is called as the first step in removing the package from +# the system. This includes cases where the user explicitly asked for +# the package to be removed, upgrade, automatic removal due to conflicts, +# and deconfiguration due to temporary removal of a depended-on package. + +# Info files should be uninstalled from the dir file in any case. +##: install-info --quiet --remove /usr/info/${package_name}.info + +case "$1" in + remove) + # This package about to be removed. + ##: + if [ -L /usr/doc/$package_name ]; then + rm -f /usr/doc/$package_name + fi + + # Remove package-specific directories from /usr/local. Don't try + # to remove standard directories such as /usr/local/lib. + ##: if test -d /usr/local/lib/${package_name}; then + ##: rmdir /usr/local/lib/${package_name} || true + ##: fi + + # Deactivate menu-methods script. + ##: chmod a-x /etc/menu-methods/${package_name} + + # Withdraw our version of a program. + ##: update-alternatives --remove program /usr/bin/alternative + + # Get rid of the installed docs + ##: if which install-docs >/dev/null 2>&1; then + ##: install-docs -r $package_name + ##: fi + + # Get rid of the byte compiled files + ##: if [ -x /usr/lib/emacsen-common/emacs-package-remove ]; then + ##: /usr/lib/emacsen-common/emacs-package-remove $package_name + ##: fi + + if [ -L /usr/doc/$package_name ]; then + rm -f /usr/doc/$package_name + fi + + # There are two sub-cases: + if test "${2+set}" = set; then + if test "$2" != in-favour; then + echo "$0: undocumented call to \`prerm $*'" 1>&2 + exit 0 + fi + # We are being removed because of a conflict with package $3 + # (version $4), which is now being installed. + : + + else + # The package is being removed in its own right. + : + + fi ;; + deconfigure) + if test "$2" != in-favour || test "$5" != removing; then + echo "$0: undocumented call to \`prerm $*'" 1>&2 + exit 0 + fi + # Package $6 (version $7) which we depend on is being removed due + # to a conflict with package $3 (version $4), and this package is + # being deconfigured until $6 can be reinstalled. + : + + ;; + upgrade) + # Prepare to upgrade FROM THIS VERSION of this package to version $2. + ##: + + if [ -L /usr/doc/$package_name ]; then + rm -f /usr/doc/$package_name + fi + + ;; + failed-upgrade) + # Prepare to upgrade from version $2 of this package TO THIS VERSION. + # This is only used if the old version's prerm couldn't handle it, + # and returned non-zero. (Fix old prerm bugs here.) + : + + ;; + *) echo "$0: didn't understand being called with \`$1'" 1>&2 + exit 0;; +esac +#DEBHELPER# + +exit 0 diff --git a/debian/watch b/debian/watch deleted file mode 100644 index bbfe26ba..00000000 --- a/debian/watch +++ /dev/null @@ -1,5 +0,0 @@ -# format version number, currently 2; this line is compulsory! -version=3 - -opts="uversionmangle=s/(\d)(\d)(\d)/$1.$2.$3/g" http://t-o-m-e.net/dl/src/tome-(2.*)-src.tar.bz2 - -- cgit v1.2.3