Author: sargentd-guest
Date: 2008-02-09 00:59:18 +0000 (Sat, 09 Feb 2008)
New Revision: 5699

Added:
   packages/trunk/pokerth/debian/config.xml
   packages/trunk/pokerth/debian/patches/04_sane_server_defaults.dpatch
   packages/trunk/pokerth/debian/pokerth-server.init
   packages/trunk/pokerth/debian/pokerth-server.install
   packages/trunk/pokerth/debian/pokerth-server.postinst
   packages/trunk/pokerth/debian/pokerth-server.postrm
Modified:
   packages/trunk/pokerth/debian/changelog
   packages/trunk/pokerth/debian/control
   packages/trunk/pokerth/debian/rules
Log:
first, very very basic attempt to install the server


Modified: packages/trunk/pokerth/debian/changelog
===================================================================
--- packages/trunk/pokerth/debian/changelog     2008-02-08 17:59:30 UTC (rev 
5698)
+++ packages/trunk/pokerth/debian/changelog     2008-02-09 00:59:18 UTC (rev 
5699)
@@ -1,8 +1,9 @@
 pokerth (0.6-1-3) UNRELEASED; urgency=low
 
   * Remove build-dependency on qt4-dev-tools and libboost-dev (thanks Ubuntu)
+  * Add pokerth-server binary package, shipping the muktiplayer server
 
- -- Evgeni Golov <[EMAIL PROTECTED]>  Fri, 08 Feb 2008 11:47:57 +0100
+ -- Evgeni Golov <[EMAIL PROTECTED]>  Fri, 08 Feb 2008 17:10:59 +0100
 
 pokerth (0.6-1-2) unstable; urgency=low
 

Added: packages/trunk/pokerth/debian/config.xml
===================================================================
--- packages/trunk/pokerth/debian/config.xml                            (rev 0)
+++ packages/trunk/pokerth/debian/config.xml    2008-02-09 00:59:18 UTC (rev 
5699)
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<PokerTH>
+    <Configuration>
+        <ConfigRevision value="52" />
+        <AppDataDir value="/usr/share/games/pokerth" />
+        <Language value="en" />
+        <InternetServerAddressIRCChannelUpdateDone value="1" />
+        <ShowLeftToolBox value="1" />
+        <ShowRightToolBox value="1" />
+        <ShowStatusbarMessages value="1" />
+        <ShowIntro value="1" />
+        <ShowFadeOutCardsAnimation value="1" />
+        <ShowFlipCardsAnimation value="1" />
+        <ShowBlindButtons value="1" />
+        <AntiPeekMode value="0" />
+        <AlternateFKeysUserActionMode value="0" />
+        <EnableBetInputFocusSwitch value="0" />
+        <FlipsideTux value="1" />
+        <FlipsideOwn value="0" />
+        <FlipsideOwnFile value="" />
+        <PlaySoundEffects value="1" />
+        <SoundVolume value="8" />
+        <PlayGameActions value="1" />
+        <PlayLobbyChatNotification value="1" />
+        <PlayNetworkGameNotification value="1" />
+        <NumberOfPlayers value="7" />
+        <StartCash value="3000" />
+        <FirstSmallBlind value="10" />
+        <RaiseBlindsAtHands value="1" />
+        <RaiseBlindsAtMinutes value="0" />
+        <RaiseSmallBlindEveryHands value="8" />
+        <RaiseSmallBlindEveryMinutes value="5" />
+        <AlwaysDoubleBlinds value="1" />
+        <ManualBlindsOrder value="0" />
+        <ManualBlindsList value="Blind" type="list" />
+        <AfterMBAlwaysDoubleBlinds value="1" />
+        <AfterMBAlwaysRaiseAbout value="0" />
+        <AfterMBAlwaysRaiseValue value="0" />
+        <AfterMBStayAtLastBlind value="0" />
+        <GameSpeed value="4" />
+        <PauseBetweenHands value="0" />
+        <ShowGameSettingsDialogOnNewGame value="1" />
+        <NetNumberOfPlayers value="7" />
+        <NetStartCash value="3000" />
+        <NetFirstSmallBlind value="10" />
+        <NetRaiseBlindsAtHands value="1" />
+        <NetRaiseBlindsAtMinutes value="0" />
+        <NetRaiseSmallBlindEveryHands value="8" />
+        <NetRaiseSmallBlindEveryMinutes value="5" />
+        <NetAlwaysDoubleBlinds value="1" />
+        <NetManualBlindsOrder value="0" />
+        <NetManualBlindsList value="NetBlind" type="list" />
+        <NetAfterMBAlwaysDoubleBlinds value="1" />
+        <NetAfterMBAlwaysRaiseAbout value="0" />
+        <NetAfterMBAlwaysRaiseValue value="0" />
+        <NetAfterMBStayAtLastBlind value="0" />
+        <NetGameSpeed value="4" />
+        <NetTimeOutPlayerAction value="20" />
+        <ServerPassword value="" />
+        <ServerUseIpv6 value="0" />
+        <ServerUseSctp value="0" />
+        <ServerPort value="7234" />
+        <InternetServerAddress value="localhost" />
+        <InternetServerPort value="7234" />
+        <InternetServerPassword value="" />
+        <InternetServerUseIpv6 value="0" />
+        <InternetServerUseSctp value="0" />
+        <UseInternetGamePassword value="0" />
+        <InternetGamePassword value="" />
+        <UseIRCLobbyChat value="1" />
+        <IRCServerAddress value="chat.freenode.net" />
+        <IRCServerPort value="6667" />
+        <IRCChannel value="#pokerth-lobby" />
+        <IRCChannelPassword value="" />
+        <IRCServerUseIpv6 value="0" />
+        <UseAdminIRC value="0" />
+        <AdminIRCServerAddress value="chat.freenode.net" />
+        <AdminIRCServerPort value="6667" />
+        <AdminIRCChannel value="#test" />
+        <AdminIRCChannelPassword value="" />
+        <AdminIRCServerUseIpv6 value="0" />
+        <AdminIRCServerNick value="PokerTH" />
+        <MyName value="Human Player" />
+        <MyAvatar value="" />
+        <Opponent1Name value="Player 1" />
+        <Opponent1Avatar value="" />
+        <Opponent2Name value="Player 2" />
+        <Opponent2Avatar value="" />
+        <Opponent3Name value="Player 3" />
+        <Opponent3Avatar value="" />
+        <Opponent4Name value="Player 4" />
+        <Opponent4Avatar value="" />
+        <Opponent5Name value="Player 5" />
+        <Opponent5Avatar value="" />
+        <Opponent6Name value="Player 6" />
+        <Opponent6Avatar value="" />
+        <LogOnOff value="1" />
+        <LogDir value="/var/lib/pokerth/log-files/" />
+        <LogStoreDuration value="2" />
+        <LogInterval value="0" />
+        <UserDataDir value="/var/lib/pokerth/data/" />
+        <CacheDir value="/var/lib/pokerth/cache/" />
+        <CLA_NoWriteAccess value="0" />
+        <DisableBackToLobbyWarning value="0" />
+    </Configuration>
+</PokerTH>

Modified: packages/trunk/pokerth/debian/control
===================================================================
--- packages/trunk/pokerth/debian/control       2008-02-08 17:59:30 UTC (rev 
5698)
+++ packages/trunk/pokerth/debian/control       2008-02-09 00:59:18 UTC (rev 
5699)
@@ -18,6 +18,17 @@
  is easy to learn but needs a good strategy to win and a lot of luck. This
  package helps you when practicing or just playing for fun.
 
+Package: pokerth-server
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Texas hold'em game - server
+ pokerth is a free implementation of the Texas hold'em poker game which is
+ mostly played in casinos and has a growing popularity worldwide. Texas hold'em
+ is easy to learn but needs a good strategy to win and a lot of luck. This
+ package helps you when practicing or just playing for fun.
+ .
+ This package contains the server, which is needed for hosting own multiplayer 
games
+
 Package: pokerth-data
 Architecture: all
 Description: Texas hold'em game - common data files

Added: packages/trunk/pokerth/debian/patches/04_sane_server_defaults.dpatch
===================================================================
--- packages/trunk/pokerth/debian/patches/04_sane_server_defaults.dpatch        
                        (rev 0)
+++ packages/trunk/pokerth/debian/patches/04_sane_server_defaults.dpatch        
2008-02-09 00:59:18 UTC (rev 5699)
@@ -0,0 +1,48 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04_sane_server_defaults.dpatch by Evgeni Golov <[EMAIL PROTECTED]>
+##
+## DP: the server should use some different paths as default for it's files
+## DP: additionally it should only listen on localhost by default
+
[EMAIL PROTECTED]@
+
+Index: pokerth/config/configfile.cpp
+===================================================================
+--- pokerth.orig/config/configfile.cpp (revision 1392)
++++ pokerth/config/configfile.cpp      (working copy)
+@@ -112,7 +112,7 @@
+               const char *homePath = getenv("HOME");
+               if(homePath) {
+                       configFileName = homePath;
+-                      configFileName += "/.pokerth/";
++                      configFileName += "/";
+                       ////define log-dir
+                       logDir = configFileName;
+                       logDir += "log-files/";
+@@ -122,6 +122,8 @@
+                       ////define cache-dir
+                       cacheDir = configFileName;
+                       cacheDir += "cache/";
++                      // reset configFileName to /etc/pokerth
++                      configFileName = "/etc/pokerth/";
+                       //create directories on first start of app
+                       mkdir(configFileName.c_str(), MODUS) ;
+                       mkdir(logDir.c_str(), MODUS);
+@@ -143,7 +145,7 @@
+       ostringstream tempIntToString;
+       tempIntToString << configRev;
+       configList.push_back(ConfigInfo("ConfigRevision", CONFIG_TYPE_INT, 
tempIntToString.str()));
+-      configList.push_back(ConfigInfo("AppDataDir", CONFIG_TYPE_STRING, 
myQtToolsInterface->getDataPathStdString(argv[0])));
++      configList.push_back(ConfigInfo("AppDataDir", CONFIG_TYPE_STRING, 
"/usr/share/games/pokerth"));
+       configList.push_back(ConfigInfo("Language", CONFIG_TYPE_INT, 
myQtToolsInterface->getDefaultLanguage()));
+       
configList.push_back(ConfigInfo("InternetServerAddressIRCChannelUpdateDone", 
CONFIG_TYPE_INT, "1")); //HACK
+       configList.push_back(ConfigInfo("ShowLeftToolBox", CONFIG_TYPE_INT, 
"1"));
+@@ -201,7 +203,7 @@
+       configList.push_back(ConfigInfo("ServerUseIpv6", CONFIG_TYPE_INT, "0"));
+       configList.push_back(ConfigInfo("ServerUseSctp", CONFIG_TYPE_INT, "0"));
+       configList.push_back(ConfigInfo("ServerPort", CONFIG_TYPE_INT, "7234"));
+-      configList.push_back(ConfigInfo("InternetServerAddress", 
CONFIG_TYPE_STRING, "pokerth.6dns.org"));
++      configList.push_back(ConfigInfo("InternetServerAddress", 
CONFIG_TYPE_STRING, "localhost"));
+       configList.push_back(ConfigInfo("InternetServerPort", CONFIG_TYPE_INT, 
"7234"));
+       configList.push_back(ConfigInfo("InternetServerPassword", 
CONFIG_TYPE_STRING, ""));
+       configList.push_back(ConfigInfo("InternetServerUseIpv6", 
CONFIG_TYPE_INT, "0"));

Added: packages/trunk/pokerth/debian/pokerth-server.init
===================================================================
--- packages/trunk/pokerth/debian/pokerth-server.init                           
(rev 0)
+++ packages/trunk/pokerth/debian/pokerth-server.init   2008-02-09 00:59:18 UTC 
(rev 5699)
@@ -0,0 +1,151 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          pokerth
+# Required-Start:    $remote_fs
+# Required-Stop:     $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: PokerTH server initscript
+# Description:       This file starts pokerth-server
+### END INIT INFO
+
+# Author: Evgeni Golov <[EMAIL PROTECTED]>
+
+# Do NOT "set -e"
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/games
+DESC="PokerTH server"
+NAME=pokerth-server
+DAEMON=/usr/games/pokerth_server
+DAEMON_ARGS=""
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+STARTAS_USER=pokerth
+STARTAS_GRP=pokerth
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+       # Return
+       #   0 if daemon has been started
+       #   1 if daemon was already running
+       #   2 if daemon could not be started
+       start-stop-daemon --start --chuid $STARTAS_USER:$STARTAS_GRP --quiet 
--pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
+               || return 1
+       start-stop-daemon --start --chuid $STARTAS_USER:$STARTAS_GRP --quiet 
--pidfile $PIDFILE --exec $DAEMON -- \
+               $DAEMON_ARGS \
+               || return 2
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+       # Return
+       #   0 if daemon has been stopped
+       #   1 if daemon was already stopped
+       #   2 if daemon could not be stopped
+       #   other if a failure occurred
+       start-stop-daemon --stop --quiet --retry=TERM/10/KILL/5 --name $NAME
+       RETVAL="$?"
+       [ "$RETVAL" = 2 ] && return 2
+       # Wait for children to finish too if this is a daemon that forks
+       # and if the daemon is only ever run from this initscript.
+       # If the above conditions are not satisfied then add some other code
+       # that waits for the process to drop all resources that could be
+       # needed by services started subsequently.  A last resort is to
+       # sleep for some time.
+       #start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec 
$DAEMON
+       #[ "$?" = 2 ] && return 2
+       # Many daemons don't delete their pidfiles when they exit.
+       rm -f $PIDFILE
+       return "$RETVAL"
+}
+
+#
+# Function that sends a SIGHUP to the daemon/service
+#
+do_reload() {
+       #
+       # If the daemon can reload its configuration without
+       # restarting (for example, when it is sent a SIGHUP),
+       # then implement that here.
+       #
+       start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name 
$NAME
+       return 0
+}
+
+case "$1" in
+  start)
+       [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+       do_start
+       case "$?" in
+               0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+               2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+       esac
+       ;;
+  stop)
+       [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+       do_stop
+       case "$?" in
+               0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+               2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+       esac
+       ;;
+  #reload|force-reload)
+       #
+       # If do_reload() is not implemented then leave this commented out
+       # and leave 'force-reload' as an alias for 'restart'.
+       #
+       #log_daemon_msg "Reloading $DESC" "$NAME"
+       #do_reload
+       #log_end_msg $?
+       #;;
+  restart|force-reload)
+       #
+       # If the "reload" option is implemented then remove the
+       # 'force-reload' alias
+       #
+       log_daemon_msg "Restarting $DESC" "$NAME"
+       do_stop
+       case "$?" in
+         0|1)
+               do_start
+               case "$?" in
+                       0) log_end_msg 0 ;;
+                       1) log_end_msg 1 ;; # Old process is still running
+                       *) log_end_msg 1 ;; # Failed to start
+               esac
+               ;;
+         *)
+               # Failed to stop
+               log_end_msg 1
+               ;;
+       esac
+       ;;
+  *)
+       #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+       echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+       exit 3
+       ;;
+esac
+
+:
+

Added: packages/trunk/pokerth/debian/pokerth-server.install
===================================================================
--- packages/trunk/pokerth/debian/pokerth-server.install                        
        (rev 0)
+++ packages/trunk/pokerth/debian/pokerth-server.install        2008-02-09 
00:59:18 UTC (rev 5699)
@@ -0,0 +1,2 @@
+bin/pokerth_server usr/games/
+debian/config.xml etc/pokerth/

Added: packages/trunk/pokerth/debian/pokerth-server.postinst
===================================================================
--- packages/trunk/pokerth/debian/pokerth-server.postinst                       
        (rev 0)
+++ packages/trunk/pokerth/debian/pokerth-server.postinst       2008-02-09 
00:59:18 UTC (rev 5699)
@@ -0,0 +1,29 @@
+#!/bin/sh
+# postinst script for pokerth-server
+
+set -e
+
+case "$1" in
+  configure)
+  # Set up the pokerth user on new install
+  if [ -z "$2" ]; then
+    if ! getent passwd pokerth >/dev/null; then
+        adduser --system --group --home /var/lib/pokerth pokerth
+    fi
+  fi
+  ;;
+  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
+

Added: packages/trunk/pokerth/debian/pokerth-server.postrm
===================================================================
--- packages/trunk/pokerth/debian/pokerth-server.postrm                         
(rev 0)
+++ packages/trunk/pokerth/debian/pokerth-server.postrm 2008-02-09 00:59:18 UTC 
(rev 5699)
@@ -0,0 +1,25 @@
+#! /bin/sh
+# postrm script for pokerth-server
+
+set -e
+
+case "$1" in
+  purge)
+  if [ -x "/usr/sbin/deluser" ]; then
+    deluser --system --remove-all-files pokerth || true
+    deluser --group pokerth || true
+  fi
+  ;;
+  remove|upgrade|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

Modified: packages/trunk/pokerth/debian/rules
===================================================================
--- packages/trunk/pokerth/debian/rules 2008-02-08 17:59:30 UTC (rev 5698)
+++ packages/trunk/pokerth/debian/rules 2008-02-09 00:59:18 UTC (rev 5699)
@@ -46,8 +46,6 @@
        dh_clean -i -k
        dh_installchangelogs -i
        dh_installdocs -i
-       #dh_installmenu -i
-       #dh_installman -i
        dh_install -i
        dh_link -i
        dh_compress -i
@@ -66,6 +64,7 @@
        dh_installdocs -a
        dh_installmenu -a
        dh_installman -a
+       dh_installinit -a
        dh_install -a
        dh_strip -a 
        dh_compress -a


_______________________________________________
Pkg-games-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/pkg-games-commits

Reply via email to