Package: xmail
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 0ed48395f92735ba56d154363728dbc671d675d1 Mon Sep 17 00:00:00 2001
From: Jari Aalto <[email protected]>
Date: Sat, 14 Apr 2012 02:03:14 +0300
Subject: [PATCH] format-3.0
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Signed-off-by: Jari Aalto <[email protected]>
---
 debian/changelog                                  |   13 ++++++++
 debian/compat                                     |    2 +-
 debian/control                                    |    5 +--
 debian/copyright                                  |    6 ++--
 debian/patches/00list                             |    2 --
 debian/patches/{01_symlinks => 01-symlinks.patch} |   24 ++------------
 debian/patches/{03_perm => 03-perm.patch}         |   24 ++------------
 debian/patches/04-strip.patch                     |   19 +++++++++++
 debian/patches/04_strip                           |   36 ---------------------
 debian/patches/series                             |    2 ++
 debian/rules                                      |   29 +++++++++--------
 debian/source/format                              |    2 +-
 12 files changed, 61 insertions(+), 103 deletions(-)
 delete mode 100644 debian/patches/00list
 rename debian/patches/{01_symlinks => 01-symlinks.patch} (64%)
 rename debian/patches/{03_perm => 03-perm.patch} (57%)
 create mode 100644 debian/patches/04-strip.patch
 delete mode 100644 debian/patches/04_strip
 create mode 100644 debian/patches/series

diff --git a/debian/changelog b/debian/changelog
index 94b4caf..32d429c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+xmail (1.27-1.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 to rules file.
+  * Update Patch 04 with "quilt refresh" to make it apply cleanly.
+  * Fix copyright-refers-to-symlink-license (Lintian).
+  * Fix copyright-with-old-dh-make-debian-copyright (Lintian).
+  * Fix no-homepage-field (Lintian).
+
+ -- Jari Aalto <[email protected]>  Sat, 14 Apr 2012 01:55:26 +0300
+
 xmail (1.27-1.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 a71f88a..6e42e8e 100644
--- a/debian/control
+++ b/debian/control
@@ -2,8 +2,9 @@ Source: xmail
 Section: mail
 Priority: extra
 Maintainer: Radu Spineanu <[email protected]>
-Build-Depends: debhelper (>= 7), dpatch, libssl-dev, libkvm-dev [kfreebsd-i386 kfreebsd-amd64]
-Standards-Version: 3.8.4
+Build-Depends: debhelper (>= 9), libssl-dev, libkvm-dev [kfreebsd-i386 kfreebsd-amd64]
+Standards-Version: 3.9.3
+Homepage: http://www.xmailserver.org
 
 Package: xmail
 Architecture: any
diff --git a/debian/copyright b/debian/copyright
index 6f3cff5..6d67139 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -7,7 +7,7 @@ Upstream Author: Davide Libenzi <[email protected]>
 
 Copyright:
 
-   Copyright (C) 2000 - 2008 Davide Libenzi <[email protected]>
+   Copyright (C) 2000-2008 Davide Libenzi <[email protected]>
 
    This package is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -26,5 +26,5 @@ Copyright:
    On Debian GNU/Linux systems, the complete text of the GNU General
    Public License can be found in `/usr/share/common-licenses/GPL-2'.
 
-   The Debian packaging is (C) 2008, Radu Spineanu <[email protected]> and
-   is licensed under the GPL, see above.
+The Debian packaging is Copyright (C) 2008 Radu Spineanu <[email protected]> and
+is licensed under the GPL, see above.
diff --git a/debian/patches/00list b/debian/patches/00list
deleted file mode 100644
index 0aabf26..0000000
--- a/debian/patches/00list
+++ /dev/null
@@ -1,2 +0,0 @@
-03_perm
-04_strip
diff --git a/debian/patches/01_symlinks b/debian/patches/01-symlinks.patch
similarity index 64%
rename from debian/patches/01_symlinks
rename to debian/patches/01-symlinks.patch
index 035f9ff..0b4c8bb 100644
--- a/debian/patches/01_symlinks
+++ b/debian/patches/01-symlinks.patch
@@ -1,26 +1,6 @@
-#! /bin/sh -e
-## 01_symlink.dpatch done by Radu Spineanu <[email protected]>
-## DP: This patch enables xmail to detect symlinks and not overwrite them
+From: Radu Spineanu <[email protected]>
+Subject: This patch enables xmail to detect symlinks and not overwrite them
 
-
-if [ $# -lt 1 ]; then
-    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-    exit 1
-fi
-case "$1" in
-       -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
-		
-       -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
-
-        *)
-                echo >&2 \
-		  "`basename $0`: script expects -patch|-unpatch as argument"
-                exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
 diff -Naur xmail.old/MiscUtils.cpp xmail-1.21/MiscUtils.cpp
 --- xmail.old/MiscUtils.cpp	2005-01-10 01:00:16.000000000 +0200
 +++ xmail-1.21/MiscUtils.cpp	2005-02-10 23:26:50.000000000 +0200
diff --git a/debian/patches/03_perm b/debian/patches/03-perm.patch
similarity index 57%
rename from debian/patches/03_perm
rename to debian/patches/03-perm.patch
index 8bdf263..dd0a7d4 100644
--- a/debian/patches/03_perm
+++ b/debian/patches/03-perm.patch
@@ -1,26 +1,6 @@
-#! /bin/sh -e
-## 03_perm.dpatch done by Radu Spineanu  <[email protected]>
-## DP: Lets only connections from localhost to finger and control server by default
+From: Radu Spineanu  <[email protected]>
+Subject: Lets only connections from localhost to finger and control server by default
 
-
-if [ $# -lt 1 ]; then
-    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-    exit 1
-fi
-case "$1" in
-       -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
-		
-       -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
-
-        *)
-                echo >&2 \
-		  "`basename $0`: script expects -patch|-unpatch as argument"
-                exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
 diff -Naur xmail-1.22.old/MailRoot/ctrl.ipmap.tab xmail-1.22/MailRoot/ctrl.ipmap.tab
 --- xmail-1.22.old/MailRoot/ctrl.ipmap.tab	2005-10-13 00:35:22.000000000 +0300
 +++ xmail-1.22/MailRoot/ctrl.ipmap.tab	2005-11-07 19:36:54.000000000 +0200
diff --git a/debian/patches/04-strip.patch b/debian/patches/04-strip.patch
new file mode 100644
index 0000000..44360e6
--- /dev/null
+++ b/debian/patches/04-strip.patch
@@ -0,0 +1,19 @@
+From: Radu Spineanu  <[email protected]>
+Subject: Don't strip executables during build, let dh_strip handle them. (#438310)
+
+---
+ Makefile.lnx |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/Makefile.lnx
++++ b/Makefile.lnx
+@@ -21,7 +21,8 @@
+ SYSTYPE = linux
+ CC = g++
+ LD = g++
+-STRIP = strip
++# Do not strip executables, let dh_strip handle this (closes: #438310)
++STRIP = touch
+ 
+ ifeq ("$(XMAIL_FILE_OFF_BITS)", "")
+     CFLAGS := $(CFLAGS) -D_FILE_OFFSET_BITS=64
diff --git a/debian/patches/04_strip b/debian/patches/04_strip
deleted file mode 100644
index 8ca0e39..0000000
--- a/debian/patches/04_strip
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh -e
-## 04_strip.dpatch done by Radu Spineanu  <[email protected]>
-## DP: Don't strip executables during build, let dh_strip handle them. (#438310)
-
-
-if [ $# -lt 1 ]; then
-    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
-    exit 1
-fi
-case "$1" in
-       -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
-		
-       -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
-
-        *)
-                echo >&2 \
-		  "`basename $0`: script expects -patch|-unpatch as argument"
-                exit 1;;
-esac
-
-exit 0
-
-@DPATCH@
-diff -Naur xmail-1.25.old/Makefile.lnx xmail-1.25/Makefile.lnx
---- xmail-1.25.old/Makefile.lnx	2008-01-07 18:47:44.790180323 +0200
-+++ xmail-1.25/Makefile.lnx	2008-01-07 18:48:36.970165033 +0200
-@@ -21,7 +21,8 @@
- SYSTYPE = linux
- CC = g++
- LD = g++
--STRIP = strip
-+# Do not strip executables, let dh_strip handle this (closes: #438310)
-+STRIP = touch
- 
- ifneq ("$(WITH_SSL_INCLUDE)", "")
-     CFLAGS := $(CFLAGS) -I$(WITH_SSL_INCLUDE)
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..e88a0de
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+03-perm.patch
+04-strip.patch
diff --git a/debian/rules b/debian/rules
index b9ad73b..0095994 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,19 +6,16 @@
 #export DH_VERBOSE=1
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-        CFLAGS += -O0
+	CFLAGS += -O0
 else
-        CFLAGS += -O2
+	CFLAGS += -O2
 endif
 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-        INSTALL_PROGRAM += -s
+	INSTALL_PROGRAM += -s
 endif
 
 DEB_HOST_ARCH_OS = $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
 
-# Include dpatch stuff.
-include /usr/share/dpatch/dpatch.make
-
 package=xmail
 base=debian/$(package)
 docdir=${base}-doc/usr/share/doc/$(package)
@@ -30,7 +27,11 @@ configure-stamp:
 
 	touch configure-stamp
 
-build: patch build-stamp
+
+build-arch: build
+build-indep: build
+
+build: build-stamp
 
 build-stamp: configure-stamp 
 	dh_testdir
@@ -45,7 +46,7 @@ endif
 
 	touch build-stamp
 
-clean: clean1 unpatch
+clean: clean1
 
 clean1:
 	dh_testdir
@@ -100,16 +101,16 @@ install: build
 	dh_link /var/cache/xmail/dnscache $(MAILROOT)/dnscache
 
 	#spool
-	dh_link  /var/spool/xmail/spool $(MAILROOT)/spool
-	dh_link  /var/spool/xmail/domains $(MAILROOT)/domains
-	dh_link  /var/spool/xmail/pop3locks $(MAILROOT)/pop3locks
-	dh_link  /var/spool/xmail/pop3linklocks $(MAILROOT)/pop3linklocks
+	dh_link	 /var/spool/xmail/spool $(MAILROOT)/spool
+	dh_link	 /var/spool/xmail/domains $(MAILROOT)/domains
+	dh_link	 /var/spool/xmail/pop3locks $(MAILROOT)/pop3locks
+	dh_link	 /var/spool/xmail/pop3linklocks $(MAILROOT)/pop3linklocks
 
 	#sendmail replacement
 	dh_link /var/lib/xmail/sendmail/xsendmail /usr/sbin/sendmail
 	dh_link /var/lib/xmail/sendmail/xsendmail /usr/lib/sendmail
 
-        #add current version information
+	#add current version information
 	echo `dpkg-parsechangelog |grep Version |cut -d ' ' -f 2` > debian/xmail/var/lib/xmail/curr_ver
 
 	#add lintian overrides
@@ -161,7 +162,7 @@ binary-arch: build install install-doc
 
 
 binary: binary-indep binary-arch
-.PHONY: build clean1 binary-indep binary-arch binary install install-doc configure patch unpatch
+.PHONY: build clean1 binary-indep binary-arch binary install install-doc configure
 
 newtemplate:
 	debconf-updatepo
diff --git a/debian/source/format b/debian/source/format
index d3827e7..163aaf8 100644
--- a/debian/source/format
+++ b/debian/source/format
@@ -1 +1 @@
-1.0
+3.0 (quilt)
-- 
1.7.9.5

Reply via email to