Package: ilohamail
Severity: wishlist
Tags: patch

Hi,

The dpatch patch management system has been deprecated for some time. The
Lintian currently flags use of dpatch packages as an error. The new 3.0
packaging format is an improved version which, among other things, contains
patch management built-in. For more information, see:

    http://wiki.debian.org/Projects/DebSrc3.0

I had some free time; see attached patch to migrate to new package
format. Note that all files in debian/patches/* are canocalized to
*.patch.

Let me know if there is anything that needs adjusting or if it is ok
to upload this version in a NMU in case you are working on other
issues needing attention.

Thanks,
Jari

>From b6e942ccfe8b648cac095bfad13c5ea9c89a1063 Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aa...@cante.net>
Date: Wed, 25 Apr 2012 09:28:41 +0300
Subject: [PATCH] format-3.0
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Signed-off-by: Jari Aalto <jari.aa...@cante.net>
---
 debian/changelog                                   |   13 ++++++
 debian/compat                                      |    2 +-
 debian/control                                     |    7 ++-
 debian/ilohamail.config                            |    4 +-
 debian/ilohamail.postinst                          |    2 +
 debian/ilohamail.postrm                            |    2 +
 debian/patches/00list                              |   13 ------
 .../{01-debianpath.dpatch => 01-debianpath.patch}  |   26 +----------
 ...2-debianconfig.dpatch => 02-debianconfig.patch} |   26 +----------
 debian/patches/03-sql.dpatch                       |   39 -----------------
 debian/patches/03-sql.patch                        |   17 ++++++++
 debian/patches/04-xss3.dpatch                      |   34 ---------------
 debian/patches/04-xss3.patch                       |   13 ++++++
 debian/patches/{05-rc3.dpatch => 05-rc3.patch}     |   25 +----------
 debian/patches/06-notrim.dpatch                    |   37 ----------------
 debian/patches/06-notrim.patch                     |   15 +++++++
 debian/patches/07-utf8-conversion                  |   38 -----------------
 debian/patches/07-utf8-conversion.patch            |   16 +++++++
 .../{08-remove-headers => 08-remove-headers.patch} |   26 +----------
 .../patches/{09-smtp-port => 09-smtp-port.patch}   |   26 +----------
 debian/patches/10-courier-mode                     |   40 -----------------
 debian/patches/10-courier-mode.patch               |   18 ++++++++
 debian/patches/{11-mktime => 11-mktime.patch}      |   26 +----------
 debian/patches/12-extra-newlines                   |   45 --------------------
 debian/patches/12-extra-newlines.patch             |   26 +++++++++++
 debian/patches/13-pop3-content                     |   40 -----------------
 debian/patches/13-pop3-content.patch               |   19 +++++++++
 debian/patches/series                              |   13 ++++++
 debian/rules                                       |   11 +++--
 debian/source/format                               |    1 +
 30 files changed, 181 insertions(+), 439 deletions(-)
 mode change 100644 => 100755 debian/ilohamail.config
 mode change 100644 => 100755 debian/ilohamail.postinst
 mode change 100644 => 100755 debian/ilohamail.postrm
 delete mode 100644 debian/patches/00list
 rename debian/patches/{01-debianpath.dpatch => 01-debianpath.patch} (73%)
 rename debian/patches/{02-debianconfig.dpatch => 02-debianconfig.patch} (67%)
 delete mode 100644 debian/patches/03-sql.dpatch
 create mode 100644 debian/patches/03-sql.patch
 delete mode 100644 debian/patches/04-xss3.dpatch
 create mode 100644 debian/patches/04-xss3.patch
 rename debian/patches/{05-rc3.dpatch => 05-rc3.patch} (99%)
 delete mode 100644 debian/patches/06-notrim.dpatch
 create mode 100644 debian/patches/06-notrim.patch
 delete mode 100644 debian/patches/07-utf8-conversion
 create mode 100644 debian/patches/07-utf8-conversion.patch
 rename debian/patches/{08-remove-headers => 08-remove-headers.patch} (59%)
 rename debian/patches/{09-smtp-port => 09-smtp-port.patch} (61%)
 delete mode 100644 debian/patches/10-courier-mode
 create mode 100644 debian/patches/10-courier-mode.patch
 rename debian/patches/{11-mktime => 11-mktime.patch} (50%)
 delete mode 100644 debian/patches/12-extra-newlines
 create mode 100644 debian/patches/12-extra-newlines.patch
 delete mode 100644 debian/patches/13-pop3-content
 create mode 100644 debian/patches/13-pop3-content.patch
 create mode 100644 debian/patches/series
 create mode 100644 debian/source/format

diff --git a/debian/changelog b/debian/changelog
index 7b3d147..3b6f334 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+ilohamail (0.8.14-0rc3sid6.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Remove deprecated dpatch and upgrade to packaging format "3.0 quilt".
+  * Update to Standards-Version to 3.9.3 and debhelper to 9.
+  * Add build-arch and build-indep targets; use dh_prep in rules file.
+  * Patch 12: update with "quilt refresh" to make it apply cleanly.
+  * Fix maintainer-script-without-set-e (Lintian).
+  * Fix maintainer-script-ignores-errors (Lintian).
+  * Fix no-homepage-field (Lintian).
+
+ -- Jari Aalto <jari.aa...@cante.net>  Wed, 25 Apr 2012 09:28:00 +0300
+
 ilohamail (0.8.14-0rc3sid6.1) unstable; urgency=low
 
   * Non-maintainer upload.
diff --git a/debian/compat b/debian/compat
index 7f8f011..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-7
+9
diff --git a/debian/control b/debian/control
index 101d5bd..08ff312 100644
--- a/debian/control
+++ b/debian/control
@@ -4,8 +4,9 @@ Priority: optional
 Maintainer: Joerg Jaspert <jo...@debian.org>
 Uploaders: Radu Spineanu <r...@debian.org>
 Build-Depends-Indep: po-debconf
-Build-Depends: debhelper (>= 7), dpatch
-Standards-Version: 3.7.3
+Build-Depends: debhelper (>= 9)
+Standards-Version: 3.9.3
+Homepage: http://www.ilohamail.org
 
 Package: ilohamail
 Architecture: all
@@ -43,5 +44,3 @@ Description: Light weight yet full featured multilingual web-based IMAP/POP3 cli
   * Search messages
   * Customizable - Over 2 dozen user preferences 
   * Support for over 20 languages
- .
- Upstream Homepage is http://www.ilohamail.org/
diff --git a/debian/ilohamail.config b/debian/ilohamail.config
old mode 100644
new mode 100755
index 8ec7cc0..fd08626
--- a/debian/ilohamail.config
+++ b/debian/ilohamail.config
@@ -1,4 +1,6 @@
-#!/bin/sh -e
+#!/bin/sh
+
+set -e
 
 # source debconf library
 . /usr/share/debconf/confmodule
diff --git a/debian/ilohamail.postinst b/debian/ilohamail.postinst
old mode 100644
new mode 100755
index b34d06f..cfd2c9d
--- a/debian/ilohamail.postinst
+++ b/debian/ilohamail.postinst
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+set -e
+
 file_apache_from_template() {
     infile=$1
     outfile=$2
diff --git a/debian/ilohamail.postrm b/debian/ilohamail.postrm
old mode 100644
new mode 100755
index 8c6d543..0fd471c
--- a/debian/ilohamail.postrm
+++ b/debian/ilohamail.postrm
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+set -e
+
 #
 # Skip, if we are not in "configure" state
 # 
diff --git a/debian/patches/00list b/debian/patches/00list
deleted file mode 100644
index 0606fd5..0000000
--- a/debian/patches/00list
+++ /dev/null
@@ -1,13 +0,0 @@
-05-rc3
-01-debianpath
-02-debianconfig
-04-xss3
-06-notrim
-07-utf8-conversion
-08-remove-headers
-09-smtp-port
-10-courier-mode
-11-mktime
-12-extra-newlines
-13-pop3-content
-
diff --git a/debian/patches/01-debianpath.dpatch b/debian/patches/01-debianpath.patch
similarity index 73%
rename from debian/patches/01-debianpath.dpatch
rename to debian/patches/01-debianpath.patch
index 11b2aed..569b84c 100644
--- a/debian/patches/01-debianpath.dpatch
+++ b/debian/patches/01-debianpath.patch
@@ -1,28 +1,6 @@
-#!/bin/sh -e
-## 01-debianpath.dpatch by Joerg Jaspert <jo...@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Change Paths for the Debian install
+From: Joerg Jaspert <jo...@debian.org>
+Subject: Change Paths for the Debian install
 
-if [ $# -ne 1 ]; then
-    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-    exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-case "$1" in
-       -patch) patch $patch_opts -p1 < $0;;
-       -unpatch) patch $patch_opts -p1 -R < $0;;
-        *)
-                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-                exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
 diff -Naur IlohaMail-0.8.14.old/IlohaMail/conf/conf.inc IlohaMail-0.8.14/IlohaMail/conf/conf.inc
 --- IlohaMail-0.8.14.old/IlohaMail/conf/conf.inc	2006-03-21 23:29:28.612960512 +0200
 +++ IlohaMail-0.8.14/IlohaMail/conf/conf.inc	2006-03-21 23:45:43.635734520 +0200
diff --git a/debian/patches/02-debianconfig.dpatch b/debian/patches/02-debianconfig.patch
similarity index 67%
rename from debian/patches/02-debianconfig.dpatch
rename to debian/patches/02-debianconfig.patch
index b68b573..c92ad2a 100644
--- a/debian/patches/02-debianconfig.dpatch
+++ b/debian/patches/02-debianconfig.patch
@@ -1,28 +1,6 @@
-#!/bin/sh -e
-## 02-debianconfig.dpatch by Joerg Jaspert <jo...@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Set Debian defaults for config values
+From: Joerg Jaspert <jo...@debian.org>
+Subject: Set Debian defaults for config values
 
-if [ $# -ne 1 ]; then
-    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-    exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-case "$1" in
-       -patch) patch $patch_opts -p1 < $0;;
-       -unpatch) patch $patch_opts -p1 -R < $0;;
-        *)
-                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-                exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
 diff -Naur IlohaMail-0.8.14.old/IlohaMail/conf/conf.php IlohaMail-0.8.14/IlohaMail/conf/conf.php
 --- IlohaMail-0.8.14.old/IlohaMail/conf/conf.php	2006-03-21 23:47:28.676765856 +0200
 +++ IlohaMail-0.8.14/IlohaMail/conf/conf.php	2006-03-21 23:48:52.357044520 +0200
diff --git a/debian/patches/03-sql.dpatch b/debian/patches/03-sql.dpatch
deleted file mode 100644
index 6801ca7..0000000
--- a/debian/patches/03-sql.dpatch
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh -e
-## 03-sql.dpatch by Joerg Jaspert <jo...@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Add new SQL Statements from 0.8.10 to global sql file for users
-
-if [ $# -ne 1 ]; then
-    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-    exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-case "$1" in
-       -patch) patch $patch_opts -p1 < $0;;
-       -unpatch) patch $patch_opts -p1 -R < $0;;
-        *)
-                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-                exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
-diff -urNad ilohamail-0.8.14/MySQL/sql /home/joerg/tmp/dpep.emCAiD/ilohamail-0.8.14/MySQL/sql
---- ilohamail-0.8.14/MySQL/sql	2005-01-08 21:32:51.324743635 +0100
-+++ /home/joerg/tmp/dpep.emCAiD/ilohamail-0.8.14/MySQL/sql	2005-01-08 21:34:48.564692048 +0100
-@@ -188,5 +189,7 @@
- 	PRIMARY KEY(id),
- 	KEY id (id),
- 	KEY owner (owner),
--	KEY cache_key (cache_key)
--);
-\ Kein Zeilenumbruch am Dateiende.
-+ 	KEY cache_key (cache_key),
-+ 	KEY cache_ts (cache_ts),
-+ 	KEY volatile (volatile)
-+);
diff --git a/debian/patches/03-sql.patch b/debian/patches/03-sql.patch
new file mode 100644
index 0000000..dd3df8e
--- /dev/null
+++ b/debian/patches/03-sql.patch
@@ -0,0 +1,17 @@
+From: Joerg Jaspert <jo...@debian.org>
+Subject: Add new SQL Statements from 0.8.10 to global sql file for users
+
+diff -urNad ilohamail-0.8.14/MySQL/sql /home/joerg/tmp/dpep.emCAiD/ilohamail-0.8.14/MySQL/sql
+--- ilohamail-0.8.14/MySQL/sql	2005-01-08 21:32:51.324743635 +0100
++++ /home/joerg/tmp/dpep.emCAiD/ilohamail-0.8.14/MySQL/sql	2005-01-08 21:34:48.564692048 +0100
+@@ -188,5 +189,7 @@
+ 	PRIMARY KEY(id),
+ 	KEY id (id),
+ 	KEY owner (owner),
+-	KEY cache_key (cache_key)
+-);
+\ Kein Zeilenumbruch am Dateiende.
++ 	KEY cache_key (cache_key),
++ 	KEY cache_ts (cache_ts),
++ 	KEY volatile (volatile)
++);
diff --git a/debian/patches/04-xss3.dpatch b/debian/patches/04-xss3.dpatch
deleted file mode 100644
index 9d7048e..0000000
--- a/debian/patches/04-xss3.dpatch
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh -e
-## 04-xss3.dpatch by Ulf Harnhammar <met...@telia.com>
-##
-## DP: Fixes a remaining xss bug in 0.8.14-rc3
-
-if [ $# -ne 1 ]; then
-    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-    exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-case "$1" in
-       -patch) patch $patch_opts -p1 < $0;;
-       -unpatch) patch $patch_opts -p1 -R < $0;;
-        *)
-                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-                exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
---- IlohaMail-0.8.14/IlohaMail/include/read_message_print.inc.old	2005-04-15 08:30:52.000000000 +0200
-+++ IlohaMail-0.8.14/IlohaMail/include/read_message_print.inc	2006-03-26 20:54:40.000000000 +0200
-@@ -102,6 +102,7 @@
- 							$body=strip_tags($body, '<a><b><i><u><p><br><font><div>');
- 						}
- 						$body = eregi_replace("src=\"cid:", "src=\"view.php?user=$user&folder=$folder&id=$id&cid=", $body);
-+						sanitizeHTML($body);
- 						echo $body;
- 					}else{
- 						/* quote colorization */
diff --git a/debian/patches/04-xss3.patch b/debian/patches/04-xss3.patch
new file mode 100644
index 0000000..766ed05
--- /dev/null
+++ b/debian/patches/04-xss3.patch
@@ -0,0 +1,13 @@
+From: Ulf Harnhammar <met...@telia.com>
+Subject: Fixes a remaining xss bug in 0.8.14-rc3
+
+--- IlohaMail-0.8.14/IlohaMail/include/read_message_print.inc.old	2005-04-15 08:30:52.000000000 +0200
++++ IlohaMail-0.8.14/IlohaMail/include/read_message_print.inc	2006-03-26 20:54:40.000000000 +0200
+@@ -102,6 +102,7 @@
+ 							$body=strip_tags($body, '<a><b><i><u><p><br><font><div>');
+ 						}
+ 						$body = eregi_replace("src=\"cid:", "src=\"view.php?user=$user&folder=$folder&id=$id&cid=", $body);
++						sanitizeHTML($body);
+ 						echo $body;
+ 					}else{
+ 						/* quote colorization */
diff --git a/debian/patches/05-rc3.dpatch b/debian/patches/05-rc3.patch
similarity index 99%
rename from debian/patches/05-rc3.dpatch
rename to debian/patches/05-rc3.patch
index afc7a1a..a484d2c 100644
--- a/debian/patches/05-rc3.dpatch
+++ b/debian/patches/05-rc3.patch
@@ -1,27 +1,6 @@
-#!/bin/sh -e
-## 05-rc3.dpatch by Radu Spineanu <r...@debian.org>
-##
-## DP: rc2 -> rc3 patch
+From: Radu Spineanu <r...@debian.org>
+Subject: rc2 -> rc3 patch
 
-if [ $# -ne 1 ]; then
-    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-    exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-case "$1" in
-       -patch) patch $patch_opts -p1 < $0;;
-       -unpatch) patch $patch_opts -p1 -R < $0;;
-        *)
-                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-                exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
 diff -Naur ilohamail-0.8.14.orig/DEV_LOG.txt IlohaMail-0.8.14-rc3/DEV_LOG.txt
 --- ilohamail-0.8.14.orig/DEV_LOG.txt	2004-12-07 21:40:05.000000000 +0200
 +++ IlohaMail-0.8.14-rc3/DEV_LOG.txt	1970-01-01 02:00:00.000000000 +0200
diff --git a/debian/patches/06-notrim.dpatch b/debian/patches/06-notrim.dpatch
deleted file mode 100644
index fc140b4..0000000
--- a/debian/patches/06-notrim.dpatch
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh -e
-## 06-notrim.dpatch by Radu Spineanu <r...@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Do not remove whitespace characters from the password
-
-if [ $# -ne 1 ]; then
-    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-    exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-case "$1" in
-       -patch) patch $patch_opts -p1 < $0;;
-       -unpatch) patch $patch_opts -p1 -R < $0;;
-        *)
-                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-                exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
-diff -Naur IlohaMail-0.8.14-rc3.old/IlohaMail/source/index.php IlohaMail-0.8.14/IlohaMail/source/index.php
---- IlohaMail-0.8.14-rc3.old/IlohaMail/source/index.php	2006-04-16 03:23:56.067555440 +0300
-+++ IlohaMail-0.8.14/IlohaMail/source/index.php	2006-04-16 03:24:17.293328632 +0300
-@@ -79,8 +79,6 @@
- 	//clean up
- 	$user = trim(chop($user));
- 	$host = trim(chop($host));
--	$password = trim(chop($password));
--
- 
- 	//validate host
- 	if (!empty($default_host)){
diff --git a/debian/patches/06-notrim.patch b/debian/patches/06-notrim.patch
new file mode 100644
index 0000000..54f27dc
--- /dev/null
+++ b/debian/patches/06-notrim.patch
@@ -0,0 +1,15 @@
+From: Radu Spineanu <r...@debian.org>
+Subject: Do not remove whitespace characters from the password
+
+diff -Naur IlohaMail-0.8.14-rc3.old/IlohaMail/source/index.php IlohaMail-0.8.14/IlohaMail/source/index.php
+--- IlohaMail-0.8.14-rc3.old/IlohaMail/source/index.php	2006-04-16 03:23:56.067555440 +0300
++++ IlohaMail-0.8.14/IlohaMail/source/index.php	2006-04-16 03:24:17.293328632 +0300
+@@ -79,8 +79,6 @@
+ 	//clean up
+ 	$user = trim(chop($user));
+ 	$host = trim(chop($host));
+-	$password = trim(chop($password));
+-
+ 
+ 	//validate host
+ 	if (!empty($default_host)){
diff --git a/debian/patches/07-utf8-conversion b/debian/patches/07-utf8-conversion
deleted file mode 100644
index 7b35bab..0000000
--- a/debian/patches/07-utf8-conversion
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh -e
-## 07-utf8-conversion.dpatch by Nicolas Boullis <nboul...@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Fix charset conversions to UTF-8.
-
-if [ $# -ne 1 ]; then
-    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-    exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-case "$1" in
-       -patch) patch $patch_opts -p1 < $0;;
-       -unpatch) patch $patch_opts -p1 -R < $0;;
-        *)
-                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-                exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
-diff -Naur IlohaMail-0.8.14-rc3.old/IlohaMail/lang/UTF-8.inc IlohaMail-0.8.14-rc3/IlohaMail/lang/UTF-8.inc
---- IlohaMail-0.8.14-rc3.old/IlohaMail/lang/UTF-8.inc	2006-04-16 03:23:55.867585840 +0300
-+++ IlohaMail-0.8.14-rc3/IlohaMail/lang/UTF-8.inc	2006-04-16 03:33:22.923380256 +0300
-@@ -24,8 +24,7 @@
- }
- 
- function LangConvert($string, $charset, $charset2){
--	if($charset!=$charset2) return utf8_encode($string);
--	else return $string;
-+	return iconv($charset2, $charset, $string);
- }
- 
- function LangEncodeSubject($input, $charset){
diff --git a/debian/patches/07-utf8-conversion.patch b/debian/patches/07-utf8-conversion.patch
new file mode 100644
index 0000000..0a00729
--- /dev/null
+++ b/debian/patches/07-utf8-conversion.patch
@@ -0,0 +1,16 @@
+From: Nicolas Boullis <nboul...@debian.org>
+Subject: Fix charset conversions to UTF-8.
+
+diff -Naur IlohaMail-0.8.14-rc3.old/IlohaMail/lang/UTF-8.inc IlohaMail-0.8.14-rc3/IlohaMail/lang/UTF-8.inc
+--- IlohaMail-0.8.14-rc3.old/IlohaMail/lang/UTF-8.inc	2006-04-16 03:23:55.867585840 +0300
++++ IlohaMail-0.8.14-rc3/IlohaMail/lang/UTF-8.inc	2006-04-16 03:33:22.923380256 +0300
+@@ -24,8 +24,7 @@
+ }
+ 
+ function LangConvert($string, $charset, $charset2){
+-	if($charset!=$charset2) return utf8_encode($string);
+-	else return $string;
++	return iconv($charset2, $charset, $string);
+ }
+ 
+ function LangEncodeSubject($input, $charset){
diff --git a/debian/patches/08-remove-headers b/debian/patches/08-remove-headers.patch
similarity index 59%
rename from debian/patches/08-remove-headers
rename to debian/patches/08-remove-headers.patch
index a127eb2..20bf1e2 100644
--- a/debian/patches/08-remove-headers
+++ b/debian/patches/08-remove-headers.patch
@@ -1,28 +1,6 @@
-#!/bin/sh -e
-## 08-remove-headers.dpatch by Radu Spineanu <r...@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Do not add IlohaMail headers to the message
+From: Radu Spineanu <r...@debian.org>
+Subject: Do not add IlohaMail headers to the message
 
-if [ $# -ne 1 ]; then
-    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-    exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-case "$1" in
-       -patch) patch $patch_opts -p1 < $0;;
-       -unpatch) patch $patch_opts -p1 -R < $0;;
-        *)
-                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-                exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
 diff -Naur ilohamail-0.8.14.orig.old/IlohaMail/source/compose2.php ilohamail-0.8.14.orig/IlohaMail/source/compose2.php
 --- ilohamail-0.8.14.orig.old/IlohaMail/source/compose2.php	2007-05-12 19:52:07.025102093 +0300
 +++ ilohamail-0.8.14.orig/IlohaMail/source/compose2.php	2007-05-12 19:48:54.000000000 +0300
diff --git a/debian/patches/09-smtp-port b/debian/patches/09-smtp-port.patch
similarity index 61%
rename from debian/patches/09-smtp-port
rename to debian/patches/09-smtp-port.patch
index 745ed92..85e7cb7 100644
--- a/debian/patches/09-smtp-port
+++ b/debian/patches/09-smtp-port.patch
@@ -1,28 +1,6 @@
-#!/bin/sh -e
-## 09-smtp-port.dpatch by Radu Spineanu <r...@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Support non-standard SMTP ports
+From: Radu Spineanu <r...@debian.org>
+Subject: Support non-standard SMTP ports
 
-if [ $# -ne 1 ]; then
-    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-    exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-case "$1" in
-       -patch) patch $patch_opts -p1 < $0;;
-       -unpatch) patch $patch_opts -p1 -R < $0;;
-        *)
-                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-                exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
 diff -Naur ilohamail-0.8.14.orig.old/IlohaMail/conf/conf.php ilohamail-0.8.14.orig/IlohaMail/conf/conf.php
 --- ilohamail-0.8.14.orig.old/IlohaMail/conf/conf.php	2006-10-28 20:33:40.884873500 +0300
 +++ ilohamail-0.8.14.orig/IlohaMail/conf/conf.php	2006-10-28 20:33:53.889686250 +0300
diff --git a/debian/patches/10-courier-mode b/debian/patches/10-courier-mode
deleted file mode 100644
index cfb6a4f..0000000
--- a/debian/patches/10-courier-mode
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh -e
-## 10-courier-mode.dpatch by Radu Spineanu <r...@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Update the documentation reflecting courier SMTP submission
-
-if [ $# -ne 1 ]; then
-    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-    exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-case "$1" in
-       -patch) patch $patch_opts -p1 < $0;;
-       -unpatch) patch $patch_opts -p1 -R < $0;;
-        *)
-                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-                exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
-diff -Naur ilohamail-0.8.14.orig.old/IlohaMail/conf/conf.php ilohamail-0.8.14.orig/IlohaMail/conf/conf.php
---- ilohamail-0.8.14.orig.old/IlohaMail/conf/conf.php	2006-10-28 20:35:51.000000000 +0300
-+++ ilohamail-0.8.14.orig/IlohaMail/conf/conf.php	2006-10-28 20:42:45.794928250 +0300
-@@ -205,7 +205,10 @@
- 	is specified.
- 	
- 	Supported values:  "sendmail", "courier"
--	
-+
-+        The current version of Courier in Debian doesn't need 
-+	the special 'courier' mode anymore as it behaves correctly.
-+
- 	NOTE: if you're not sure, just use "sendmail"
- */
- 
diff --git a/debian/patches/10-courier-mode.patch b/debian/patches/10-courier-mode.patch
new file mode 100644
index 0000000..6ad416d
--- /dev/null
+++ b/debian/patches/10-courier-mode.patch
@@ -0,0 +1,18 @@
+From: Radu Spineanu <r...@debian.org>
+Subject: Update the documentation reflecting courier SMTP submission
+
+diff -Naur ilohamail-0.8.14.orig.old/IlohaMail/conf/conf.php ilohamail-0.8.14.orig/IlohaMail/conf/conf.php
+--- ilohamail-0.8.14.orig.old/IlohaMail/conf/conf.php	2006-10-28 20:35:51.000000000 +0300
++++ ilohamail-0.8.14.orig/IlohaMail/conf/conf.php	2006-10-28 20:42:45.794928250 +0300
+@@ -205,7 +205,10 @@
+ 	is specified.
+ 	
+ 	Supported values:  "sendmail", "courier"
+-	
++
++        The current version of Courier in Debian doesn't need 
++	the special 'courier' mode anymore as it behaves correctly.
++
+ 	NOTE: if you're not sure, just use "sendmail"
+ */
+ 
diff --git a/debian/patches/11-mktime b/debian/patches/11-mktime.patch
similarity index 50%
rename from debian/patches/11-mktime
rename to debian/patches/11-mktime.patch
index 1986ec2..2102917 100644
--- a/debian/patches/11-mktime
+++ b/debian/patches/11-mktime.patch
@@ -1,28 +1,6 @@
-#!/bin/sh -e
-## 11-mktime.dpatch by Mark Ford <m...@alwayspages.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Fix a mktime error expecting long and receiving string
+From: Mark Ford <m...@alwayspages.com>
+Subject: Fix a mktime error expecting long and receiving string
 
-if [ $# -ne 1 ]; then
-    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-    exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-case "$1" in
-       -patch) patch $patch_opts -p1 < $0;;
-       -unpatch) patch $patch_opts -p1 -R < $0;;
-        *)
-                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-                exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
 diff -Naur ilohamail-0.8.14.orig.old/IlohaMail/include/imap.inc ilohamail-0.8.14.orig/IlohaMail/include/imap.inc
 --- ilohamail-0.8.14.orig.old/IlohaMail/include/imap.inc	2007-05-07 13:27:13.455531592 +0300
 +++ ilohamail-0.8.14.orig/IlohaMail/include/imap.inc	2007-05-07 13:31:27.779425842 +0300
diff --git a/debian/patches/12-extra-newlines b/debian/patches/12-extra-newlines
deleted file mode 100644
index f41d83e..0000000
--- a/debian/patches/12-extra-newlines
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh -e
-## 12-extra-newlines.dpatch by Radu Spineanu <r...@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Fix extra newlines between headers on sentmail via postfix
-
-if [ $# -ne 1 ]; then
-    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-    exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-case "$1" in
-       -patch) patch $patch_opts -p1 < $0;;
-       -unpatch) patch $patch_opts -p1 -R < $0;;
-        *)
-                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-                exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
-diff -Naur ilohamail-0.8.14.orig.old/IlohaMail/source/compose2.php ilohamail-0.8.14.orig/IlohaMail/source/compose2.php
---- ilohamail-0.8.14.orig.old/IlohaMail/source/compose2.php	2007-05-07 13:27:14.963625842 +0300
-+++ ilohamail-0.8.14.orig/IlohaMail/source/compose2.php	2007-05-07 13:50:41.015498592 +0300
-@@ -675,12 +675,12 @@
- 					reset($header_a);
- 					while ( list($k,$line) = each($header_a) ) $header_a[$k] = chop($line);
- 
--					$headerx = implode("\r\n", $header_a);
-+					$headerx = implode("\n", $header_a);
- 					$body = str_replace("\r", "", $body);
--					$body = str_replace("\n", "\r\n", $body);
--					
-+					//$body = str_replace("\n", "\r\n", $body);
-+			
- 					echo "<br>From: $from_addr <br>\n";
--
-+				
- 					//send
- 					if (ini_get("safe_mode")=="1")
- 						$sent = mail($to,$subject,$body,$headerx);
diff --git a/debian/patches/12-extra-newlines.patch b/debian/patches/12-extra-newlines.patch
new file mode 100644
index 0000000..ebb3903
--- /dev/null
+++ b/debian/patches/12-extra-newlines.patch
@@ -0,0 +1,26 @@
+From: Radu Spineanu <r...@debian.org>
+Subject: Fix extra newlines between headers on sentmail via postfix
+
+---
+ IlohaMail/source/compose2.php |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/IlohaMail/source/compose2.php
++++ b/IlohaMail/source/compose2.php
+@@ -676,12 +676,12 @@
+ 					reset($header_a);
+ 					while ( list($k,$line) = each($header_a) ) $header_a[$k] = chop($line);
+ 
+-					$headerx = implode("\r\n", $header_a);
++					$headerx = implode("\n", $header_a);
+ 					$body = str_replace("\r", "", $body);
+-					$body = str_replace("\n", "\r\n", $body);
+-					
++					//$body = str_replace("\n", "\r\n", $body);
++			
+ 					echo "<br>From: $from_addr <br>\n";
+-
++				
+ 					//send
+ 					if (ini_get("safe_mode")=="1")
+ 						$sent = mail($to,$subject,$body,$headerx);
diff --git a/debian/patches/13-pop3-content b/debian/patches/13-pop3-content
deleted file mode 100644
index 984ce33..0000000
--- a/debian/patches/13-pop3-content
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh -e
-## 13-pop3-content by Radu Spineanu <r...@debian.org>
-##
-## DP: Fix Ilohamail ignoring header information in POP3
-
-if [ $# -ne 1 ]; then
-    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-    exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-case "$1" in
-       -patch) patch $patch_opts -p1 < $0;;
-       -unpatch) patch $patch_opts -p1 -R < $0;;
-        *)
-                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-                exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
-diff -Naur old/IlohaMail/include/pop3.inc new/IlohaMail/include/pop3.inc
---- old/IlohaMail/include/pop3.inc	2008-07-06 23:24:00.000000000 +0300
-+++ new/IlohaMail/include/pop3.inc	2008-07-06 23:20:41.000000000 +0300
-@@ -129,7 +129,11 @@
- // check if $string starts with $match
- function iil_StartsWith($string, $match){
- 	if ((empty($string)) || (empty($match))) return false;
--	
-+
-+        
-+        $string[0] = strtolower($string[0]);
-+        $match[0] =  strtolower($match[0]);
-+         
- 	if ($string[0]==$match[0]){
- 		$pos=strpos($string, $match);
- 		if ( $pos === false) return false;
diff --git a/debian/patches/13-pop3-content.patch b/debian/patches/13-pop3-content.patch
new file mode 100644
index 0000000..60c6ad8
--- /dev/null
+++ b/debian/patches/13-pop3-content.patch
@@ -0,0 +1,19 @@
+From: Radu Spineanu <r...@debian.org>
+Subject: Fix Ilohamail ignoring header information in POP3
+
+diff -Naur old/IlohaMail/include/pop3.inc new/IlohaMail/include/pop3.inc
+--- old/IlohaMail/include/pop3.inc	2008-07-06 23:24:00.000000000 +0300
++++ new/IlohaMail/include/pop3.inc	2008-07-06 23:20:41.000000000 +0300
+@@ -129,7 +129,11 @@
+ // check if $string starts with $match
+ function iil_StartsWith($string, $match){
+ 	if ((empty($string)) || (empty($match))) return false;
+-	
++
++        
++        $string[0] = strtolower($string[0]);
++        $match[0] =  strtolower($match[0]);
++         
+ 	if ($string[0]==$match[0]){
+ 		$pos=strpos($string, $match);
+ 		if ( $pos === false) return false;
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..2a0ce94
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,13 @@
+05-rc3.patch
+01-debianpath.patch
+02-debianconfig.patch
+04-xss3.patch
+06-notrim.patch
+07-utf8-conversion.patch
+08-remove-headers.patch
+09-smtp-port.patch
+10-courier-mode.patch
+11-mktime.patch
+12-extra-newlines.patch
+13-pop3-content.patch
+
diff --git a/debian/rules b/debian/rules
index 08871d4..92d6712 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,14 +4,17 @@ PACKAGE := ilohamail
 TOPDIR := $(shell pwd)
 t = ${TOPDIR}/debian/${PACKAGE}
 
-include /usr/share/dpatch/dpatch.make
 
-build: patch build-stamp
+
+build-arch: build
+build-indep: build
+
+build: build-stamp
 build-stamp: 
 	touch build-stamp
 # Nothing todo (yet?)
 
-clean: unpatch
+clean:
 	dh_testdir
 	dh_testroot
 	rm -f build-stamp install-stamp
@@ -61,4 +64,4 @@ binary-arch: install
 # We have nothing to do by default.
 
 binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install patch unpatch
+.PHONY: build clean binary-indep binary-arch binary install
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
-- 
1.7.10

Reply via email to