--- sobby-0.4.7.orig/debian/NEWS
+++ sobby-0.4.7/debian/NEWS
@@ -0,0 +1,11 @@
+sobby (0.4.7-2) unstable; urgency=low
+
+ Sobby now includes a configuration file and an init script. Sobby
+ is started by default as an unpriviledged user created on package
+ installation. You might need to adapt your own service startup
+ method and possibly deactivate the sobby startup in `/etc/default/sobby'.
+
+ Please see `/etc/sobby.conf' for configuration options.
+
+ -- Philipp Kern <pkern@debian.org> Sat, 19 Jun 2010 14:31:21 +0200
+
--- sobby-0.4.7.orig/debian/prerm
+++ sobby-0.4.7/debian/prerm
@@ -0,0 +1,14 @@
+#!/bin/sh
+# vim:set et ts=2 sw=2:
+
+set -e
+
+# Make sure the autosave file is actually writeable before stopping the
+# server.
+if [ -d /var/lib/sobby ]; then
+ chown -R sobby:sobby /var/lib/sobby
+ chmod 0750 /var/lib/sobby
+fi
+
+#DEBHELPER#
+
--- sobby-0.4.7.orig/debian/copyright
+++ sobby-0.4.7/debian/copyright
@@ -0,0 +1,24 @@
+This package was debianized by Philipp Kern <pkern@debian.org> on
+Mon, 19 Dec 2005 19:12:51 +0100.
+
+It was downloaded from <http://releases.0x539.de/gobby/>.
+
+Copyright (C) 2005-2008 0x539 dev group <crew@0x539.de>
+
+License:
+
+ This program is written by the 0x539 dev group and is licensed
+ under the GNU General Public License (GPL) version 2 or any
+ later version. A copy of the license is included in the
+ distribution.
+
+ 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.
+
+ Copyright (C) 2005-2008 0x539 dev group <crew@0x539.de>
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+
--- sobby-0.4.7.orig/debian/watch
+++ sobby-0.4.7/debian/watch
@@ -0,0 +1,3 @@
+version=3
+http://releases.0x539.de/sobby/ sobby-(\d\.\d\.\d)\.tar\.gz
+
--- sobby-0.4.7.orig/debian/sobby.default
+++ sobby-0.4.7/debian/sobby.default
@@ -0,0 +1,12 @@
+# defaults file for sobby
+
+# Should sobby be started by the init script? (true/false)
+SOBBY_ENABLED=true
+
+# The configuration file to be used.
+SOBBY_CONFIG=/etc/sobby.conf
+
+# The session autosave file to be updated periodically and loaded
+# upon startup.
+SOBBY_SESSION_FILE=/var/lib/sobby/autosave.obby
+
--- sobby-0.4.7.orig/debian/control
+++ sobby-0.4.7/debian/control
@@ -0,0 +1,16 @@
+Source: sobby
+Section: net
+Priority: optional
+Maintainer: Philipp Kern <pkern@debian.org>
+Build-Depends: debhelper (>= 5), autotools-dev, pkg-config, libnet6-1.3-dev (>= 1:1.3.12), libobby-0.4-dev (>= 0.4.6), libglibmm-2.4-dev (>= 2.6.0), libxml++2.6-dev (>= 2.6.1-2.2)
+Standards-Version: 3.8.4
+
+Package: sobby
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
+Description: a dedicated server for collaborative editing
+ Sobby is a dedicated server which allows clients to edit plain text
+ documents and source files collaboratively over a network. Changes
+ to the documents are synchronised instantly to the other clients.
+ .
+ It serves the documents using the same protocol as Gobby.
--- sobby-0.4.7.orig/debian/rules
+++ sobby-0.4.7/debian/rules
@@ -0,0 +1,90 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+config.status: configure
+ dh_testdir
+ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+ cp -f /usr/share/misc/config.sub config.sub
+endif
+ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+ cp -f /usr/share/misc/config.guess config.guess
+endif
+ CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
+ --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
+ --mandir=\$${prefix}/share/man \
+ --infodir=\$${prefix}/share/info \
+ --disable-zeroconf
+
+build: build-stamp
+
+build-stamp: config.status
+ dh_testdir
+ $(MAKE)
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp
+
+ [ ! -f Makefile ] || $(MAKE) distclean
+ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+ cp -f /usr/share/misc/config.sub config.sub
+endif
+ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+ cp -f /usr/share/misc/config.guess config.guess
+endif
+
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ $(MAKE) install DESTDIR=$(CURDIR)/debian/sobby
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs ChangeLog
+ dh_installdocs
+ dh_installman
+ dh_installinit -- start 90 2 3 4 5 . stop 10 1 0 6 .
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
--- sobby-0.4.7.orig/debian/changelog
+++ sobby-0.4.7/debian/changelog
@@ -0,0 +1,97 @@
+sobby (0.4.7-2+squeeze1) squeeze; urgency=low
+
+ * The init script creates a new session file if it does not exist yet.
+ Add a chown call to make it writeable by sobby, which is not run
+ as root. Make sure to chown the file before sobby's stopped, in
+ prerm, so that the write on termination has a chance to succeed.
+ (Closes: #613085)
+
+ -- Philipp Kern <pkern@debian.org> Sat, 12 Feb 2011 21:09:04 +0100
+
+sobby (0.4.7-2) unstable; urgency=low
+
+ * Add an init script by adapting an initial proposal by Dustin Kirkland.
+ (Closes: #586329, #405915)
+ * Create sobby system user and group in postinst and delete them on
+ purge. (LP: #594857)
+ * Added a NEWS entry about the init script.
+
+ -- Philipp Kern <pkern@debian.org> Sat, 19 Jun 2010 13:29:08 +0200
+
+sobby (0.4.7-1) unstable; urgency=low
+
+ * New upstream release
+ * Bump net6 build-dep to instantiate the newest templates.
+ * Bump debhelper compat version to 5.
+
+ -- Philipp Kern <pkern@debian.org> Wed, 10 Feb 2010 12:59:34 +0100
+
+sobby (0.4.5-1) unstable; urgency=low
+
+ * New upstream release
+ * Bump obby build-dep to instantiate the newest templates.
+ * Do not ignore errors on make distclean.
+
+ -- Philipp Kern <pkern@debian.org> Wed, 15 Oct 2008 18:55:58 +0200
+
+sobby (0.4.4-2) unstable; urgency=low
+
+ * Add a reference to gobby to sobby's description.
+
+ -- Philipp Kern <pkern@debian.org> Tue, 09 Sep 2008 11:41:09 +0200
+
+sobby (0.4.4-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Philipp Kern <pkern@debian.org> Sun, 19 Aug 2007 17:53:29 +0200
+
+sobby (0.4.3-1) unstable; urgency=low
+
+ * New upstream release
+ * Bump build-dependencies to include the newest templates from net6
+ and obby
+
+ -- Philipp Kern <pkern@debian.org> Mon, 4 Jun 2007 09:31:38 +0200
+
+sobby (0.4.1-1) unstable; urgency=low
+
+ * New upstream release
+ * Zeroconf support deactivated in Sobby; the library will still be
+ pulled in to satisfy obby, but not be called in any way
+
+ -- Philipp Kern <pkern@debian.org> Tue, 29 Aug 2006 13:42:25 +0200
+
+sobby (0.3.99+0.4.0rc1-1) experimental; urgency=low
+
+ * New upstream release
+
+ -- Philipp Kern <pkern@debian.org> Sun, 23 Jul 2006 10:09:04 +0200
+
+sobby (0.3.0-4) unstable; urgency=low
+
+ * Made the Zeroconf warning more concrete and less alerting
+ * Tightened the build-dependency on the updated obby
+
+ -- Philipp Kern <pkern@debian.org> Mon, 3 Jul 2006 18:06:05 +0200
+
+sobby (0.3.0-3) unstable; urgency=low
+
+ * Do not bail out on Zeroconf failures, print a warning only;
+ recommend `avahi-daemon' (Closes: #358624)
+
+ -- Philipp Kern <pkern@debian.org> Tue, 11 Apr 2006 15:53:42 +0200
+
+sobby (0.3.0-2) unstable; urgency=low
+
+ * Enabled Zeroconf support through linking against Avahi's
+ compatibility layer for Howl legacy applications
+
+ -- Philipp Kern <pkern@debian.org> Tue, 17 Jan 2006 15:12:14 +0100
+
+sobby (0.3.0-1) unstable; urgency=low
+
+ * Initial release (Closes: #343699)
+
+ -- Philipp Kern <pkern@debian.org> Mon, 19 Dec 2005 19:12:51 +0100
+
--- sobby-0.4.7.orig/debian/postrm
+++ sobby-0.4.7/debian/postrm
@@ -0,0 +1,23 @@
+#!/bin/sh
+# vim:set et ts=2 sw=2:
+
+set -e
+
+if [ "$1" = "purge" ] ; then
+ if getent passwd sobby >/dev/null; then
+ if [ -x /usr/sbin/deluser ]; then
+ deluser --system sobby
+ fi
+ fi
+ if getent group sobby >/dev/null; then
+ if [ -x /usr/sbin/delgroup ]; then
+ delgroup --system sobby
+ fi
+ fi
+ if [ -d /var/lib/sobby ]; then
+ rm -r /var/lib/sobby
+ fi
+fi
+
+#DEBHELPER#
+
--- sobby-0.4.7.orig/debian/postinst
+++ sobby-0.4.7/debian/postinst
@@ -0,0 +1,29 @@
+#!/bin/sh
+# vim:set et ts=2 sw=2:
+
+set -e
+
+# creating sobby group if it isn't already there
+if ! getent group sobby >/dev/null; then
+ addgroup --system sobby
+fi
+
+# creating gdm user if he isn't already there
+if ! getent passwd sobby >/dev/null; then
+ adduser \
+ --system \
+ --ingroup sobby \
+ --home /var/lib/sobby \
+ --gecos "Sobby collaborative editing server" \
+ sobby
+fi
+
+[ -d /var/lib/sobby ] || mkdir /var/lib/sobby
+
+if [ -d /var/lib/sobby ]; then
+ chown -R sobby:sobby /var/lib/sobby
+ chmod 0750 /var/lib/sobby
+fi
+
+#DEBHELPER#
+
--- sobby-0.4.7.orig/debian/docs
+++ sobby-0.4.7/debian/docs
@@ -0,0 +1,2 @@
+NEWS
+README
--- sobby-0.4.7.orig/debian/dirs
+++ sobby-0.4.7/debian/dirs
@@ -0,0 +1 @@
+usr/bin
--- sobby-0.4.7.orig/debian/compat
+++ sobby-0.4.7/debian/compat
@@ -0,0 +1 @@
+5
--- sobby-0.4.7.orig/debian/sobby.init
+++ sobby-0.4.7/debian/sobby.init
@@ -0,0 +1,90 @@
+#! /bin/sh
+
+### BEGIN INIT INFO
+# Provides: sobby
+# Required-Start: $remote_fs $network
+# Required-Stop: $remote_fs $network
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: collaborative text editor service
+# Description: Sobby is a dedicated server for collaborative text
+# editor using the same protocol as Gobby.
+### END INIT INFO
+
+set -e
+
+PRG=sobby
+DAEMON=/usr/bin/$PRG
+PIDFILE=/var/run/$PRG.pid
+DESC="collaborative text editor service"
+
+
+test -x $DAEMON || exit 0
+
+. /lib/lsb/init-functions
+
+# defaults
+SOBBY_ENABLED=true
+SOBBY_CONFIG=/etc/sobby.conf
+SOBBY_SESSION_FILE=/var/lib/sobby/autosave.obby
+[ -f /etc/default/$PRG ] && . /etc/default/$PRG
+
+[ "$SOBBY_ENABLED" = "true" ] || exit 0
+
+create_session_file() {
+ [ -f "$SOBBY_SESSION_FILE" ] && return
+ cat > "$SOBBY_SESSION_FILE" <<EOF
+!obby
+session version="0.4.7"
+ user_table
+ chat
+EOF
+ chown sobby: "$SOBBY_SESSION_FILE"
+}
+
+do_start() {
+ [ ! -f "$SOBBY_SESSION_FILE" ] && create_session_file
+ log_daemon_msg "Starting $DESC"
+ log_progress_msg "$PRG"
+ if start-stop-daemon --start --quiet --background \
+ --pidfile $PIDFILE --make-pidfile \
+ --chuid sobby --chdir /var/lib/sobby \
+ --exec $DAEMON -- -c "$SOBBY_CONFIG" \
+ --autosave-file "$SOBBY_SESSION_FILE" \
+ "$SOBBY_SESSION_FILE" ; then
+ log_end_msg 0
+ else
+ log_end_msg 1
+ fi
+}
+
+do_stop() {
+ log_daemon_msg "Stopping $DESC"
+ log_progress_msg "$PRG"
+ start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
+ log_end_msg $?
+ rm -f $PIDFILE
+}
+
+case "$1" in
+ start)
+ do_start
+ ;;
+ stop)
+ do_stop
+ ;;
+ reload|force-reload|restart)
+ do_stop
+ do_start
+ ;;
+ status)
+ status_of_proc -p $PIDFILE $DAEMON $PRG
+ ;;
+ *)
+ echo "Usage: /etc/init.d/$PRG {start|stop|reload|force-reload|restart|status}"
+ exit 1
+ ;;
+esac
+
+exit 0
+
--- sobby-0.4.7.orig/debian/install
+++ sobby-0.4.7/debian/install
@@ -0,0 +1 @@
+debian/sobby.conf etc/
--- sobby-0.4.7.orig/debian/sobby.conf
+++ sobby-0.4.7/debian/sobby.conf
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sobby_config>
+ <settings>
+ <autosave_directory></autosave_directory>
+<!-- This option is set in `/etc/default/sobby'. -->
+<!-- <autosave_file>/var/lib/sobby/autosave.obby</autosave_file> -->
+ <autosave_interval>60</autosave_interval>
+ <command_directory></command_directory>
+ <name>Standalone obby server</name>
+ <password></password>
+ <port>6522</port>
+ <post_save_hook></post_save_hook>
+<!-- This option is set in `/etc/default/sobby'. -->
+<!-- <session>/var/lib/sobby/autosave.obby</session>-->
+ </settings>
+</sobby_config>