[pkg-ggz-commits] r154 - ggz-community/trunk/debian

Josef Spillner josef-guest at alioth.debian.org
Fri Nov 10 19:02:28 CET 2006


Author: josef-guest
Date: 2006-11-10 19:02:28 +0100 (Fri, 10 Nov 2006)
New Revision: 154

Added:
   ggz-community/trunk/debian/config
   ggz-community/trunk/debian/postinst
   ggz-community/trunk/debian/templates
Removed:
   ggz-community/trunk/debian/postinst.ex
Modified:
   ggz-community/trunk/debian/
   ggz-community/trunk/debian/control
   ggz-community/trunk/debian/rules
Log:
- some progress with packaging

[commit from josef at armada]




Property changes on: ggz-community/trunk/debian
___________________________________________________________________
Name: svn:ignore
   + stamp-makefile-build
files
*.substvars
*.debhelper
ggz-community


Added: ggz-community/trunk/debian/config
===================================================================
--- ggz-community/trunk/debian/config	2006-11-10 01:51:12 UTC (rev 153)
+++ ggz-community/trunk/debian/config	2006-11-10 18:02:28 UTC (rev 154)
@@ -0,0 +1,24 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule
+
+db_set ggz_community/conf_host localhost
+db_set ggz_community/conf_database ggz
+db_set ggz_community/conf_user ggzd
+
+if [ "$RET" = "false" ]; then
+	exit 0
+fi
+
+db_input medium ggz_community/conf_host || true
+db_go
+
+db_input medium ggz_community/conf_database || true
+db_go
+
+db_input medium ggz_community/conf_user || true
+db_go
+
+db_input medium ggz_community/conf_password || true
+db_go
+

Modified: ggz-community/trunk/debian/control
===================================================================
--- ggz-community/trunk/debian/control	2006-11-10 01:51:12 UTC (rev 153)
+++ ggz-community/trunk/debian/control	2006-11-10 18:02:28 UTC (rev 154)
@@ -7,7 +7,7 @@
 
 Package: ggz-community
 Architecture: any
-Depends: libdbd-pg-perl, libconfig-inifiles-perl
+Depends: libdbd-pg-perl, libconfig-inifiles-perl, debconf
 Description: GGZ Gaming Zone: web portal for online players
  GGZ Community offers a web-based portal where players can log in,
  found teams, organise tournaments and view statistics.

Copied: ggz-community/trunk/debian/postinst (from rev 150, ggz-community/trunk/debian/postinst.ex)
===================================================================
--- ggz-community/trunk/debian/postinst.ex	2006-11-08 01:30:22 UTC (rev 150)
+++ ggz-community/trunk/debian/postinst	2006-11-10 18:02:28 UTC (rev 154)
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+case "$1" in
+    configure)
+
+db_get ggz_community/conf_host
+conf_host=$RET
+db_get ggz_community/conf_database
+conf_database=$RET
+db_get ggz_community/conf_user
+conf_user=$RET
+db_get ggz_community/conf_password
+conf_password=$RET
+
+if [ "$conf_host" != "" ]; then
+	echo "CREATE DATABASE: $conf_host, $conf_database, $conf_user, $conf_password"
+	if [ "$conf_host" != "localhost" ]; then
+		echo "Remote database - no local setup"
+	else
+		echo "Local database - perform setup"
+		su -c "createuser -A -D $conf_user" postgres || echo "User $conf_user exists already? Error during creation."
+		su -c "createdb -O $conf_user $conf_database" postgres || echo "Database $conf_database exists already? Error during creation."
+	fi
+fi
+
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
+
+

Deleted: ggz-community/trunk/debian/postinst.ex
===================================================================
--- ggz-community/trunk/debian/postinst.ex	2006-11-10 01:51:12 UTC (rev 153)
+++ ggz-community/trunk/debian/postinst.ex	2006-11-10 18:02:28 UTC (rev 154)
@@ -1,42 +0,0 @@
-#!/bin/sh
-# postinst script for community
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# 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>
-#        * <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
-#
-
-case "$1" in
-    configure)
-
-    ;;
-
-    abort-upgrade|abort-remove|abort-deconfigure)
-
-    ;;
-
-    *)
-        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
-
-

Modified: ggz-community/trunk/debian/rules
===================================================================
--- ggz-community/trunk/debian/rules	2006-11-10 01:51:12 UTC (rev 153)
+++ ggz-community/trunk/debian/rules	2006-11-10 18:02:28 UTC (rev 154)
@@ -4,7 +4,7 @@
 include /usr/share/cdbs/1/rules/debhelper.mk
 
 DEB_MAKE_CLEAN_TARGET := clean
-DEB_MAKE_BUILD_TARGET := debcompile
-DEB_MAKE_INSTALL_TARGET := debinstall DESTDIR=$(CURDIR)/debian/ggz-community
+DEB_MAKE_BUILD_TARGET := debcompile prefix=/usr
+DEB_MAKE_INSTALL_TARGET := debinstall DESTDIR=$(CURDIR)/debian/ggz-community prefix=/usr
 DEB_MAKE_CHECK_TARGET :=
 

Added: ggz-community/trunk/debian/templates
===================================================================
--- ggz-community/trunk/debian/templates	2006-11-10 01:51:12 UTC (rev 153)
+++ ggz-community/trunk/debian/templates	2006-11-10 18:02:28 UTC (rev 154)
@@ -0,0 +1,6 @@
+Template: ggz_community/conf_host
+Type: string
+Description: Database host:
+ The hostname of the database.
+ Leave empty for a localhost connection.
+




More information about the pkg-ggz-commits mailing list