]> git.donarmstrong.com Git - roundcube.git/commitdiff
lighttpd support
authorVincent Bernat <bernat@luffy.cx>
Wed, 5 Mar 2008 21:05:15 +0000 (21:05 +0000)
committerJérémy Bobbio <lunar@debian.org>
Sat, 18 Jun 2011 17:02:25 +0000 (19:02 +0200)
debian/changelog
debian/conf/lighttpd.conf [new file with mode: 0644]
debian/control
debian/roundcube-core.postinst
debian/roundcube-core.postrm
debian/templates

index d18d0e1939a76f4d9347777ef3e8b1b6101c5f8f..e3449765e5eda0a8f8f1dd7dc71028617dbc42d1 100644 (file)
@@ -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 <bernat@luffy.cx>  Wed, 05 Mar 2008 20:49:03 +0100
 
diff --git a/debian/conf/lighttpd.conf b/debian/conf/lighttpd.conf
new file mode 100644 (file)
index 0000000..331f8c7
--- /dev/null
@@ -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 = ( "" )
+}
index 82b4690202976e411a2cbdd3ef8c8460d890b5df..45a67f20f0d231d3f5bdf68efec7258a19836764 100644 (file)
@@ -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
index 33d691264f9babc88cf8f1e86c472f189c36aa7f..fe3094f50915dac8b0720cc1549a579f5c264b1d 100644 (file)
@@ -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
 
index 9159d97567af6b530494149a3babf4defebf9637..ae7bbd949ef59f62d46a6d42bf7317210298da42 100644 (file)
@@ -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
index 30c0100cfda82093d613ff28c4b8836dc4e51918..fb0b9f07d0554da26e5316f786f5fcaaec60f70b 100644 (file)
@@ -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.