From 44aa29a0056dd89cd99a579b096c298940e30b8e Mon Sep 17 00:00:00 2001 From: matthijs Date: Wed, 22 Mar 2006 21:08:05 +0000 Subject: [PATCH] (svn r4033) - Codechange: [Debian] Update debian packaging files to use debconf for user interaction. --- os/debian/changelog | 2 +- os/debian/config | 21 +++++++++++++++++++++ os/debian/templates | 6 ++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100755 os/debian/config create mode 100644 os/debian/templates diff --git a/os/debian/changelog b/os/debian/changelog index 03bc324a49..6b5c3325a1 100644 --- a/os/debian/changelog +++ b/os/debian/changelog @@ -1,6 +1,6 @@ openttd (0.4.5+custom) unstable; urgency=low - * Custom user build. + * Remove old terminal messages and make sure that debconf is always called. -- Matthijs Kooijman Thu, 9 Mar 2006 00:04:33 +0100 diff --git a/os/debian/config b/os/debian/config new file mode 100755 index 0000000000..01dfb36591 --- /dev/null +++ b/os/debian/config @@ -0,0 +1,21 @@ +#!/bin/sh + +# Source debconf library. +. /usr/share/debconf/confmodule + +FILES="trg1r.grf trgcr.grf trghr.grf trgir.grf trgtr.grf sample.cat" +DATADIR=/usr/share/games/openttd/data + +MISSING="No"; +for FILE in $FILES; do + # Check if all the files needed are here. + if [ ! -e $DATADIR/$FILE ]; then + MISSING="Yes"; + break; + fi; +done; + +if [ $MISSING = "Yes" ]; then + db_input high openttd/datafiles || true + db_go +fi; diff --git a/os/debian/templates b/os/debian/templates new file mode 100644 index 0000000000..1215b39039 --- /dev/null +++ b/os/debian/templates @@ -0,0 +1,6 @@ +Template: openttd/datafiles +Type: note +Description: You need to install data files. + OpenTTD needs the datafiles from the original TTD game to run. You should + install these datafiles before you can play the game. See README.Debian for + more details on which files need to be copied where.