From: Vincent Bernat Date: Wed, 5 Mar 2008 21:05:15 +0000 (+0000) Subject: lighttpd support X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=88bd4887378916d77fef690b4a75eff6553548a8;p=roundcube.git lighttpd support --- diff --git a/debian/changelog b/debian/changelog index d18d0e1..e344976 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,9 @@ roundcube (0.1-1) UNRELEASED; urgency=low * Upstream has switched to MDB2 database backend which is not packaged in Debian yet. We switch back to old backend. * Fix debian/watch to handle correctly detection of new versions. + * Add support for lighttpd and remove support for older version of + Apache. The debconf question about webserver autoconfiguration is + reworded (Closes: #462961). -- Vincent Bernat Wed, 05 Mar 2008 20:49:03 +0100 diff --git a/debian/conf/lighttpd.conf b/debian/conf/lighttpd.conf new file mode 100644 index 0000000..331f8c7 --- /dev/null +++ b/debian/conf/lighttpd.conf @@ -0,0 +1,18 @@ +# You may want to set up this alias differently depending on your +# virtual host configuration. Do not forget to adapt the rest of the +# configuration. + +alias.url += ( + "/roundcube" => "/var/lib/roundcube", + # Uncomment the following line if you want to use tinymce. You + # will need tinymce package. + # "/roundcube/program/js/tiny_mce" => "/usr/share/tinymce/www" +) + +$HTTP["url"] =~ "^/roundcube" { + server.follow-symlink = "enable" +} + +$HTTP["url"] =~ "^/roundcube/config|/roundcube/temp|/roundcube/logs" { + url.access-deny = ( "" ) +} diff --git a/debian/control b/debian/control index 82b4690..45a67f2 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Vcs-Browser: http://svn.debian.org/wsvn/pkg-roundcube/roundcube Package: roundcube-core Architecture: all -Depends: dbconfig-common, debconf | debconf-2.0, apache2 | httpd, php5, php5-mcrypt, roundcube-db, php-db, php-auth, php-net-smtp, php-net-socket, php-mail-mime, ucf, tinymce, ${misc:Depends} +Depends: dbconfig-common, debconf | debconf-2.0, apache2 | lighttpd | httpd, php5, php5-mcrypt, roundcube-db, php-db, php-auth, php-net-smtp, php-net-socket, php-mail-mime, ucf, tinymce, ${misc:Depends} Replaces: roundcube Conflicts: roundcube (<< 0.1~rc2-2) Description: skinnable AJAX based webmail solution for IMAP servers diff --git a/debian/roundcube-core.postinst b/debian/roundcube-core.postinst index 33d6912..fe3094f 100644 --- a/debian/roundcube-core.postinst +++ b/debian/roundcube-core.postinst @@ -17,6 +17,25 @@ dbc_dbname=roundcube dbc_go roundcube $@ +lighttpd_install() { + if [ ! -f /etc/lighttpd/conf-available/50-roundcube.conf ] ; then + if [ ! -x /usr/sbin/lighty-enable-mod ] ; then + echo "Lighttpd not installed, skipping" + else + ln -s /etc/roundcube/lighttpd.conf /etc/lighttpd/conf-available/50-roundcube.conf + /usr/sbin/lighty-enable-mod roundcube + fi + fi +} + +apache_install() { + webserver=$1 + if [ -d /etc/$webserver/conf.d ] && [ ! -e /etc/$webserver/conf.d/roundcube ]; then + ln -s /etc/roundcube/apache.conf /etc/$webserver/conf.d/roundcube + fi +} + + case "$1" in configure) @@ -117,11 +136,12 @@ EOF for webserver in $webservers; do webserver=${webserver%,} + if [ "$webserver" = "lighttpd" ] ; then + lighttpd_install + else + apache_install $webserver + fi 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 diff --git a/debian/roundcube-core.postrm b/debian/roundcube-core.postrm index 9159d97..ae7bbd9 100644 --- a/debian/roundcube-core.postrm +++ b/debian/roundcube-core.postrm @@ -13,6 +13,29 @@ if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then dbc_go roundcube $@ fi +lighttpd_remove() { + if [ -f /etc/lighttpd/conf-available/50-roundcube.conf ] ; then + rm -f /etc/lighttpd/conf-available/50-roundcube.conf + if [ ! -x /usr/sbin/lighty-disable-mod ] ; then + echo "Lighttpd not installed, skipping" + else + /usr/sbin/lighty-disable-mod roundcube + fi + # See bug #448682 + if [ -h /etc/lighttpd/conf-enabled/50-roundcube.conf ] ; then + echo 'Manually deleting lighttpd/roundcube configuration link' + rm /etc/lighttpd/conf-enabled/50-roundcube.conf + fi + fi +} + +apache_remove() { + if [ -d /etc/$webserver/conf.d ] && [ -L /etc/$webserver/conf.d/roundcube ]; then + rm -f /etc/$webserver/conf.d/roundcube + fi +} + + case "$1" in upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; @@ -28,14 +51,20 @@ case "$1" in 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" - ;; + apache*) + apache_remove $webserver + ;; + lighttpd) + lighttpd_remove + ;; *) + echo "Unknown webserver $webserver" ;; esac + + test -x /usr/sbin/$webserver || continue + restart="$restart $webserver" + done db_get roundcube/restart-webserver diff --git a/debian/templates b/debian/templates index 30c0100..fb0b9f0 100644 --- a/debian/templates +++ b/debian/templates @@ -9,11 +9,11 @@ Template: roundcube/reconfigure-webserver Type: multiselect -__Choices: apache, apache-ssl, apache-perl, apache2 -Default: apache, apache-ssl, apache-perl, apache2 +__Choices: apache2, lighttpd +Default: apache2, lighttpd _Description: Web server(s) to configure automatically: RoundCube supports any web server supported by PHP, however only - Apache can be configured automatically. + Apache 2 and lighttpd can be configured automatically. . Please select the web server(s) that should be configured automatically for RoundCube.