From 4aa9d896b663dc24bc587574ee459d58d0ef9d87 Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Thu, 8 Mar 2007 09:31:56 +0000 Subject: [PATCH] Initial import --- debian/README.Debian | 5 +++ debian/changelog | 66 ++++++++++++++++++++++++++++ debian/compat | 1 + debian/conf/apache.conf | 4 ++ debian/conf/db.inc.php | 73 +++++++++++++++++++++++++++++++ debian/config | 45 +++++++++++++++++++ debian/control | 20 +++++++++ debian/copyright | 24 +++++++++++ debian/cron.daily | 9 ++++ debian/default | 3 ++ debian/dirs | 7 +++ debian/docs | 3 ++ debian/logrotate | 6 +++ debian/po/POTFILES.in | 1 + debian/po/templates.pot | 82 +++++++++++++++++++++++++++++++++++ debian/postinst | 95 +++++++++++++++++++++++++++++++++++++++++ debian/postrm | 76 +++++++++++++++++++++++++++++++++ debian/prerm | 29 +++++++++++++ debian/rules | 66 ++++++++++++++++++++++++++++ debian/templates | 31 ++++++++++++++ debian/watch | 5 +++ 21 files changed, 651 insertions(+) create mode 100644 debian/README.Debian create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/conf/apache.conf create mode 100644 debian/conf/db.inc.php create mode 100644 debian/config create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/cron.daily create mode 100644 debian/default create mode 100644 debian/dirs create mode 100644 debian/docs create mode 100644 debian/logrotate create mode 100644 debian/po/POTFILES.in create mode 100644 debian/po/templates.pot create mode 100644 debian/postinst create mode 100644 debian/postrm create mode 100644 debian/prerm create mode 100755 debian/rules create mode 100644 debian/templates create mode 100644 debian/watch diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..68f9cfb --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,5 @@ +All configuration files are in /etc/roundcube. Logs are in +/var/log/roundcube and the temporary directory is +/var/cache/roundcube/temp. + + -- Vincent Bernat , Sun, 11 Feb 2007 22:06:48 +0100 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..a3d8118 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,66 @@ +roundcube (0.1~beta2.2-10) unstable; urgency=low + + * Depends on PHP pear modules instead of shipping them in the package + + -- Vincent Bernat Tue, 6 Mar 2007 20:44:33 +0100 + +roundcube (0.1~beta2.2-9) unstable; urgency=low + + * Licenses clarification in debian/copyright + * Only keep php5 | php4 in Depends:. + + -- Vincent Bernat Mon, 5 Mar 2007 22:31:28 +0100 + +roundcube (0.1~beta2.2-8) unstable; urgency=low + + * Use current locale to guess the language to select + + -- Vincent Bernat Sun, 25 Feb 2007 19:43:35 +0100 + +roundcube (0.1~beta2.2-7) unstable; urgency=low + + * Fix language selection + + -- Vincent Bernat Sat, 17 Feb 2007 08:14:54 +0100 + +roundcube (0.1~beta2.2-6) unstable; urgency=low + + * Really fix crontab + * Add language selection + + -- Vincent Bernat Sat, 17 Feb 2007 07:51:32 +0100 + +roundcube (0.1~beta2.2-5) unstable; urgency=low + + * Fix crontab + * Provide roundcube.default + + -- Vincent Bernat Fri, 16 Feb 2007 20:40:46 +0100 + +roundcube (0.1~beta2.2-4) unstable; urgency=low + + * Allow to control the expiration of temporary files (following a + suggestion from Sean Finney) + + -- Vincent Bernat Mon, 12 Feb 2007 21:15:32 +0100 + +roundcube (0.1~beta2.2-3) unstable; urgency=low + + * Depends on SQL client to allow dbconfig-common to setup the database + * Move temp directory to /var/cache/roundcube/temp + + -- Vincent Bernat Sun, 11 Feb 2007 21:56:03 +0100 + +roundcube (0.1~beta2.2-2) unstable; urgency=low + + * Delete log files on purge + * Setup logrotate + + -- Vincent Bernat Sun, 11 Feb 2007 09:25:43 +0100 + +roundcube (0.1~beta2.2-1) unstable; urgency=low + + * Initial release (Closes: #333756, #344949) + + -- Vincent Bernat Sun, 11 Feb 2007 09:11:02 +0100 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +5 diff --git a/debian/conf/apache.conf b/debian/conf/apache.conf new file mode 100644 index 0000000..c6612ca --- /dev/null +++ b/debian/conf/apache.conf @@ -0,0 +1,4 @@ +# Define /roundcube alias, this is the default + + Alias /roundcube /usr/share/roundcube + diff --git a/debian/conf/db.inc.php b/debian/conf/db.inc.php new file mode 100644 index 0000000..81b1083 --- /dev/null +++ b/debian/conf/db.inc.php @@ -0,0 +1,73 @@ + diff --git a/debian/config b/debian/config new file mode 100644 index 0000000..fc5d34b --- /dev/null +++ b/debian/config @@ -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" -o "$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 + 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 index 0000000..303a3d4 --- /dev/null +++ b/debian/control @@ -0,0 +1,20 @@ +Source: roundcube +Section: web +Priority: extra +Maintainer: Vincent Bernat +Build-Depends: debhelper (>= 5), po-debconf +Standards-Version: 3.7.2 + +Package: roundcube +Architecture: all +Depends: dbconfig-common, debconf, apache2 | httpd, php5 | php4, php5-mysql | php5-mysqli | 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 index 0000000..6fb27d1 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,24 @@ +This package was debianized by Vincent Bernat 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.js from amix@amix.dk, MIT license + - html2text.inc from jon@chuggnutt.com, GPL license + - lib/*.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 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 index 0000000..898f243 --- /dev/null +++ b/debian/cron.daily @@ -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/cache/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 index 0000000..8f047da --- /dev/null +++ b/debian/default @@ -0,0 +1,3 @@ +# Uncomment the following line to alter the default delay to clean +# temporary directory /var/cache/roundcube/temp +# MAX_TMPFILE_LIFETIME=5 diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..d4c0359 --- /dev/null +++ b/debian/dirs @@ -0,0 +1,7 @@ +usr/share/roundcube +usr/share/roundcube/config +usr/share/dbconfig-common/data/roundcube/install +etc/roundcube +var/log/roundcube +var/cache/roundcube/temp +etc/default diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..085fdcf --- /dev/null +++ b/debian/docs @@ -0,0 +1,3 @@ +README +UPGRADING +config/main.inc.php.dist diff --git a/debian/logrotate b/debian/logrotate new file mode 100644 index 0000000..9b6c0a9 --- /dev/null +++ b/debian/logrotate @@ -0,0 +1,6 @@ +/var/log/roundcube/sendmail /var/log/roundcube/errors { + weekly + rotate 4 + compress + missingok +} 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/templates.pot b/debian/po/templates.pot new file mode 100644 index 0000000..b02147e --- /dev/null +++ b/debian/po/templates.pot @@ -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 , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: bernat@luffy.cx\n" +"POT-Creation-Date: 2007-02-17 07:53+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \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 php4 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 index 0000000..901a104 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,95 @@ +#!/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" + zcat /usr/share/doc/roundcube/main.inc.php.dist.gz | \ + sed -e "s+^\(\$rcmail_config\['default_host'\] = \)''\(;\)\$+\1${hosts}\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 + restart="$restart $webserver" + fi + 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/cache/roundcube/temp + chmod -R 750 /var/cache/roundcube/temp + + ;; + + 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 index 0000000..86b1f8d --- /dev/null +++ b/debian/postrm @@ -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/cache/roundcube/temp + ;; + *) + 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 index 0000000..5004518 --- /dev/null +++ b/debian/prerm @@ -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 index 0000000..2dd606a --- /dev/null +++ b/debian/rules @@ -0,0 +1,66 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +configure: configure-stamp +configure-stamp: + dh_testdir + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + install -m 0644 $(CURDIR)/index.php $(CURDIR)/debian/roundcube/usr/share/roundcube + cp -r $(CURDIR)/program $(CURDIR)/debian/roundcube/usr/share/roundcube + rm -rf $(CURDIR)/debian/roundcube/usr/share/roundcube/program/lib/{Auth,DB,DB.php,Mail,Net,PEAR.php} + cp -r $(CURDIR)/skins $(CURDIR)/debian/roundcube/usr/share/roundcube + find $(CURDIR)/debian/roundcube/usr/share/roundcube -type f -print0 | xargs -0 chmod 644 + + cp $(CURDIR)/config/*.php $(CURDIR)/debian/roundcube/usr/share/roundcube/config + install -m 0644 $(CURDIR)/debian/conf/apache.conf $(CURDIR)/debian/roundcube/etc/roundcube + install -m 0640 $(CURDIR)/debian/conf/db.inc.php $(CURDIR)/debian/roundcube/etc/roundcube + install -m 0640 $(CURDIR)/debian/default $(CURDIR)/debian/roundcube/etc/default/roundcube.default + + 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 + + +binary-indep: build install + +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs CHANGELOG + dh_installdocs + dh_installlogrotate + dh_install + dh_installcron + dh_installdebconf + dh_compress + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/debian/templates b/debian/templates new file mode 100644 index 0000000..09d74b3 --- /dev/null +++ b/debian/templates @@ -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 php4 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 index 0000000..a48b921 --- /dev/null +++ b/debian/watch @@ -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 -- 2.39.2