Package: mailfilter
Severity: wishlist
Tags: patch

Hi Joerg and Ricardo,

I had some free time; see attached patch to deprecate dpatch. Note that all
files in debian/patches/* are canocalized to *.patch.

Let me know if there is anything that needs adjusting.

Thanks,
Jari


[*] 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. <http://wiki.debian.org/Projects/DebSrc3.0>.


>From 0fe42bb3a2c747727b6feed03af7b4c9d39047af Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aa...@cante.net>
Date: Wed, 25 Apr 2012 09:46:52 +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/NEWS                                        |   12 ++++----
 debian/README.source                               |    7 -----
 debian/changelog                                   |   12 ++++++++
 debian/compat                                      |    2 +-
 debian/config                                      |    4 ++-
 debian/control                                     |    5 ++--
 debian/patches/00list                              |    3 --
 ...atch => 01-remove-workaround-fixed-FTBFS.patch} |   10 ++-----
 ...wer_g++.dpatch => 02-fix-build-newer-g++.patch} |    8 ++----
 ...sion.dpatch => 03-fix-invalid-conversion.patch} |   10 ++-----
 debian/patches/10-manpage.patch                    |   30 ++++++++++++++++++++
 debian/patches/series                              |    3 ++
 debian/postinst                                    |    5 +++-
 debian/rules                                       |    9 +++---
 debian/source/format                               |    1 +
 src/rfc822.cc                                      |    7 +++--
 16 files changed, 79 insertions(+), 49 deletions(-)
 delete mode 100644 debian/README.source
 mode change 100644 => 100755 debian/config
 delete mode 100644 debian/patches/00list
 rename debian/patches/{01_remove_workaround_fixed_FTBFS.dpatch => 01-remove-workaround-fixed-FTBFS.patch} (90%)
 rename debian/patches/{02_fix_build_newer_g++.dpatch => 02-fix-build-newer-g++.patch} (52%)
 rename debian/patches/{03_fix_invalid_conversion.dpatch => 03-fix-invalid-conversion.patch} (81%)
 create mode 100644 debian/patches/10-manpage.patch
 create mode 100644 debian/patches/series
 mode change 100644 => 100755 debian/postinst
 create mode 100644 debian/source/format

diff --git a/debian/NEWS b/debian/NEWS
index f5f272d..794421e 100644
--- a/debian/NEWS
+++ b/debian/NEWS
@@ -1,12 +1,12 @@
 mailfilter (0.8.1-1) unstable; urgency=low
 
-  * Mailfilter did change its rcfile format. From now on parameter strings
-    have to be in quotes, e.g.
-    .
+  Mailfilter did change its rcfile format. From now on parameter strings
+  have to be in quotes, e.g.
+
     SERVER = "my.server"
-    .
-    This also hits all your user created rules. It is not necessary if your
-    parameter is a number e.g. the port number.                      
+
+  This also hits all your user created rules. It is not necessary if your
+  parameter is a number e.g. the port number. 
 
  -- Joerg Jaspert <jo...@debian.org>  Sat, 15 Sep 2007 14:13:35 +0200
 
diff --git a/debian/README.source b/debian/README.source
deleted file mode 100644
index 093c0c2..0000000
--- a/debian/README.source
+++ /dev/null
@@ -1,7 +0,0 @@
-README.source for mailfilter
-----------------------------
-  
- This package uses dpatch for patch management, see the file
- /usr/share/doc/dpatch/README.source.gz for details.
-
- -- Ricardo Mones <mo...@debian.org>  Fri, 15 Jan 2010 08:21:09 +0100
diff --git a/debian/changelog b/debian/changelog
index 8548d7a..d88e5da 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+mailfilter (0.8.2-2.1) 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.
+  * Use dh_prep in rules file.
+  * Fix debian-news-entry-uses-asterisk (Lintian).
+  * Fix maintainer-script-without-set-e (Lintian).
+  * Fix no-homepage-field (Lintian).
+
+ -- Jari Aalto <jari.aa...@cante.net>  Wed, 25 Apr 2012 09:31:08 +0300
+
 mailfilter (0.8.2-2) unstable; urgency=low
 
   * Modified 03_fix_invalid_conversion patch to include Ubuntu part,
diff --git a/debian/compat b/debian/compat
index 7ed6ff8..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-5
+9
diff --git a/debian/config b/debian/config
old mode 100644
new mode 100755
index a9a658f..ae01592
--- a/debian/config
+++ b/debian/config
@@ -1,4 +1,6 @@
-#!/bin/sh -e
+#!/bin/sh
+
+set -e
 
 # source debconf library
 . /usr/share/debconf/confmodule
diff --git a/debian/control b/debian/control
index 2c9deac..9afde2f 100644
--- a/debian/control
+++ b/debian/control
@@ -3,8 +3,9 @@ Section: mail
 Priority: optional
 Maintainer: Joerg Jaspert <jo...@debian.org>
 Uploaders: Ricardo Mones <mo...@debian.org>
-Build-Depends: debhelper (>= 5), bison, gettext, flex, dpatch, libssl-dev
-Standards-Version: 3.9.2
+Build-Depends: debhelper (>= 9), bison, gettext, flex, libssl-dev
+Standards-Version: 3.9.3
+Homepage: http://freecode.com/projects/mailfilter
 
 Package: mailfilter
 Architecture: any
diff --git a/debian/patches/00list b/debian/patches/00list
deleted file mode 100644
index 6208acd..0000000
--- a/debian/patches/00list
+++ /dev/null
@@ -1,3 +0,0 @@
-02_fix_build_newer_g++
-03_fix_invalid_conversion
-
diff --git a/debian/patches/01_remove_workaround_fixed_FTBFS.dpatch b/debian/patches/01-remove-workaround-fixed-FTBFS.patch
similarity index 90%
rename from debian/patches/01_remove_workaround_fixed_FTBFS.dpatch
rename to debian/patches/01-remove-workaround-fixed-FTBFS.patch
index b26dea9..f29dc0e 100644
--- a/debian/patches/01_remove_workaround_fixed_FTBFS.dpatch
+++ b/debian/patches/01-remove-workaround-fixed-FTBFS.patch
@@ -1,11 +1,7 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 01_remove_workaround_fixes_FTBFS.dpatch by Luk Claes <l...@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Removing upstream's workaround for a compile error fixes the FTBFS due 
-## DP: to not finding y.tab.o
+From: Luk Claes <l...@debian.org>
+Subject: Removing upstream's workaround for a compile error fixes the FTBFS due 
+to not finding y.tab.o
 
-@DPATCH@
 
 --- mailfilter-0.6.2.orig/Makefile.in
 +++ mailfilter-0.6.2/Makefile.in
diff --git a/debian/patches/02_fix_build_newer_g++.dpatch b/debian/patches/02-fix-build-newer-g++.patch
similarity index 52%
rename from debian/patches/02_fix_build_newer_g++.dpatch
rename to debian/patches/02-fix-build-newer-g++.patch
index 8e7345f..e1bfb7b 100644
--- a/debian/patches/02_fix_build_newer_g++.dpatch
+++ b/debian/patches/02-fix-build-newer-g++.patch
@@ -1,10 +1,6 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 02_fix_build_newer_g++.dpatch by Ricardo Mones <mo...@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Fix build with current g++
+From: Ricardo Mones <mo...@debian.org>
+Subject: Fix build with current g++
 
-@DPATCH@
 
 --- mailfilter-0.8.1.orig/src/apop.cc	2007-01-22 23:36:01.000000000 +0100
 +++ mailfilter-0.8.1/src/apop.cc	2009-07-20 01:30:03.000000000 +0200
diff --git a/debian/patches/03_fix_invalid_conversion.dpatch b/debian/patches/03-fix-invalid-conversion.patch
similarity index 81%
rename from debian/patches/03_fix_invalid_conversion.dpatch
rename to debian/patches/03-fix-invalid-conversion.patch
index d7cc41d..83cf059 100644
--- a/debian/patches/03_fix_invalid_conversion.dpatch
+++ b/debian/patches/03-fix-invalid-conversion.patch
@@ -1,11 +1,7 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 03_fix_invalid_conversion.dpatch by Ricardo Mones <mo...@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Fix invalid conversion
-## DP: and addded Ubuntu patch (thanks Ilya Barygin <bary...@gmail.com>)
+From: Ricardo Mones <mo...@debian.org>
+Subject: Fix invalid conversion
+and addded Ubuntu patch (thanks Ilya Barygin <bary...@gmail.com>)
 
-@DPATCH@
 
 diff -urN mailfilter-0.8.2.orig/src/header.cc mailfilter-0.8.2/src/header.cc
 --- mailfilter-0.8.2.orig/src/header.cc	2009-06-07 03:49:57.000000000 +0200
diff --git a/debian/patches/10-manpage.patch b/debian/patches/10-manpage.patch
new file mode 100644
index 0000000..65e80fd
--- /dev/null
+++ b/debian/patches/10-manpage.patch
@@ -0,0 +1,30 @@
+From: Jari Aalto <jari.aa...@cante.net>
+Subject: Fix hyphens in manual pages
+
+---
+ man/mailfilter.1   |    2 +-
+ man/mailfilterex.5 |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/man/mailfilter.1
++++ b/man/mailfilter.1
+@@ -21,7 +21,7 @@
+ .BR procmail (1)
+ for example.
+ .SH "RETURN VALUE"
+-The mailfilter program normally returns 0 but -1 if an error occurs.
++The mailfilter program normally returns 0 but \-1 if an error occurs.
+ However, if it has been invoked with the return-value command line switch,
+ it gives back a positive integer in case there are messages on the POP
+ server.  Empty POP accounts would then result in a return value of 0.
+--- a/man/mailfilterex.5
++++ b/man/mailfilterex.5
+@@ -112,7 +112,7 @@
+ .br
+ SCORE +100 = "^Content-Type:.*html"
+ .br
+-SCORE -100 = "^(To|From):.*my_mailing_list"
++SCORE \-100 = "^(To|From):.*my_mailing_list"
+ .RE
+ .PP
+ This simple example is useful to delete mails with a score greater than 100,
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..678132a
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+02-fix-build-newer-g++.patch
+03-fix-invalid-conversion.patch
+10-manpage.patch
diff --git a/debian/postinst b/debian/postinst
old mode 100644
new mode 100755
index c74f7d3..9dc4d90
--- a/debian/postinst
+++ b/debian/postinst
@@ -1,4 +1,7 @@
-#! /bin/sh -e
+#! /bin/sh
+
+set -e
+
 . /usr/share/debconf/confmodule
 #DEBHELPER#
 exit 0
diff --git a/debian/rules b/debian/rules
index a9d8f64..a98e445 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,7 +5,6 @@
 export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
-include /usr/share/dpatch/dpatch.make
 
 CFLAGS = -Wall -g
 
@@ -16,7 +15,7 @@ CFLAGS += -O2
 endif
 
 configure: configure-stamp
-configure-stamp: patch-stamp
+configure-stamp:
 	dh_testdir
 	CFLAGS='$(CFLAGS)' ./configure --prefix=/usr --mandir=\$${prefix}/share/man \
 	--infodir=\$${prefix}/share/info
@@ -33,7 +32,7 @@ build-stamp:
 	$(MAKE)
 	touch build-stamp
 
-clean: unpatch
+clean:
 	dh_testdir
 	dh_testroot
 	rm -f build-stamp configure-stamp
@@ -49,7 +48,7 @@ clean: unpatch
 install: build
 	dh_testdir
 	dh_testroot
-	dh_clean -k
+	dh_prep
 	dh_installdirs
 	$(MAKE) install DESTDIR=$(CURDIR)/debian/mailfilter
 	tar -czf ./debian/mailfilter/usr/share/doc/mailfilter/contrib.tar.gz ./contrib
@@ -82,4 +81,4 @@ binary-arch: build install
 
 binary: binary-indep binary-arch
 .PHONY: build clean binary-indep binary-arch binary install configure \
-        patch unpatch build-arch build-indep
+ build-arch build-indep
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)
diff --git a/src/rfc822.cc b/src/rfc822.cc
index 091935a..c814943 100644
--- a/src/rfc822.cc
+++ b/src/rfc822.cc
@@ -96,6 +96,7 @@ typedef unsigned int flex_uint32_t;
 #include <iostream> 
 #include <errno.h>
 #include <cstdlib>
+#include <cstdio>
 #include <cstring>
 /* end standard C++ headers. */
 
@@ -505,7 +506,7 @@ using namespace std;
    ;
 #endif
 
-#line 509 "rfc822.cc"
+#line 510 "rfc822.cc"
 
 #define INITIAL 0
 #define BODY_READY 1
@@ -617,7 +618,7 @@ YY_DECL
     
 #line 64 "rfc822.ll"
 
-#line 621 "rfc822.cc"
+#line 622 "rfc822.cc"
 
 	if ( !(yy_init) )
 		{
@@ -788,7 +789,7 @@ YY_RULE_SETUP
 #line 120 "rfc822.ll"
 ECHO;
 	YY_BREAK
-#line 792 "rfc822.cc"
+#line 793 "rfc822.cc"
 case YY_STATE_EOF(INITIAL):
 case YY_STATE_EOF(BODY_READY):
 case YY_STATE_EOF(TAG_READY):
-- 
1.7.10

Reply via email to