]> git.donarmstrong.com Git - roundcube.git/commitdiff
Imported Debian patch 0.1~beta2.2~dfsg-1
authorRomain Beauxis <toots@rastageeks.org>
Tue, 13 Mar 2007 12:28:05 +0000 (13:28 +0100)
committerJérémy Bobbio <lunar@debian.org>
Sat, 18 Jun 2011 15:36:08 +0000 (17:36 +0200)
27 files changed:
debian/README.Debian-sources [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/conf/apache.conf [new file with mode: 0644]
debian/config [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/control.in [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/cron.daily [new file with mode: 0644]
debian/default [new file with mode: 0644]
debian/dirs [new file with mode: 0644]
debian/docs [new file with mode: 0644]
debian/install [new file with mode: 0644]
debian/links [new file with mode: 0644]
debian/logrotate [new file with mode: 0644]
debian/patches/correct_install_path.patch [new file with mode: 0644]
debian/patches/dbconfig-common_support.patch [new file with mode: 0644]
debian/patches/series [new file with mode: 0644]
debian/patches/use_mcrypt.patch [new file with mode: 0644]
debian/po/POTFILES.in [new file with mode: 0644]
debian/po/templates.pot [new file with mode: 0644]
debian/postinst [new file with mode: 0644]
debian/postrm [new file with mode: 0644]
debian/prerm [new file with mode: 0644]
debian/rules [new file with mode: 0755]
debian/templates [new file with mode: 0644]
debian/watch [new file with mode: 0644]

diff --git a/debian/README.Debian-sources b/debian/README.Debian-sources
new file mode 100644 (file)
index 0000000..9d4be26
--- /dev/null
@@ -0,0 +1,9 @@
+Debian roundcube package.
+=========================
+
+This package uses a DES encryption using mcrypt instead of the
+original des.inc file. Indeed, the licence of this file was not DFSG
+and mcrypt is a very good DFSG drop down alternative..
+
+File removed from upstream tarball: programs/lib/des.inc
+
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..0a9d79b
--- /dev/null
@@ -0,0 +1,5 @@
+roundcube (0.1~beta2.2~dfsg-1) experimental; urgency=low
+
+  * Initial release. (Closes: #333756, #344949)
+
+ -- Romain Beauxis <toots@rastageeks.org>  Tue, 13 Mar 2007 13:28:05 +0100
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/debian/conf/apache.conf b/debian/conf/apache.conf
new file mode 100644 (file)
index 0000000..1f5cffa
--- /dev/null
@@ -0,0 +1,25 @@
+# This alias does not work properly with several hosts on your apache server
+# Uncomment it to use it
+#    Alias /roundcube /var/lib/roundcube
+
+<Directory /var/lib/roundcube/>
+        Options +FollowSymLinks
+        AllowOverride All
+        order allow,deny
+        allow from all
+</Directory>
+
+# Protecting basic directories:
+<Directory /var/lib/roundcube/config>
+        Options -FollowSymLinks
+        AllowOverride None
+</Directory>
+
+<Directory /var/lib/roundcube/temp>
+        Options -FollowSymLinks
+        AllowOverride None
+       Order allow,deny
+       Deny from all
+</Directory>
+
+
diff --git a/debian/config b/debian/config
new file mode 100644 (file)
index 0000000..c5ef209
--- /dev/null
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+db_input medium roundcube/hosts || true
+db_go || true
+
+# Retrieve all available languages
+instd_langs=$(echo /usr/share/roundcube/program/localization/*/messages.inc | \
+    sed 's+[^ ]*/\([^ ]*\)/messages.inc+\1,+g' | sed 's+,$++')
+# Retrieve the old list
+db_metaget roundcube/language languages && oldchoices="$RET"
+if [ ! "$oldchoices" ] || [ "$instd_langs" != "$oldchoices" ]; then
+       db_subst roundcube/language languages $instd_langs
+       db_fset roundcube/language seen false
+       # Try to guess the locale
+       locale=$(echo $LANG | sed 's/[@\.].*//')
+       if [ -d /usr/share/roundcube/program/localization/$locale ]; then
+          db_set roundcube/language $locale
+       else
+          locale=$(echo $locale | sed 's/_.*//')
+          if [ -d /usr/share/roundcube/program/localization/$locale ]; then
+              db_set roundcube/language $locale
+          else
+              db_set roundcube/language en_US
+          fi
+       fi
+fi
+# Ask the question
+db_input medium roundcube/language || true
+db_go || true
+
+if [ -f /usr/share/dbconfig-common/dpkg/config ]; then
+        dbc_dbtypes="mysql, pgsql, sqlite"
+        dbc_authmethod_user="password"
+        . /usr/share/dbconfig-common/dpkg/config 
+        dbc_go roundcube $@
+fi
+
+db_input medium roundcube/reconfigure-webserver || true
+db_go || true
+db_input medium roundcube/restart-webserver || true
+db_go || true
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..1611b69
--- /dev/null
@@ -0,0 +1,22 @@
+Source: roundcube
+Section: web
+Priority: extra
+Maintainer: Debian Roundcube Maintainers <pkg-roundcube-maintainers@lists.alioth.debian.org>
+Uploaders: Vincent Bernat <bernat@luffy.cx>, Romain Beauxis <toots@rastageeks.org>
+Build-Depends: debhelper (>= 5), quilt, patchutils (>= 0.2.25), cdbs (>= 0.4.27-1)
+Build-Depends-Indep: po-debconf
+Standards-Version: 3.7.2
+
+Package: roundcube
+Architecture: all
+Depends: dbconfig-common, debconf | debconf-2.0, apache2 | httpd, php5 | php4, php5-mysql | php4-mysql | php5-pgsql | php4-pgsql | php5-sqlite | php4-sqlite, php5-mcrypt | php4-mcrypt, php-db, php-auth, php-net-smtp, php-net-socket, php-mail-mime, ucf, mysql-client | virtual-mysql-client | postgresql-client-8.1 | postgresql-client | sqlite, ${misc:Depends}
+Suggests: mysql-server | posgresql-server
+Description: modern, skinnable, AJAX based webmail solution for IMAP servers
+ RoundCube Webmail is a browser-based multilingual IMAP client with an
+ application-like user interface. It provides full functionality you
+ expect from an e-mail client, including MIME support, address book,
+ folder manipulation and message filters.
+ .
+ The user interface is fully skinnable using XHTML and CSS 2.
+ .
+  Homepage: http://www.roundcube.net/
diff --git a/debian/control.in b/debian/control.in
new file mode 100644 (file)
index 0000000..1260204
--- /dev/null
@@ -0,0 +1,22 @@
+Source: roundcube
+Section: web
+Priority: extra
+Maintainer: Debian Roundcube Maintainers <pkg-roundcube-maintainers@lists.alioth.debian.org>
+Uploaders: Vincent Bernat <bernat@luffy.cx>, Romain Beauxis <toots@rastageeks.org>
+Build-Depends: @cdbs@
+Build-Depends-Indep: po-debconf
+Standards-Version: 3.7.2
+
+Package: roundcube
+Architecture: all
+Depends: dbconfig-common, debconf | debconf-2.0, apache2 | httpd, php5 | php4, php5-mysql | php4-mysql | php5-pgsql | php4-pgsql | php5-sqlite | php4-sqlite, php-db, php-auth, php-net-smtp, php-net-socket, php-mail-mime, ucf, mysql-client | virtual-mysql-client | postgresql-client-8.1 | postgresql-client | sqlite, ${misc:Depends}
+Suggests: mysql-server | posgresql-server
+Description: modern, skinnable, AJAX based webmail solution for IMAP servers
+ RoundCube Webmail is a browser-based multilingual IMAP client with an
+ application-like user interface. It provides full functionality you
+ expect from an e-mail client, including MIME support, address book,
+ folder manipulation and message filters.
+ .
+ The user interface is fully skinnable using XHTML and CSS 2.
+ .
+  Homepage: http://www.roundcube.net/
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..440d03a
--- /dev/null
@@ -0,0 +1,25 @@
+This package was debianized by Vincent Bernat <bernat@luffy.cx> on
+Sat, 10 Feb 2007 12:38:24 +0100.
+
+It was downloaded from http://www.roundcube.net
+
+Copyright: 2005-2006, RoundCube Dev. - Switzerland
+
+License: GPL
+
+RoundCube may be redistributed under the terms of the GNU GPL,
+Version 2 or later, found on Debian systems in the file 
+/usr/share/common-licenses/GPL
+
+Some files are taken from other projects :
+ - googiespell from amix@amix.dk, MIT license
+ - lib/html2text.inc from jon@chuggnutt.com, GPL license
+ - lib/utf8.class.php from Alexander Minkovsky, public domain
+ - lib/{enriched,icl_commons,imap,mime,utf7}.inc from IlohaMail project, GPL license
+ - lib/encoding/*.map from Unicode, Inc., with "BSD-lite" license
+
+All licenses can be found in the corresponding source file.
+
+The Debian packaging is (C) 2007, Vincent Bernat <bernat@luffy.cx> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
+
diff --git a/debian/cron.daily b/debian/cron.daily
new file mode 100644 (file)
index 0000000..4b071ca
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+MAX_TMPFILE_LIFETIME=5
+# MAX_TMPFILE_LIFETIME can be overridden in this file
+if [ -r /etc/default/roundcube ]; then
+       . /etc/default/roundcube
+fi
+
+find /var/lib/roundcube/temp -type f -mtime +$MAX_TMPFILE_LIFETIME -print0 | xargs -0 -r rm
diff --git a/debian/default b/debian/default
new file mode 100644 (file)
index 0000000..67e646d
--- /dev/null
@@ -0,0 +1,3 @@
+# Uncomment the following line to alter the default delay to clean
+# temporary directory /var/lib/roundcube/temp
+# MAX_TMPFILE_LIFETIME=5
diff --git a/debian/dirs b/debian/dirs
new file mode 100644 (file)
index 0000000..c337f5d
--- /dev/null
@@ -0,0 +1,6 @@
+usr/share/roundcube
+usr/share/dbconfig-common/data/roundcube/install
+etc/roundcube
+var/log/roundcube
+var/lib/roundcube/config
+etc/default
diff --git a/debian/docs b/debian/docs
new file mode 100644 (file)
index 0000000..085fdcf
--- /dev/null
@@ -0,0 +1,3 @@
+README
+UPGRADING
+config/main.inc.php.dist
diff --git a/debian/install b/debian/install
new file mode 100644 (file)
index 0000000..e025be8
--- /dev/null
@@ -0,0 +1,3 @@
+index.php program/ usr/share/roundcube
+skins temp var/lib/roundcube
+debian/conf/* etc/roundcube
diff --git a/debian/links b/debian/links
new file mode 100644 (file)
index 0000000..e93993e
--- /dev/null
@@ -0,0 +1,7 @@
+etc/roundcube/main.inc.php var/lib/roundcube/config/main.inc.php
+etc/roundcube/db.inc.php var/lib/roundcube/config/db.inc.php
+var/lib/roundcube/temp usr/share/roundcube/temp
+var/lib/roundcube/skins usr/share/roundcube/skins
+var/lib/roundcube/config usr/share/roundcube/config
+var/log/roundcube var/lib/roundcube/logs
+var/lib/roundcube/logs usr/share/roundcube/logs
diff --git a/debian/logrotate b/debian/logrotate
new file mode 100644 (file)
index 0000000..9b6c0a9
--- /dev/null
@@ -0,0 +1,6 @@
+/var/log/roundcube/sendmail /var/log/roundcube/errors {
+   weekly
+   rotate 4
+   compress
+   missingok
+}
diff --git a/debian/patches/correct_install_path.patch b/debian/patches/correct_install_path.patch
new file mode 100644 (file)
index 0000000..1b13402
--- /dev/null
@@ -0,0 +1,11 @@
+--- roundcube-0.1~beta2.2/index.php    2006-12-22 23:26:24.000000000 +0100
++++ roundcube-0.1~beta2.2/index.php    2007-03-13 15:36:21.000000000 +0100
+@@ -46,7 +46,7 @@
+ $CHARSET = 'UTF-8';
+ $OUTPUT_TYPE = 'html';
+ $JS_OBJECT_NAME = 'rcmail';
+-$INSTALL_PATH = dirname(__FILE__);
++$INSTALL_PATH = '/var/lib/roundcube';
+ $MAIN_TASKS = array('mail','settings','addressbook','logout');
+ if (empty($INSTALL_PATH))
diff --git a/debian/patches/dbconfig-common_support.patch b/debian/patches/dbconfig-common_support.patch
new file mode 100644 (file)
index 0000000..0394533
--- /dev/null
@@ -0,0 +1,31 @@
+--- roundcube_0.1~beta2.2/config/db.inc.php.dist        2006-03-20 23:08:51.000000000 +0100
++++ roundcube_0.1~beta2.2/config/db.inc.php.dist  2007-03-13 14:33:38.000000000 +0100
+@@ -14,13 +14,20 @@
+
+ $rcmail_config = array();
+
+-// PEAR database DSN for read/write operations
+-// format is db_provider://user:password@host/databse
+-// currentyl suported db_providers: mysql, sqlite
+-
+-$rcmail_config['db_dsnw'] = 'mysql://roundcube:pass@localhost/roundcubemail';
+-// postgres example: 'pgsql://roundcube:pass@localhost/roundcubemail';
+-// sqlite example: 'sqlite://./sqlite.db?mode=0646';
++/* Do not set db_dsnw here, use dpkg-reconfigure roundcube to configure database ! */
++
++include_once("/etc/roundcube/debian-db.php");
++
++switch ($dbtype) {
++ case "sqlite":
++   $rcmail_config['db_dsnw'] = "sqlite:///$basepath/$dbname?mode=0640";
++   break;
++ default:
++   if ($dbport != '') $dbport=":$dbport";
++   if ($dbserver == '') $dbserver="localhost";
++   $rcmail_config['db_dsnw'] = "$dbtype://$dbuser:$dbpass@$dbserver$dbport/$dbname";
++   break;
++ }
+
+ // PEAR database DSN for read only operations (if empty write database will be used)
+ // useful for database replication
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644 (file)
index 0000000..d9c2b5e
--- /dev/null
@@ -0,0 +1,3 @@
+dbconfig-common_support.patch
+correct_install_path.patch
+use_mcrypt.patch
diff --git a/debian/patches/use_mcrypt.patch b/debian/patches/use_mcrypt.patch
new file mode 100644 (file)
index 0000000..b4bb262
--- /dev/null
@@ -0,0 +1,44 @@
+--- roundcube_0.1~beta2.2/program/include/main.inc     2006-12-22 23:26:24.000000000 +0100
++++ roundcube_0.1~beta2.2/program/include/main.inc     2007-03-18 10:24:11.000000000 +0100
+@@ -19,7 +19,6 @@
+ */
+-require_once('lib/des.inc');
+ require_once('lib/utf7.inc');
+ require_once('lib/utf8.class.php');
+@@ -758,7 +758,13 @@
+ // encrypt IMAP password using DES encryption
+ function encrypt_passwd($pass)
+   {
+-  $cypher = des(get_des_key(), $pass, 1, 0, NULL);
++  $td = mcrypt_module_open(MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, "");
++  $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
++  mcrypt_generic_init($td, get_des_key(), $iv);
++  $cypher = mcrypt_generic($td, $pass);
++  mcrypt_generic_end($td);
++  mcrypt_module_close($td);
++  
+   return base64_encode($cypher);
+   }
+@@ -766,8 +772,14 @@
+ // decrypt IMAP password using DES encryption
+ function decrypt_passwd($cypher)
+   {
+-  $pass = des(get_des_key(), base64_decode($cypher), 0, 0, NULL);
+-  return preg_replace('/\x00/', '', $pass);
++  $td = mcrypt_module_open(MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, "");
++  $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
++  mcrypt_generic_init($td, get_des_key(), $iv);
++  $pass = mdecrypt_generic($td, base64_decode($cypher));
++  mcrypt_generic_end($td);
++  mcrypt_module_close($td);
++
++  return $pass;
+   }
+--- include/main.inc~  2007-03-25 12:09:19.000000000 +0200
++++ include/main.inc   2007-03-25 12:15:45.000000000 +0200
diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in
new file mode 100644 (file)
index 0000000..cef83a3
--- /dev/null
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] templates
diff --git a/debian/po/templates.pot b/debian/po/templates.pot
new file mode 100644 (file)
index 0000000..beb66a3
--- /dev/null
@@ -0,0 +1,82 @@
+# 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: pkg-roundcube-maintainers@lists.alioth.debian.org\n"
+"POT-Creation-Date: 2007-03-13 14:16+0100\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: multiselect
+#. Choices
+#: ../templates:1001
+msgid "apache, apache-ssl, apache-perl, apache2"
+msgstr ""
+
+#. Type: multiselect
+#. Description
+#: ../templates:1002
+msgid "Webserver Reconfiguration:"
+msgstr ""
+
+#. Type: multiselect
+#. Description
+#: ../templates:1002
+msgid ""
+"RoundCube supports any web server that php does, but this automatic "
+"configuration process only supports Apache. Please select which  apache "
+"version you want to configure the RoundCube frontend for."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Would you like to restart your webserver(s) now?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"Remember that in order to apply the changes your webserver(s) has/have to be "
+"restarted."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "IMAP server on which RoundCube should connect to:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid ""
+"Leave this field blank to show a textbox at login, give a list of space-"
+"separated hosts to display a pulldown menu or set one host. To use SSL "
+"connection, use ssl://hostname:993."
+msgstr ""
+
+#. Type: select
+#. Description
+#: ../templates:4001
+msgid "Default language:"
+msgstr ""
+
+#. Type: select
+#. Description
+#: ../templates:4001
+msgid ""
+"Each user can select in his preferences the language of the interface. "
+"However, for the login screen and for the first connection, this is the "
+"language selected here that will be used."
+msgstr ""
diff --git a/debian/postinst b/debian/postinst
new file mode 100644 (file)
index 0000000..b7996ff
--- /dev/null
@@ -0,0 +1,112 @@
+#!/bin/sh
+# postinst script for roundcube
+#
+# see: dh_installdeb(1)
+
+set -e
+
+. /usr/share/debconf/confmodule
+. /usr/share/dbconfig-common/dpkg/postinst 
+dbc_generate_include=php:/etc/roundcube/debian-db.php
+dbc_generate_include_owner="www-data:www-data"
+dbc_generate_include_perms="660"
+dbc_dbfile_owner="www-data:www-data"
+dbc_dbfile_perms="0660"
+dbc_dbuser=roundcube
+dbc_dbname=roundcube
+
+dbc_go roundcube $@
+
+case "$1" in
+    configure)
+
+       CONFFILE=/etc/roundcube/main.inc.php
+       touch $CONFFILE.ucftmp
+       chmod 640 $CONFFILE.ucftmp
+
+       db_get roundcube/hosts || true
+       hosts="$RET"
+       if [ "$hosts" != "" ]; then
+           hosts="array(\"$(echo $hosts | sed 's/ /\",\"/g')\")"
+       else
+           hosts="''"
+       fi
+
+       db_get roundcube/language || true
+       language="$RET"
+
+       # Get current 3DES key from /etc/roundcube/main.inc.php
+       [ -f /etc/roundcube/main.inc.php ] && {
+           deskey=$(sed -n "s+^\$rcmail_config\['des_key'\] = '\(.*\)';\$+\1+p" \
+               /etc/roundcube/main.inc.php)
+       }
+       # If this is the default key, forget it !
+       [ "$deskey" = "rcmail-!24ByteDESkey*Str" ] && unset deskey
+       # Generate a new one
+       while [ -z "$deskey" ]; do
+           deskey=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | \
+               tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{24\}\).*/\1/p')
+       done
+
+       # Put hosts, language and key in main.inc.php
+       zcat /usr/share/doc/roundcube/main.inc.php.dist.gz | \
+           sed -e "s+^\(\$rcmail_config\['default_host'\] = \)''\(;\)\$+\1${hosts}\2+" \
+               -e "s+^\(\$rcmail_config\['des_key'\] = '\).*\(';\)\$+\1$deskey\2+" \
+               -e "s+^\(\$rcmail_config\['locale_string'\] = '\).*\(';\)\$+\1${language}\2+" >> $CONFFILE.ucftmp
+
+       ucf --debconf-ok $CONFFILE.ucftmp $CONFFILE
+       chown root:www-data $CONFFILE
+        rm -f $CONFFILE.ucftmp
+       
+       # Handle webserver reconfiguration/restart ; stolen from zabbix package
+       db_get roundcube/reconfigure-webserver || true
+       webservers="$RET"
+       restart=""
+
+       for webserver in $webservers; do
+            webserver=${webserver%,}
+            test -x /usr/sbin/$webserver || continue
+        
+            if [ ! -f /etc/$webserver/conf.d/roundcube ] && [ ! -h /etc/$webserver/conf.d/roundcube ]; then
+               ln -s /etc/roundcube/apache.conf /etc/$webserver/conf.d/roundcube
+            fi
+            restart="$restart $webserver"
+        done
+
+        db_get roundcube/restart-webserver || true
+       res="$RET"
+       db_stop || true
+       if [ "$res" = "true" ]; then
+            for webserver in $restart; do
+               webserver=${webserver%,}
+               if [ -x /usr/sbin/invoke-rc.d ]; then
+                    invoke-rc.d $webserver restart
+               else
+                    /etc/init.d/$webserver restart
+               fi
+            done
+       fi
+
+       chown -R www-data:adm /var/log/roundcube
+       chmod -R 750 /var/log/roundcube
+       chown -R www-data:www-data /var/lib/roundcube/temp
+       chmod -R 750 /var/lib/roundcube/temp
+       chown www-data:adm /var/lib/roundcube/skins
+
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/postrm b/debian/postrm
new file mode 100644 (file)
index 0000000..9159d97
--- /dev/null
@@ -0,0 +1,76 @@
+#!/bin/sh
+# postrm script for roundcube
+#
+# see: dh_installdeb(1)
+
+set -e
+
+if [ -f /usr/share/debconf/confmodule ]; then
+        . /usr/share/debconf/confmodule
+fi
+if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then
+        . /usr/share/dbconfig-common/dpkg/postrm 
+        dbc_go roundcube $@
+fi
+
+case "$1" in
+    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+    ;;
+    
+    remove)
+
+       # Handling web server reconfiguration
+       db_get roundcube/reconfigure-webserver
+        webservers="$RET"
+        restart=""
+        
+        for webserver in $webservers; do
+            webserver=${webserver%,}
+        
+            case "$webserver" in
+                apache|apache-perl|apache-ssl|apache2)
+                    rm -f /etc/$webserver/conf.d/roundcube
+                    test -x /usr/sbin/$webserver || continue
+                    restart="$restart $webserver"
+                    ;;
+                *)
+                    ;;
+            esac
+        done
+        
+        db_get roundcube/restart-webserver
+        res="$RET"
+        db_stop || true
+        if [ "$res" = "true" ]; then
+            for webserver in $restart; do
+                webserver=${webserver%,}
+                if [ -x /usr/sbin/invoke-rc.d ]; then
+                    invoke-rc.d $webserver restart
+                else
+                    /etc/init.d/$webserver restart
+                fi
+            done
+        fi
+    ;;
+
+    purge)
+        rm -f /etc/roundcube/debian-db.php
+        if which ucf >/dev/null 2>&1; then
+                ucf --purge /etc/roundcube/debian-db.php
+               ucf --purge /etc/roundcube/main.inc.php
+        fi
+       rm -f /etc/roundcube/main.inc.php
+       rm -rf /var/log/roundcube
+       rm -rf /var/lib/roundcube
+    ;;
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/prerm b/debian/prerm
new file mode 100644 (file)
index 0000000..5004518
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh
+# prerm script for roundcube
+#
+# see: dh_installdeb(1)
+
+set -e
+
+. /usr/share/debconf/confmodule
+. /usr/share/dbconfig-common/dpkg/prerm 
+dbc_go roundcube $@
+
+case "$1" in
+    remove|upgrade|deconfigure)
+    ;;
+
+    failed-upgrade)
+    ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..61bb9ec
--- /dev/null
@@ -0,0 +1,42 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/patchsys-quilt.mk
+
+# In order to regenerate 'debian/control' :
+#    DEB_AUTO_UPDATE_DEBIAN_CONTROL=yes fakeroot debian/rules clean
+# Then check manually if everything's ok
+
+binary-install/roundcube::
+       # Removing PEAR classes that are provided via strd packages
+       rm -rf $(CURDIR)/debian/roundcube/usr/share/roundcube/program/lib/Auth
+       rm -rf $(CURDIR)/debian/roundcube/usr/share/roundcube/program/lib/DB
+       rm -rf $(CURDIR)/debian/roundcube/usr/share/roundcube/program/lib/DB.php
+       rm -rf $(CURDIR)/debian/roundcube/usr/share/roundcube/program/lib/Mail
+       rm -rf $(CURDIR)/debian/roundcube/usr/share/roundcube/program/lib/Net
+       rm -rf $(CURDIR)/debian/roundcube/usr/share/roundcube/program/lib/PEAR.php
+       # Symlink all that is in /usr/share/roundcube to /var/lib/roundcube
+       find debian/roundcube/usr/share/roundcube -maxdepth 1 -mindepth 1 | \
+       while read i; do \
+               dh_link "`echo "$$i" | sed -e s#debian/roundcube/##`" \
+               "`echo "$$i" | sed -e s#debian/roundcube/usr/share/roundcube/#var/lib/roundcube/#`"; \
+       done
+       # Install config/db.inc.php.dist
+       install -m 0640 $(CURDIR)/config/db.inc.php.dist $(CURDIR)/debian/roundcube/etc/roundcube/db.inc.php
+       # Install empty tables for each db type
+       install -m 0644 $(CURDIR)/SQL/mysql.initial.sql $(CURDIR)/debian/roundcube/usr/share/dbconfig-common/data/roundcube/install/mysql
+       install -m 0644 $(CURDIR)/SQL/postgres.initial.sql $(CURDIR)/debian/roundcube/usr/share/dbconfig-common/data/roundcube/install/pgsql
+       install -m 0644 $(CURDIR)/SQL/sqlite.initial.sql $(CURDIR)/debian/roundcube/usr/share/dbconfig-common/data/roundcube/install/sqlite     
+       # Some files are executable while not being scripts or binary...
+       chmod -x $(CURDIR)/debian/roundcube/usr/share/roundcube/program/include/rcube_mdb2.inc
+       chmod -x $(CURDIR)/debian/roundcube/var/lib/roundcube/skins/default/images/icons/plus.gif
+       chmod -x $(CURDIR)/debian/roundcube/var/lib/roundcube/skins/default/common.css
+       chmod -x $(CURDIR)/debian/roundcube/var/lib/roundcube/skins/default/images/display/loading.gif
+       chmod -x $(CURDIR)/debian/roundcube/var/lib/roundcube/skins/default/images/buttons/up_arrow.png
+       chmod -x $(CURDIR)/debian/roundcube/usr/share/roundcube/program/include/rcube_db.inc
+       chmod -x $(CURDIR)/debian/roundcube/var/lib/roundcube/skins/default/images/buttons/down_arrow.png
+       chmod -x $(CURDIR)/debian/roundcube/var/lib/roundcube/skins/default/googiespell.css
+       chmod -x $(CURDIR)/debian/roundcube/usr/share/roundcube/program/js/googiespell.js
+
+clean::
+       debconf-updatepo
diff --git a/debian/templates b/debian/templates
new file mode 100644 (file)
index 0000000..b75b54c
--- /dev/null
@@ -0,0 +1,31 @@
+Template: roundcube/reconfigure-webserver
+Type: multiselect
+_Choices: apache, apache-ssl, apache-perl, apache2
+Default: apache, apache-ssl, apache-perl, apache2
+_Description: Webserver Reconfiguration:
+ RoundCube supports any web server that php does, but this automatic
+ configuration process only supports Apache. Please select which 
+ apache version you want to configure the RoundCube frontend for.
+
+Template: roundcube/restart-webserver
+Type: boolean
+Default: true
+_Description: Would you like to restart your webserver(s) now?
+ Remember that in order to apply the changes your webserver(s) has/have to
+ be restarted. 
+
+Template: roundcube/hosts
+Type: string
+Default:
+_Description: IMAP server on which RoundCube should connect to:
+ Leave this field blank to show a textbox at login, give a list
+ of space-separated hosts to display a pulldown menu or set one
+ host. To use SSL connection, use ssl://hostname:993.
+
+Template: roundcube/language
+Type: select
+Choices: ${languages}
+_Description: Default language:
+ Each user can select in his preferences the language of the
+ interface. However, for the login screen and for the first
+ connection, this is the language selected here that will be used.
diff --git a/debian/watch b/debian/watch
new file mode 100644 (file)
index 0000000..a48b921
--- /dev/null
@@ -0,0 +1,5 @@
+# Compulsory line, this is a version 3 file
+version=3
+
+# Uncomment to find new files on sourceforge, for debscripts >= 2.9
+http://sf.net/roundcube/roundcube-(.*)\.tar\.gz