From b5ab37c468c06dc61bb8a9578ef9ac3bd0db4932 Mon Sep 17 00:00:00 2001
From: Vincent Bernat <bernat@debian.org>
Date: Sat, 16 Aug 2008 13:22:08 +0200
Subject: [PATCH] Imported Debian patch 0.2~alpha-2

---
 debian/bug.control               |  2 ++
 debian/changelog                 | 20 +++++++++++++++++++-
 debian/conf/lighttpd.conf        |  7 ++-----
 debian/control                   |  2 +-
 debian/control.in                |  4 ++--
 debian/roundcube-core.cron.daily |  4 ++--
 debian/roundcube-core.postinst   |  2 +-
 debian/roundcube-core.postrm     |  2 +-
 debian/rules                     |  6 +++++-
 9 files changed, 35 insertions(+), 14 deletions(-)
 create mode 100644 debian/bug.control

diff --git a/debian/bug.control b/debian/bug.control
new file mode 100644
index 0000000..b627c1b
--- /dev/null
+++ b/debian/bug.control
@@ -0,0 +1,2 @@
+Submit-As: roundcube
+Report-With: roundcube-core
diff --git a/debian/changelog b/debian/changelog
index f50281a..77fc14f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,21 @@
+roundcube (0.2~alpha-2) experimental; urgency=low
+
+  [ Vincent Bernat ]
+  * Fix lintian warnings introduced by previous upload
+  * Fix lighttpd.conf to make it work with latest versions (Closes: #494044)
+  * Do not prepend path to lighty util in postinst and postrm, as per
+    Policy Manual section 6.1
+  * Ship a bug/control file to have all bugs submitted against roundcube
+    metapackage
+  * Fix debian/roundcube-core.cron.daily to use
+    /etc/default/roundcube-core instead of /etc/default/roundcube which
+    should not exist any more
+
+  [ Romain Beauxis ]
+  * Versioned roundcube-core dependency for roundcube 
+
+ -- Vincent Bernat <bernat@debian.org>  Sat, 16 Aug 2008 13:22:08 +0200
+
 roundcube (0.2~alpha-1) experimental; urgency=low
 
   * New upstream release
@@ -12,7 +30,7 @@ roundcube (0.2~alpha-1) experimental; urgency=low
   * Add a new patch to fix a login problem
   * Depends on tinymce >= 3
 
- -- Vincent Bernat <bernat@debian.org>  Sun, 22 Jun 2008 12:05:44 +0200
+ -- Vincent Bernat <bernat@debian.org>  Sun, 22 Jun 2008 14:10:44 +0200
 
 roundcube (0.1.1-7) unstable; urgency=low
 
diff --git a/debian/conf/lighttpd.conf b/debian/conf/lighttpd.conf
index d64b232..38c43d4 100644
--- a/debian/conf/lighttpd.conf
+++ b/debian/conf/lighttpd.conf
@@ -2,11 +2,8 @@
 # virtual host configuration. Do not forget to adapt the rest of the
 # configuration.
 
-alias.url += (
-     "/roundcube" => "/var/lib/roundcube",
-     # The following line allow to use tinymce. Look at README.Debian
-     "/roundcube/program/js/tiny_mce" => "/usr/share/tinymce/www"
-)
+alias.url += ("/roundcube/program/js/tiny_mce" => "/usr/share/tinymce/www")
+alias.url += ("/roundcube" => "/var/lib/roundcube")
 
 $HTTP["url"] =~ "^/roundcube" {
   server.follow-symlink = "enable"
diff --git a/debian/control b/debian/control
index 55b21d5..e36adcc 100644
--- a/debian/control
+++ b/debian/control
@@ -27,7 +27,7 @@ Description: skinnable AJAX based webmail solution for IMAP servers
 
 Package: roundcube
 Architecture: all
-Depends: roundcube-sqlite | roundcube-db, roundcube-core
+Depends: roundcube-sqlite | roundcube-db, roundcube-core (= ${binary:Version})
 Description: 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
diff --git a/debian/control.in b/debian/control.in
index af9fe6e..cbfa75b 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -11,7 +11,7 @@ Vcs-Browser: http://svn.debian.org/wsvn/pkg-roundcube/roundcube
 
 Package: roundcube-core
 Architecture: all
-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 (>= 1.5.0), ucf, tinymce (<< 3), ${misc:Depends}, libmagic1
+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 (>= 1.5.0), ucf, tinymce (>= 3), ${misc:Depends}, libmagic1
 Replaces: roundcube
 Conflicts: roundcube (<< 0.1~rc2-2)
 Description: skinnable AJAX based webmail solution for IMAP servers
@@ -27,7 +27,7 @@ Description: skinnable AJAX based webmail solution for IMAP servers
 
 Package: roundcube
 Architecture: all
-Depends: roundcube-sqlite | roundcube-db, roundcube-core
+Depends: roundcube-sqlite | roundcube-db, roundcube-core (= ${binary:Version})
 Description: 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
diff --git a/debian/roundcube-core.cron.daily b/debian/roundcube-core.cron.daily
index 4b071ca..0fe51fc 100644
--- a/debian/roundcube-core.cron.daily
+++ b/debian/roundcube-core.cron.daily
@@ -2,8 +2,8 @@
 
 MAX_TMPFILE_LIFETIME=5
 # MAX_TMPFILE_LIFETIME can be overridden in this file
-if [ -r /etc/default/roundcube ]; then
-	. /etc/default/roundcube
+if [ -r /etc/default/roundcube-core ]; then
+	. /etc/default/roundcube-core
 fi
 
 find /var/lib/roundcube/temp -type f -mtime +$MAX_TMPFILE_LIFETIME -print0 | xargs -0 -r rm
diff --git a/debian/roundcube-core.postinst b/debian/roundcube-core.postinst
index fe3094f..80a085a 100644
--- a/debian/roundcube-core.postinst
+++ b/debian/roundcube-core.postinst
@@ -23,7 +23,7 @@ lighttpd_install() {
 			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
+			lighty-enable-mod roundcube
 		fi
 	fi
 }
diff --git a/debian/roundcube-core.postrm b/debian/roundcube-core.postrm
index ae7bbd9..1e0467b 100644
--- a/debian/roundcube-core.postrm
+++ b/debian/roundcube-core.postrm
@@ -19,7 +19,7 @@ lighttpd_remove() {
 		if [ ! -x /usr/sbin/lighty-disable-mod ] ; then
 			echo "Lighttpd not installed, skipping"
 		else
-			/usr/sbin/lighty-disable-mod roundcube
+			lighty-disable-mod roundcube
 		fi
 		# See bug #448682
 		if [ -h /etc/lighttpd/conf-enabled/50-roundcube.conf ] ; then
diff --git a/debian/rules b/debian/rules
index fea516c..acba5c6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -36,7 +36,7 @@ binary-install/roundcube-core::
 	cp -r $(CURDIR)/debian/sql/* $(CURDIR)/debian/roundcube-core/usr/share/dbconfig-common/data/roundcube/upgrade/.
 
 	# Some files are executable while not being scripts or binary...
-	find $(CURDIR)/debian/roundcube-core/usr/share/roundcube/program/localization -type f -print0 | xargs -0 chmod -x
+	find $(CURDIR)/debian/roundcube-core/usr/share/roundcube/program -type f -print0 | xargs -r0 chmod -x
 	# Remove useless file
 	rm $(CURDIR)/debian/roundcube-core/usr/share/roundcube/bin/*.sh
 	find $(CURDIR)/debian/roundcube-core -name '._*' -print0 | xargs -r0 rm
@@ -44,5 +44,9 @@ binary-install/roundcube-core::
 	rm -rf $(CURDIR)/debian/roundcube-core/usr/share/roundcube/program/js/tiny_mce
 	dh_link -proundcube-core usr/share/tinymce/www usr/share/roundcube/program/js/tiny_mce
 
+$(patsubst %,binary-install/%,$(DEB_PACKAGES)) :: binary-install/% :
+	install -d $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/bug/$(cdbs_curpkg)
+	install -m 644 $(CURDIR)/debian/bug.control $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/bug/$(cdbs_curpkg)/control
+
 clean::
 	debconf-updatepo
-- 
2.39.5