aboutsummaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/README6
-rw-r--r--debian/changelog17
-rw-r--r--debian/compat1
-rw-r--r--debian/config49
-rw-r--r--debian/control21
-rw-r--r--debian/copyright52
-rwxr-xr-xdebian/etherpad.init186
-rw-r--r--debian/po/POTFILES.in1
-rw-r--r--debian/po/fi.po76
-rw-r--r--debian/po/templates.pot58
-rwxr-xr-xdebian/postinst84
-rw-r--r--debian/postrm41
-rw-r--r--debian/preinst37
-rwxr-xr-xdebian/prerm45
-rwxr-xr-xdebian/rules112
-rw-r--r--debian/source/format1
-rw-r--r--debian/source/lintian-overrides8
-rw-r--r--debian/templates20
18 files changed, 815 insertions, 0 deletions
diff --git a/debian/README b/debian/README
new file mode 100644
index 0000000..21f1d88
--- /dev/null
+++ b/debian/README
@@ -0,0 +1,6 @@
+The Debian Package etherpad
+----------------------------
+
+Comments regarding the Package
+
+ -- Egil Möller <egil.moller@piratpartiet.se> Mon, 26 Apr 2010 19:51:51 +0200
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..a43df1b
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,17 @@
+etherpad (1.0.1) karmic; urgency=low
+
+ * Changed maintainer to Packaging
+
+ -- Etherpad Foundation (Packaging) <packaging@etherpad.org> Mon, 10 May 2010 19:22:19 +0200
+
+etherpad (1.0fixed) karmic; urgency=low
+
+ * Fixed installation scripts
+
+ -- Mikko Rantalainen <mikko.rantalainen@peda.net> Tue, 04 May 2010 12:57:28 +0300
+
+etherpad (1.0) unstable; urgency=low
+
+ * Initial Release.
+
+ -- Egil Möller <egil.moller@piratpartiet.se> Mon, 26 Apr 2010 19:51:51 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/debian/config b/debian/config
new file mode 100644
index 0000000..f97ab33
--- /dev/null
+++ b/debian/config
@@ -0,0 +1,49 @@
+#!/bin/bash
+
+################################################################################
+#
+# Copyright (c) 2010 penSec.IT UG (haftungsbeschränkt)
+# http://www.pensec.it
+# mail@pensec.it
+# Copyright (c) 2010 Egil Möller <egil.moller@piratpartiet.se>
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+#
+################################################################################
+
+
+
+set -e
+. /usr/share/debconf/confmodule
+
+if [ -n "$ETHERPAD_DEBUG" ]; then
+ echo "now debugging $0 $@"
+ set -x
+fi
+
+db_version 2.0
+
+# Set up database
+. /usr/share/dbconfig-common/dpkg/config.mysql
+dbc_go etherpad $@
+
+db_input high "etherpad/admin_password" || true
+db_go
+
+db_get "etherpad/topdomains"
+if ! [ "$RET" ]; then
+ db_set "etherpad/topdomains" "$(hostname -f)"
+fi
+
+db_input high "etherpad/topdomains" || true
+db_go
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..feb76f6
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,21 @@
+Source: etherpad
+Section: contrib/httpd
+Priority: extra
+Maintainer: Etherpad Foundation (Packaging) <packaging@etherpad.org>
+Build-Depends: po-debconf, debhelper (>= 7)
+Build-Depends-indep: dbconfig-common, sun-java6-jdk, mysql-client, libmysql-java, scala (>= 2.7), scala-library (>= 2.7)
+Build-Conflicts: libgcj-common, java-gcj-compat-headless, java-gcj-compat, gcj-4.3-base
+Standards-Version: 3.8.4
+Homepage: http://github.com/ether/pad
+
+Package: etherpad
+Architecture: all
+Depends: ${misc:Depends}, sun-java6-jdk, mysql-client, libmysql-java, scala (>= 2.7), mysql-server, m4
+Pre-Depends: dbconfig-common, debconf, adduser
+Description: A web-based word processor that allows people to work
+ together in real-time.
+ .
+ When multiple people edit the same document simultaneously, any changes are
+ instantly reflected on everyone's screen. The result is a new and productive
+ way to collaborate on text documents, useful for meeting notes, drafting
+ sessions, education, team programming, and more.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..2fb4a07
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,52 @@
+This package was debianized by Egil Möller <egil.moller@piratpartiet.se> on
+Mon, 26 Apr 2010 19:51:51 +0200 and further fixed by Mikko Rantalainen.
+
+It was downloaded from http://github.com/ether/pad
+
+Upstream Author(s):
+
+ Aaron Iba <aaroniba@gmail.com>
+ Chris Ball <cjb@laptop.org>
+ Dan Bentley <dtbentley@gmail.com>
+ David Greenspan <davidgreenspan@gmail.com>
+ Egil Moeller <egil.moller@freecode.no>
+ Elliot Kroo <elliot@kroo.net>
+ Jeff Mitchell <etherpad@jefferai.org>
+ Jeppe Toustrup <jeppe@tenzer.dk>
+ Michael Prasuhn <mike@mikeyp.net>
+ Mikko Rantalainen <mikko.rantalainen@peda.net>
+ penSec.IT UG (haftungsbeschränkt) <etherpad@pensec.it>
+ Per Andersson <avtobiff@gmail.com>
+ Peter Martischka <pita@googlemail.com>
+ Unknown <root@primarypad.com>
+ Simon Bohlin <simon.bohlin@gmail.com>
+ Simon B @piratpartiet <simonb@redhog.org>
+
+Copyright:
+
+ Copyright (C) 2007-2009 Google Inc.
+ Copyright (C) 2009-2010 upstream authors, see above
+
+License:
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted under the terms of the BSD License.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+On Debian systems, the complete text of the Apache 2.0 License can be
+found in `/usr/share/common-licenses/Apache-2.0'.
+
+The Debian packaging is copyright 2010, Egil Möller <egil.moller@piratpartiet.se> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
+
diff --git a/debian/etherpad.init b/debian/etherpad.init
new file mode 100755
index 0000000..225ef3d
--- /dev/null
+++ b/debian/etherpad.init
@@ -0,0 +1,186 @@
+#!/bin/bash
+
+### BEGIN INIT INFO
+# Provides: etherpad
+# Required-Start: $networking $syslog $remote_fs
+# Required-Stop: $networking $syslog $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Run Etherpad
+# Description: A web-based word processor that allows
+# people to work together in real-time.
+# .
+# When multiple people edit the same document simultaneously,
+# any changes are instantly reflected on everyone's screen.
+# The result is a new and productive way to collaborate on
+# text documents, useful for meeting notes, drafting
+# sessions, education, team programming, and more.
+### END INIT INFO
+
+# Author: penSec.IT UG (haftungsbeschränkt) <mail@pensec.it>
+# Author: Per Andersson <avtobiff@gmail.com>
+# Author: Mikko Rantalainen <mikko.rantalainen@peda.net>
+
+################################################################################
+#
+# Copyright (c) 2010 penSec.IT UG (haftungsbeschränkt)
+# http://www.pensec.it
+# mail@pensec.it
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+#
+################################################################################
+
+# Do NOT "set -e"
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="Collaborative real-time editor"
+NAME="etherpad"
+DAEMON_BASE="/usr/share/etherpad"
+DAEMON=$DAEMON_BASE/bin/run.sh
+DAEMON_ARGS=""
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# 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
+[ -f /etc/default/rcS ] && . /etc/default/rcS
+
+# 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 --background --chdir $DAEMON_BASE --chuid etherpad:etherpad --start --quiet --make-pidfile --pidfile $PIDFILE --exec $DAEMON --test \
+ || return 1
+ start-stop-daemon --background --chdir $DAEMON_BASE --chuid etherpad:etherpad --start --quiet --make-pidfile --pidfile $PIDFILE --exec $DAEMON -- \
+ $DAEMON_ARGS \
+ || return 2
+ # Add code here, if necessary, that waits for the process to be ready
+ # to handle requests from services started subsequently which depend
+ # on this one. As a last resort, sleep for some time.
+}
+
+#
+# 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/30/KILL/5 --pidfile $PIDFILE
+ 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
+ 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
+ ;;
+ status)
+ status_of_proc -p $PIDFILE "$DAEMON" "$NAME" && exit 0 || exit $?
+ ;;
+ #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|status|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
+
+:
+
diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in
new file mode 100644
index 0000000..cef83a3
--- /dev/null
+++ b/debian/po/POTFILES.in
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] templates
diff --git a/debian/po/fi.po b/debian/po/fi.po
new file mode 100644
index 0000000..788d6f0
--- /dev/null
+++ b/debian/po/fi.po
@@ -0,0 +1,76 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# Mikko Rantalainen <mikko.rantalainen@peda.net>, 2010
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: etherpad@packages.debian.org\n"
+"POT-Creation-Date: 2010-05-06 11:07+0300\n"
+"PO-Revision-Date: 2010-05-06 11:13+0300\n"
+"Last-Translator: Mikko Rantalainen <mikko.rantalainen@peda.net>\n"
+"Language-Team: Peda.net\n"
+"Language: fi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Virtaal 0.3.1\n"
+
+#. Type: password
+#. Default
+#. Note: the translation of this string should match the prompt below
+#: ../templates:1001
+msgid "password"
+msgstr "salasana"
+
+#. Type: password
+#. Description
+#. Note: the translation of this string should match the default password above
+#: ../templates:1002
+msgid "Etherpad administrator password:"
+msgstr "Etherpad-ylläpitäjän salasana:"
+
+#. Type: password
+#. Description
+#. Note: the translation of this string should match the default password above
+#: ../templates:1002
+msgid ""
+"The Etherpad system can be administrated with a browser. To make this safe, "
+"a good password should be set for the administrator. The default is password "
+"is \"password\" (THIS IS NOT SAFE)."
+msgstr ""
+"Etherpad-järjestelmää voidaan ylläpitää selaimella. Ylläpitäjällä tulee olla "
+"hyvä salasana, jotta tämä olisi turvallista. Oletuksena salasana on "
+"\"salasana\" (TÄMÄ EI OLE TURVALLINENN SALASANA)."
+
+#. Type: string
+#. Description
+#: ../templates:2001
+msgid "Fully qualified domain name of the site:"
+msgstr "Etherpad-palvelimen osoite (esimerkiksi example.com):"
+
+#. Type: string
+#. Description
+#: ../templates:2001
+msgid ""
+"The system needs to know the fully qualified domain name of the site where "
+"etherpad system is visible to the world. This may be different from the name "
+"of the system where etherpad is installed (e.g. in case of reverse proxy or "
+"port forwarding). Notice that if you enter \"example.com\" here, the service "
+"will be available at \"http://example.com:9000\" by default."
+msgstr ""
+"Järjestelmän tulee tietää Etherpad-palvelun täydellinen julkinen domain-"
+"nimi. Tämä voi olla eri kuin sen tietokoneen domain-nimi, johon palvelu "
+"asennetaan (esimerkiksi kun käytetään porttien uudelleenohjausta tai reverse "
+"proxy -määrityksiä). Huomaa, että jos syötät tässä \"example.com\", niin "
+"palvelu on oletuksena nähtävillä osoitteessa \"http://example.com:9000\"."
+
+#~ msgid "Please insert the administration password, default is password."
+#~ msgstr ""
+#~ "Koko Etherpad-asennuksen pääkäyttäjän salasana, oletus on \"salasana\"."
+
+#~ msgid "Please insert the domain name of your site."
+#~ msgstr ""
+#~ "Syötä tähän Etherpad-palvelimesi osoite. Varsinainen Etherpad-palvelu "
+#~ "toimii oletuksena portissa 9000 (esimerkiksi http://example.com:9000)."
diff --git a/debian/po/templates.pot b/debian/po/templates.pot
new file mode 100644
index 0000000..92cb5bc
--- /dev/null
+++ b/debian/po/templates.pot
@@ -0,0 +1,58 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: etherpad@packages.debian.org\n"
+"POT-Creation-Date: 2010-05-06 11:07+0300\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: password
+#. Default
+#. Note: the translation of this string should match the prompt below
+#: ../templates:1001
+msgid "password"
+msgstr ""
+
+#. Type: password
+#. Description
+#. Note: the translation of this string should match the default password above
+#: ../templates:1002
+msgid "Etherpad administrator password:"
+msgstr ""
+
+#. Type: password
+#. Description
+#. Note: the translation of this string should match the default password above
+#: ../templates:1002
+msgid ""
+"The Etherpad system can be administrated with a browser. To make this safe, "
+"a good password should be set for the administrator. The default is password "
+"is \"password\" (THIS IS NOT SAFE)."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:2001
+msgid "Fully qualified domain name of the site:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:2001
+msgid ""
+"The system needs to know the fully qualified domain name of the site where "
+"etherpad system is visible to the world. This may be different from the name "
+"of the system where etherpad is installed (e.g. in case of reverse proxy or "
+"port forwarding). Notice that if you enter \"example.com\" here, the service "
+"will be available at \"http://example.com:9000\" by default."
+msgstr ""
diff --git a/debian/postinst b/debian/postinst
new file mode 100755
index 0000000..3ce2754
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,84 @@
+#!/bin/bash
+
+################################################################################
+#
+# Copyright (c) 2010 penSec.IT UG (haftungsbeschränkt)
+# http://www.pensec.it
+# mail@pensec.it
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+#
+################################################################################
+
+
+
+set -e
+. /usr/share/debconf/confmodule
+
+if [ -n "$ETHERPAD_DEBUG" ]; then
+ echo "now debugging $0 $@"
+ set -x
+fi
+
+db_version 2.0
+
+. /usr/share/dbconfig-common/dpkg/postinst.mysql
+dbc_go etherpad $@
+
+db_get "etherpad/admin_password"
+db_admin_password="$RET"
+db_get "etherpad/topdomains"
+db_topdomains="$RET"
+
+. /etc/dbconfig-common/etherpad.conf
+
+
+
+# Create system user
+if ! getent passwd etherpad > /dev/null ; then
+ echo 'Adding system-user for etherpad' 1>&2
+ adduser --system --group --quiet \
+ --home /usr/share/etherpad --no-create-home \
+ --disabled-login --force-badname etherpad
+fi
+
+# Give user the rights to write into the log & data directory
+chown -R etherpad:etherpad "/var/log/etherpad"
+chown -R etherpad:etherpad "/usr/share/etherpad/etherpad/data"
+# Give user the rights do write everywhere, did not yet figure
+# out which rights are necessary, exactly
+chown -R etherpad:etherpad "/usr/share/etherpad"
+
+if ! [ "$dbc_dbserver" ]; then
+ dbc_dbserver=localhost
+fi
+if ! [ "$dbc_dbport" ]; then
+ dbc_dbport=3306
+fi
+
+
+m4 \
+ -D __db_admin_password__="$db_admin_password" \
+ -D __dbc_dbserver__="$dbc_dbserver" \
+ -D __dbc_dbport__="$dbc_dbport" \
+ -D __dbc_dbname__="$dbc_dbname" \
+ -D __dbc_dbpass__="$dbc_dbpass" \
+ -D __dbc_dbuser__="$dbc_dbuser" \
+ -D __db_topdomains__="$db_topdomains" \
+ < /etc/etherpad/etherpad.local.properties.tmpl \
+ > /etc/etherpad/etherpad.local.properties
+
+chown etherpad:etherpad /etc/etherpad/etherpad.local.properties
+
+#DEBHELPER#
+
diff --git a/debian/postrm b/debian/postrm
new file mode 100644
index 0000000..1e555a0
--- /dev/null
+++ b/debian/postrm
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+################################################################################
+#
+# Copyright (c) 2010 penSec.IT UG (haftungsbeschränkt)
+# http://www.pensec.it
+# mail@pensec.it
+# Copyright (c) 2010 Egil Möller <egil.moller@piratpartiet.se>
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+#
+################################################################################
+
+
+
+set -e
+. /usr/share/debconf/confmodule
+
+if [ -n "$ETHERPAD_DEBUG" ]; then
+ echo "now debugging $0 $@"
+ set -x
+fi
+
+db_version 2.0
+
+# Set up database
+. /usr/share/dbconfig-common/dpkg/postrm.mysql
+dbc_go etherpad $@
+
+#DEBHELPER#
+
diff --git a/debian/preinst b/debian/preinst
new file mode 100644
index 0000000..9f854cb
--- /dev/null
+++ b/debian/preinst
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+################################################################################
+#
+# Copyright (c) 2010 penSec.IT UG (haftungsbeschränkt)
+# http://www.pensec.it
+# mail@pensec.it
+# Copyright (c) 2010 Egil Möller <egil.moller@piratpartiet.se>
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+#
+################################################################################
+
+
+
+set -e
+. /usr/share/debconf/confmodule
+
+if [ -n "$ETHERPAD_DEBUG" ]; then
+ echo "now debugging $0 $@"
+ set -x
+fi
+
+db_version 2.0
+
+#DEBHELPER#
+
diff --git a/debian/prerm b/debian/prerm
new file mode 100755
index 0000000..ddabe3e
--- /dev/null
+++ b/debian/prerm
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+################################################################################
+#
+# Copyright (c) 2010 penSec.IT UG (haftungsbeschränkt)
+# http://www.pensec.it
+# mail@pensec.it
+# Copyright (c) 2010 Egil Möller <egil.moller@piratpartiet.se>
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+#
+################################################################################
+
+
+
+set -e
+. /usr/share/debconf/confmodule
+
+if [ -n "$ETHERPAD_DEBUG" ]; then
+ echo "now debugging $0 $@"
+ set -x
+fi
+
+db_version 2.0
+
+# Set up database
+. /usr/share/dbconfig-common/dpkg/prerm.mysql
+dbc_go etherpad $@
+
+# Remove log+data directories, otherwise uninstall will fail
+rm -rf /var/log/etherpad
+rm -rf /usr/share/etherpad/etherpad/data
+
+#DEBHELPER#
+
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..d1253c7
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,112 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# This file is public domain software, originally written by Joey Hess.
+#
+# This version is for packages that are architecture independent.
+#
+# Rules to build etherpad
+#
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+build: build-stamp
+build-stamp:
+ dh_testdir
+
+ # Add here commands to compile the package.
+ #$(MAKE)
+ bin/build.sh
+ touch build-stamp
+
+clean:
+ # update template translation strings commented out as git-buildpackage complains that the file changes all the times otherwise...
+ # debconf-updatepo
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp
+
+ # Add here commands to clean up after the build process.
+ #$(MAKE) clean
+ #$(MAKE) distclean
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_prep
+ dh_installdirs
+
+ # Add here commands to install the package into debian/<packagename>.
+ #$(MAKE) prefix=`pwd`/debian/`dh_listpackages`/usr install
+
+ # Add here commands to install the indep part of the package into
+ # debian/<package>-doc.
+ #INSTALLDOC#
+
+ mkdir -p debian/etherpad/usr/share/etherpad
+
+ # try to copy content correctly
+ cp -a $$(ls | grep -E -v 'debian|LICENSE|COPYING|INSTALL') debian/etherpad/usr/share/etherpad
+ # fix ups (because the above copy is too dump), remove unneeded stuff
+ find debian/etherpad -type f -and -name ".gitignore" -exec rm {} +
+ find debian/etherpad -type f -and -name "build-stamp" -exec rm {} +
+
+ # create directory to save user data
+ mkdir -p debian/etherpad/usr/share/etherpad/etherpad/data
+
+ mkdir -p debian/etherpad/etc
+ mv debian/etherpad/usr/share/etherpad/etherpad/etc debian/etherpad/etc/etherpad
+ ln -s /etc/etherpad debian/etherpad/usr/share/etherpad/etherpad/etc
+
+ mkdir -p debian/etherpad/var/log/etherpad
+ mkdir -p debian/etherpad/usr/share/lintian/overrides
+ cp debian/source/lintian-overrides debian/etherpad/usr/share/lintian/overrides/etherpad
+
+ #mkdir -p debian/etherpad/etc/init.d
+ #ln -s /usr/share/etherpad/bin/etherpad.init.d debian/etherpad/etc/init.d/etherpad
+ dh_installinit --update-rcd-params="start 05 2 3 4 5 . stop 95 S 0 1 6 ."
+
+ dh_install -i
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ # on the fly final copyright file creation:
+ cat debian/copyright LICENSE > debian/etherpad/usr/share/doc/etherpad/copyright
+ dh_installexamples
+# dh_installmenu
+ dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installcatalogs
+# dh_installpam
+# dh_installmime
+# dh_installinit
+# dh_installcron
+# dh_installinfo
+# dh_installwm
+# dh_installudev
+# dh_lintian
+# dh_bugfiles
+# dh_undocumented
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+# dh_perl
+ dh_installdeb
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# Build architecture-dependent files here.
+binary-arch: build install
+# We have nothing to do by default.
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides
new file mode 100644
index 0000000..31f525d
--- /dev/null
+++ b/debian/source/lintian-overrides
@@ -0,0 +1,8 @@
+# The script infrastructure/ace/bin/serve is really a scala program
+# but contains magic to make it as executable shell script (the couple first
+# lines in the script will execute scala on itself):
+etherpad source: shell-script-fails-syntax-check ./usr/share/etherpad/infrastructure/ace/bin/serve
+etherpad binary: shell-script-fails-syntax-check ./usr/share/etherpad/infrastructure/ace/bin/serve
+# The template already has a comment for the default field, lintian would
+# want to have an extra comment inside the string to translate, I don't agree:
+etherpad source: translated-default-field templates: 4
diff --git a/debian/templates b/debian/templates
new file mode 100644
index 0000000..19c3886
--- /dev/null
+++ b/debian/templates
@@ -0,0 +1,20 @@
+Template: etherpad/admin_password
+Type: password
+# Note: the translation of this string should match the prompt below
+_Default: password
+# Note: the translation of this string should match the default password above
+_Description: Etherpad administrator password:
+ The Etherpad system can be administrated with a browser. To make this
+ safe, a good password should be set for the administrator.
+ The default is password is "password" (THIS IS NOT SAFE).
+
+Template: etherpad/topdomains
+Type: string
+Default: localhost
+_Description: Fully qualified domain name of the site:
+ The system needs to know the fully qualified domain name of the site where
+ etherpad system is visible to the world. This may be different from the
+ name of the system where etherpad is installed (e.g. in case of reverse proxy
+ or port forwarding). Notice that if you enter "example.com" here, the service
+ will be available at "http://example.com:9000" by default.
+