[SVN] r888 - in /branches/cyrus23/cyrus-imapd-2.3-hmh/debian: README.source changelog compat control cyrus-common-2.3.cyrus2.3.init cyrus-common-2.3.lintian cyrus-common-2.3.preinst executable.files patches/00list patches/series rules

debian at incase.de debian at incase.de
Wed Apr 28 03:07:17 UTC 2010


Author: hmh
Date: Wed Apr 28 05:07:08 2010
New Revision: 888

URL: https://mail.incase.de/viewcvs?rev=888&root=cyrus22&view=rev
Log:
build system fixes, switch to quilt, source format 1.0 and 3.0(quilt)-compatible. Still need to go over all patches once again, etc.

Added:
    branches/cyrus23/cyrus-imapd-2.3-hmh/debian/README.source
    branches/cyrus23/cyrus-imapd-2.3-hmh/debian/patches/series
Removed:
    branches/cyrus23/cyrus-imapd-2.3-hmh/debian/cyrus-common-2.3.preinst
    branches/cyrus23/cyrus-imapd-2.3-hmh/debian/executable.files
    branches/cyrus23/cyrus-imapd-2.3-hmh/debian/patches/00list
Modified:
    branches/cyrus23/cyrus-imapd-2.3-hmh/debian/changelog
    branches/cyrus23/cyrus-imapd-2.3-hmh/debian/compat
    branches/cyrus23/cyrus-imapd-2.3-hmh/debian/control
    branches/cyrus23/cyrus-imapd-2.3-hmh/debian/cyrus-common-2.3.cyrus2.3.init
    branches/cyrus23/cyrus-imapd-2.3-hmh/debian/cyrus-common-2.3.lintian
    branches/cyrus23/cyrus-imapd-2.3-hmh/debian/rules

Added: branches/cyrus23/cyrus-imapd-2.3-hmh/debian/README.source
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-hmh/debian/README.source?rev=888&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-hmh/debian/README.source (added)
+++ branches/cyrus23/cyrus-imapd-2.3-hmh/debian/README.source Wed Apr 28 05:07:08 2010
@@ -1,0 +1,132 @@
+Cyrus IMAPd 2.3 - Debian source package documentation
+-----------------------------------------------------
+
+General guidelines:
+
+This package has *all* changes from upstream stored into separate topic
+patches.  This rule must be followed, even on NMUs.
+
+The topic patches are managed by quilt, and follow the dpkg-source
+format 3.0 (quilt) specification (see dpkg-source(1)).  THIS DOES NOT
+MEAN THE PACKAGE MUST BE IN FORMAT 3.0 (quilt).  IT CAN ALSO HANDLE
+FORMAT 1.0.
+
+You MUST set the package format in debian/control, do NOT use
+debian/source/format, or the -f switch to dpkg-source.
+
+The package will make sure all patches are applied on build.  If you
+want to build a Debian package with some patches unapplied, you will
+have to use quilt to unapply them and *DISABLE* them in
+debian/patches/series.
+
+The package detects the current format from debian/control, and if it is
+format 1.0, it will unapply all patches on the clean target.  Otherwise,
+it will apply all patches on the clean target.
+
+Note that changes to the packaging (debian/) are done directly, and
+not through quilt patches.
+
+This package will NOT build correctly unless the debian/rules "clean"
+target is invoked first.  dpkg-buildpackage and all autobuilders do
+this.
+
+After you ran the clean target, you will get a work tree that is
+suitable for Debian package builds through debian/rules.  IT WILL NOT
+BUILD DIRECTLY.  CALL THE "build-prepare" TARGET IF YOU WANT IT IN A
+DIRECTLY BUILDABLE STATE.
+
+Do not patch autogenerated files, the build system will try very
+hard to make your life miserable.   Fix the real bug.
+
+
+Build workflow:
+
+1. "clean" target will:
+  - If a Makefile is available, attempt to call make distclean
+
+  - Remove any target stamps (like the one for build-prepare)
+
+  - Remove *all* autogenerated files, not just the autobuilt files, but
+    also all of the autotoolization.  This *DOES* include the master
+    Makefile, and configure scripts, as well as config.sub,
+    config.guess, and a few others.  That's why the tree is not left in
+    a buildable state.
+
+  - Remove all auto-built files that came with the tarball, and all
+    auto-built files which are part of the build system
+
+  - For dpkg-source Format: 1.0
+    - unapply any patches (otherwise, it will bloat the diff)
+
+  - For dpkg-source Format: 3.0 (quilt)
+    - apply all patches (as required by dpkg-source, although
+      dpkg-source would try to fix this if we got it wrong)
+
+  - remove anything else we change that must not leak to the
+    diffs.
+
+  We can't do much else here, or it will either leak crap to the diffs,
+  or cause dpkg to abort due to unrepresentable changes to the source
+  package.
+
+
+2. "build-prepare" will:
+
+  - Apply patches, if they are not already applied
+    * The patches *ARE* allowed to update anything in the
+      upstream buildsystem, such as Makefile.in, configure.in/ac,
+      cmulocal/*, etc.
+
+  - Rebuild the build system (autotoolize, etc)
+
+  ALL standard build targets depend on build-prepare.
+
+  We use automake because parts of automake are used by the system,
+  even if automake is not used to generate Makefile.in
+
+3. other useful auxiliary targets:
+  - Target configure-stamp will be called to run ./configure with
+    the proper options (and there are a *lot* of them).
+
+
+
+Dealing with patches in debian/patch
+------------------------------------
+
+Use quilt.  It is reasonably smart, and will not easily leak crap into
+the patches.  Please refer to quilt(1).  Make SURE you set
+QUILT_PATCHES=debian/patches.  Make SURE you run quilt from the top
+package directory (the one with the debian/ subdir).
+
+If you need to temporarily disable patches for a build, make sure you
+unapply them using quilt, and after that disable these patches in
+debian/patches/series.
+
+Use one patch per topic, not "per file".  Document the patch
+throughoutly in the header.  Descrive what it should be doing, and why
+it needs to be done.
+
+You can patch the build tree using the "patch" target, and unpatch it
+using the "unpatch" target, or you can use quilt directly.
+
+Unpatch is not that smart, if a patch gets misapplied, it may fail to
+revert things properly.  If you have a fix for this, I am sure dpatch
+would benefit from it :-)
+
+
+NMUs
+----
+
+Any and all changes to upstream code (i.e. any file outside of debian/)
+*must* go in as a new quilt patch, or as an update to an existing quilt
+patch.
+
+Document new patches properly, both in the patch file headers and in the
+Debian changelog.  Be verbose, terseness in changelogs is not only
+overrated, it is outright hostile to long-term maintenance.
+
+Always follow the current NMU procedures.
+
+If the NMU is not an urgent upload or one approved beforehand, please
+use the delayed upload queue to give us at least 5 days before it gets
+installed.  Obviously, this does not apply to bin-NMUs.

Modified: branches/cyrus23/cyrus-imapd-2.3-hmh/debian/changelog
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-hmh/debian/changelog?rev=888&root=cyrus22&r1=887&r2=888&view=diff
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-hmh/debian/changelog (original)
+++ branches/cyrus23/cyrus-imapd-2.3-hmh/debian/changelog Wed Apr 28 05:07:08 2010
@@ -1,9 +1,37 @@
 cyrus-imapd-2.3 (2.3.16-1) experimental; urgency=low
 
+  [ Henrique de Moraes Holschuh ]
   * New upstream source
-    + Use clean tarball from upstream and retain only debian/ dir from 2.3.14.
-  * Build depend on libdb4.7-dev, to match openldap
-  * Remove build-dependency on tcl8.3-dev
+    + Use clean tarball from upstream and retain only debian/ dir
+      from 2.3.14-2.  This makes sure all chages from upstream come
+      from debian/patches/*
+  * Build system:
+    + Switch to libdb4.7-dev, to match openldap
+    + Build-depend on xutils-dev instead of xutils (makedepend)
+    + Remove build-dependency on tcl8.3-dev
+    + Build-depend on automake for fresh copies of install-sh
+    + Switch to debhelper mode V7
+      + Use dh_prep instead of dh_clean -k
+      + Build-depend on debhelper (>= 7)
+    + DH_ALWAYS_EXCLUDE is now CVS:.svn:.git
+    + Add new debian/README.source file describing the build system
+    + Remove debian/executable.files, upstream has not shipped a broken
+      tarball in years...
+    + cyrus-doc-2.3: add Depends: ${misc:Depends} (lintian)
+    + debian/control: s/${Source-Version}/${binary:Version}/ (lintian)
+    + debian/cyrus-common-2.3.preinst: remove empty file (lintian)
+    + debian/rules: drop DEBUGFLAGS, it is not needed anymore
+    + debian/rules: honour CFLAGS, and drop -fPIC as upstream already
+      takes care of it
+  * Build system patch management:
+    + Switch from dpatch to quilt, to make it compatible with
+      dpkg-source format 3.0 (quilt)
+    + Tweak debian/rules so that the package can work in dpkg-source
+      formats 1.0 and 3.0 (quilt).  However, one MUST set the format
+      in debian/control to avoid leaking crap to the format 1.0 debian
+      diff
+    + Use Format 3.0 (quilt) by default
+    + Build-depend on quilt with dh_quilt_patch/unpatch support
   * Rework old patch 07-update_aclocal_and_configure.in.dpatch:
     + Move LOCK_GIVEUP_TIMER_DEFAULT configure.in change to patch
       12-fix_timeout_handling.dpatch where it belongs
@@ -11,17 +39,21 @@
       07-add-warnings-are-errors-mode.dpatch
     + Move hunk disabling AC_SYS_LONG_FILE_NAMES to new patch
       81-dont-test-for-long-names.dpatch
-  * Build-depend on automake for fresh copies of install-sh and minstalldirs
-
- -- Henrique de Moraes Holschuh <hmh at debian.org>  Sat, 16 Jan 2010 22:21:40 -0200
-
-cyrus-imapd-2.3 (2.3.14-3) experimental; urgency=low
-
-  * Remove versions from all Provides fields as dpkg doesn't support them.
-  * Remove spurious leading and trailing spaces from Descriptions.
-  * Remove Build-Depends on "| libsnmp5-dev" (package removed in 2005).
-
- -- Christoph Berg <myon at debian.org>  Sun, 17 Jan 2010 13:10:15 +0100
+  * initscript: Required-Start/-Stop must refer to $remote_fs (lintian)
+  * initscript: Default-Stop should not refer to runlevel S (lintian)
+  * configure: drop obsolete --with-tclsh
+
+  [ Christoph Berg ]
+  * Add myself to Uploaders
+  * Remove versions from all Provides fields as dpkg doesn't support them
+  * Remove spurious leading and trailing spaces from Descriptions
+  * Update Build-Depends:
+    + Remove "| libsnmp5-dev" (package removed in 2005).
+    + Replace gs with ghostscript
+  * Convert to use quilt, and update the patch headers to use clean paths
+    (Closes: #563303)
+
+ -- Henrique de Moraes Holschuh <hmh at debian.org>  Sun, 25 Apr 2010 16:26:45 -0300
 
 cyrus-imapd-2.3 (2.3.14-2) UNRELEASED; urgency=medium
 

Modified: branches/cyrus23/cyrus-imapd-2.3-hmh/debian/compat
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-hmh/debian/compat?rev=888&root=cyrus22&r1=887&r2=888&view=diff
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-hmh/debian/compat (original)
+++ branches/cyrus23/cyrus-imapd-2.3-hmh/debian/compat Wed Apr 28 05:07:08 2010
@@ -1,1 +1,1 @@
-5
+7

Modified: branches/cyrus23/cyrus-imapd-2.3-hmh/debian/control
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-hmh/debian/control?rev=888&root=cyrus22&r1=887&r2=888&view=diff
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-hmh/debian/control (original)
+++ branches/cyrus23/cyrus-imapd-2.3-hmh/debian/control Wed Apr 28 05:07:08 2010
@@ -1,10 +1,11 @@
 Source: cyrus-imapd-2.3
+Format: 3.0 (quilt)
 Section: mail
 Priority: extra
 Maintainer: Debian Cyrus Team <pkg-cyrus-imapd-debian-devel at lists.alioth.debian.org>
-Uploaders: Henrique de Moraes Holschuh <hmh at debian.org>, Sven Mueller <sven at debian.org>, Benjamin Seidenberg <benjamin at debian.org>, OndÃ…=C2™ej Surý <ondrej at debian.org>
+Uploaders: Henrique de Moraes Holschuh <hmh at debian.org>, Sven Mueller <sven at debian.org>, Benjamin Seidenberg <benjamin at debian.org>, OndÃ…=C2™ej Surý <ondrej at debian.org>, Christoph Berg <myon at debian.org>
 Standards-Version: 3.7.3
-Build-Depends: debhelper (>= 5), libwrap0-dev, libpam0g-dev, libdb4.7-dev, libssl-dev, libzephyr-dev, libsasl2-dev (>= 2.1.9), comerr-dev, libsnmp-dev, perl (>= 5.6.0-16), xutils, flex, bison, automake, autotools-dev, po-debconf, dpatch, transfig, gs, groff, libkvm-dev [kfreebsd-i386], libkvm-dev [kfreebsd-amd64]
+Build-Depends: debhelper (>= 7), libwrap0-dev, libpam0g-dev, libdb4.7-dev, libssl-dev, libzephyr-dev, libsasl2-dev (>= 2.1.9), comerr-dev, libsnmp-dev, perl (>= 5.6.0-16), xutils-dev, flex, bison, automake, autotools-dev, po-debconf, quilt (>> 0.46-7), transfig, ghostscript, groff, libkvm-dev [kfreebsd-i386], libkvm-dev [kfreebsd-amd64]
 Xs-Vcs-Browser: https://mail.incase.de/viewcvs/branches/cyrus23/?root=cyrus22
 Xs-Vcs-Svn: https://mail.incase.de/svn/cyrus22/branches/cyrus23
 Homepage: http://cyrusimap.web.cmu.edu/
@@ -45,6 +46,7 @@
 Package: cyrus-doc-2.3
 Architecture: all
 Section: doc
+Depends: ${misc:Depends}
 Provides: cyrus21-doc, cyrus22-doc, cyrus-doc-2.2
 Replaces: cyrus21-doc, cyrus22-doc (<< 2.3), cyrus-doc-2.2 (<< 2.3)
 Conflicts: cyrus21-doc, cyrus22-doc (<< 2.3), cyrus-doc-2.2 (<< 2.3)
@@ -69,7 +71,7 @@
 Package: cyrus-imapd-2.3
 Architecture: any
 Section: mail
-Depends: cyrus-common-2.3 (= ${Source-Version}), ${shlibs:Depends}, ${misc:Depends}
+Depends: cyrus-common-2.3 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
 Provides: imap-server, cyrus21-imapd, cyrus22-imapd, cyrus-imapd-2.2
 Conflicts: imap-server, cyrus21-imapd, cyrus22-imapd (<< 2.3), cyrus-imapd-2.2 (<< 2.3)
 Replaces: cyrus21-imapd, cyrus22-imapd (<< 2.3), cyrus-imapd-2.2 (<< 2.3)
@@ -95,7 +97,7 @@
 Package: cyrus-pop3d-2.3
 Architecture: any
 Section: mail
-Depends: cyrus-common-2.3 (= ${Source-Version}), ${shlibs:Depends}, ${misc:Depends}
+Depends: cyrus-common-2.3 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
 Provides: cyrus21-pop3d, cyrus22-pop3d, pop3-server, cyrus-pop3d-2.2
 Conflicts: cyrus21-pop3d, cyrus22-pop3d (<< 2.3), pop3-server, cyrus-pop3d-2.2 (<< 2.3)
 Replaces: cyrus21-pop3d, cyrus22-pop3d (<< 2.3), cyrus-pop3d-2.2 (<< 2.3)
@@ -121,7 +123,7 @@
 Package: cyrus-admin-2.3
 Architecture: all
 Section: mail
-Depends: libcyrus-imap-perl23 (>= ${Source-Version}), ${misc:Depends}
+Depends: libcyrus-imap-perl23 (>= ${binary:Version}), ${misc:Depends}
 Suggests: sasl2-bin
 Conflicts: cyrus-admin, cyrus21-admin, cyrus22-admin (<< 2.3), cyrus-admin-2.2 (<< 2.3)
 Replaces: cyrus21-admin, cyrus22-admin (<< 2.3), cyrus-admin-2.2 (<< 2.3)
@@ -151,8 +153,8 @@
 Package: cyrus-murder-2.3
 Section: mail
 Architecture: any
-Depends: cyrus-common-2.3 (= ${Source-Version}), ${shlibs:Depends}, ${misc:Depends}
-Recommends: cyrus-imapd-2.3 (= ${Source-Version}), cyrus-pop3d-2.3 (= ${Source-Version})
+Depends: cyrus-common-2.3 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Recommends: cyrus-imapd-2.3 (= ${binary:Version}), cyrus-pop3d-2.3 (= ${binary:Version})
 Conflicts: cyrus21-murder, cyrus22-murder (<< 2.3), cyrus-murder-2.2 (<< 2.3)
 Replaces: cyrus21-murder, cyrus22-murder (<< 2.3), cyrus-murder-2.2 (<< 2.3)
 Provides: cyrus21-murder, cyrus22-murder, cyrus-murder-2.2
@@ -167,7 +169,7 @@
 Package: cyrus-replication-2.3
 Section: mail
 Architecture: any
-Depends: cyrus-common-2.3 (= ${Source-Version}), cyrus-imapd-2.3 (=3D ${Source-Version}) | cyrus-pop3d-2.3 (= ${Source-Version}), ${shlibs:Depends}, ${misc:Depends}
+Depends: cyrus-common-2.3 (= ${binary:Version}), cyrus-imapd-2.3 (=3D ${binary:Version}) | cyrus-pop3d-2.3 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
 Description: Cyrus mail system (replication)
  This package contains the Cyrus IMAPd suite replication system.
  It allows the replication of the mail spool between two imap or pop servers.
@@ -177,7 +179,7 @@
 Package: cyrus-nntpd-2.3
 Architecture: any
 Section: mail
-Depends: cyrus-common-2.3 (= ${Source-Version}), ${shlibs:Depends}, ${misc:Depends}
+Depends: cyrus-common-2.3 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
 Conflicts: news-transport-system, cyrus-nntpd-2.2
 Replaces: cyrus21-nntpd, cyrus22-nntpd (<< 2.3), cyrus-nntpd-2.2 (<< 2.3)
 Provides: news-transport-system, cyrus21-nntpd, cyrus22-nntpd, cyrus-nntpd-2.2
@@ -206,7 +208,7 @@
 Package: cyrus-dev-2.3
 Architecture: any
 Section: devel
-Depends: libcyrus-imap-perl23 (>= ${Source-Version}), cyrus-common-2.3 (= ${Source-Version}), libsasl2-dev (>= 2.1.9), ${misc:Depends}
+Depends: libcyrus-imap-perl23 (>= ${binary:Version}), cyrus-common-2.3 (= ${binary:Version}), libsasl2-dev (>= 2.1.9), ${misc:Depends}
 Conflicts: cyrus-dev, cyrus21-dev, cyrus22-dev (<< 2.3), cyrus-dev-2.2 (<< 2.3), libdb3-dev (<< 3.2.9-15), libdb2-dev (<< 2.7.7.0-6), libdb4.2-dev (<<4.2.52)
 Replaces: cyrus21-dev, cyrus22-dev (<< 2.3), cyrus-dev-2.2 (<< 2.3)
 Provides: cyrus21-dev, cyrus22-dev, cyrus-dev-2.2

Modified: branches/cyrus23/cyrus-imapd-2.3-hmh/debian/cyrus-common-2.3.cyrus2.3.init
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-hmh/debian/cyrus-common-2.3.cyrus2.3.init?rev=888&root=cyrus22&r1=887&r2=888&view=diff
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-hmh/debian/cyrus-common-2.3.cyrus2.3.init (original)
+++ branches/cyrus23/cyrus-imapd-2.3-hmh/debian/cyrus-common-2.3.cyrus2.3.init Wed Apr 28 05:07:08 2010
@@ -2,10 +2,10 @@
 #
 ### BEGIN INIT INFO
 # Provides: cyrus-common-2.3
-# Required-Start: $syslog $network
-# Required-Stop: $syslog $network
+# Required-Start: $syslog $network $remote_fs
+# Required-Stop: $syslog $network $remote_fs
 # Default-Start: 2 3 4 5
-# Default-Stop: S 0 1 6
+# Default-Stop: 0 1 6
 # Short-Description: common init system for cyrus 2.3 IMAP/POP3 daemons.
 # Description: common init system the for cyrus 2.3 IMAP/POP3 daemons.
 #              starts the central cyrus 2.3 master process, which can 

Modified: branches/cyrus23/cyrus-imapd-2.3-hmh/debian/cyrus-common-2.3.lintian
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-hmh/debian/cyrus-common-2.3.lintian?rev=888&root=cyrus22&r1=887&r2=
3D888&view=diff
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-hmh/debian/cyrus-common-2.3.lintian (original)
+++ branches/cyrus23/cyrus-imapd-2.3-hmh/debian/cyrus-common-2.3.lintian Wed Apr 28 05:07:08 2010
@@ -1,4 +1,4 @@
-cyrus-common-2.2: no-debconf-config
-cyrus-common-2.2: postinst-uses-db-input
-cyrus-common-2.2: dir-or-file-in-var-run var/run/cyrus/
-cyrus-common-2.2: dir-or-file-in-var-run var/run/cyrus/socket/
+cyrus-common-2.3: no-debconf-config
+cyrus-common-2.3: postinst-uses-db-input
+cyrus-common-2.3: dir-or-file-in-var-run var/run/cyrus/
+cyrus-common-2.3: dir-or-file-in-var-run var/run/cyrus/socket/

Added: branches/cyrus23/cyrus-imapd-2.3-hmh/debian/patches/series
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-hmh/debian/patches/series?rev=888&root=cyrus22&view=auto
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-hmh/debian/patches/series (added)
+++ branches/cyrus23/cyrus-imapd-2.3-hmh/debian/patches/series Wed Apr 28 05:07:08 2010
@@ -1,0 +1,31 @@
+#0024-upstream-fix-sieve.dpatch
+#0025a-upstream-cve-2009-3235-partial.dpatch
+#0025b-cve-2009-3235-extras.dpatch
+01-fix_Makefile.in.dpatch
+#02-add_mkinstalldirs.dpatch
+03-fix_docs.dpatch
+#04-add_autogen.sh.dpatch
+05-fix_programnames.dpatch
+06-disable_runpath.dpatch
+07-add-warnings-are-errors-mode.dpatch
+08-clean_socket_closes.dpatch
+09-kerberos-ipv4-ipv6-kludge-removal.dpatch
+10-fix_potential_overflows.dpatch
+11-fix_syslog_prefix.dpatch
+12-fix_timeout_handling.dpatch
+13-master_process_handling.dpatch
+14-xmalloc.dpatch
+16-fix_mib.dpatch
+17-fix_tail_syntax_in_xversion.h.dpatch
+19-fix_tls_ssl.dpatch
+21-fix_config-parsing.dpatch
+#25-update_install-sh.dpatch
+30-update_perlcalling.sh.dpatch
+35-masssievec_remove_unused_variable.dpatch
+40-rehash_fix_pathes.dpatch
+50-fix-imclient-manpage.dpatch
+65-sieveshell-enhancements.dpatch
+70-allow-larger-buffers.dpatch
+75-update-imapd.conf-documentation.dpatch
+80-kbsd-no-psstrings.dpatch
+81-dont-test-for-long-names.dpatch

Modified: branches/cyrus23/cyrus-imapd-2.3-hmh/debian/rules
URL: https://mail.incase.de/viewcvs/branches/cyrus23/cyrus-imapd-2.3-hmh/debian/rules?rev=888&root=cyrus22&r1=887&r2=888&view=diff
==============================================================================
--- branches/cyrus23/cyrus-imapd-2.3-hmh/debian/rules (original)
+++ branches/cyrus23/cyrus-imapd-2.3-hmh/debian/rules Wed Apr 28 05:07:08 2010
@@ -1,14 +1,18 @@
 #!/usr/bin/make -f
 # debian/rules for CMU Cyrus IMAP version 2.3
 # GNU copyright 1997 by Joey Hess.
-# Copyright (c) 2001 by Henrique de Moraes Holschuh
+# Copyright (c) 2001,2010 by Henrique de Moraes Holschuh
 # Published under the GNU GPL license
 # Based on previous work by Michael-John Turner <mj at debian.org>,
 #			    David Parker <david at neongoat.com>
 #
 
+#
+# Please refer to debian/README.source for instructions
+#
+
 # DebHelper control
-export DH_ALWAYS_EXCLUDE=CVS
+export DH_ALWAYS_EXCLUDE=CVS:.svn:.git
 
 export MAINPKG=cyrus-common-2.3
 export DOCPKG=cyrus-doc-2.3
@@ -16,67 +20,20 @@
 export PKGDIR := $(CURDIR)/debian/$(MAINPKG)
 export DOCDIR := $(CURDIR)/debian/$(DOCPKG)/usr/share/doc/$(DOCPKG)
 
-export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-
-export BDB_VERSION ?= $(shell dpkg-query -l 'libdb4.[2-6]-dev' | grep ^ii | sed -e 's|.*\s\libdb\(4\.[0-9]\)-dev\s.*|\1|')
-
-# enable dpatch usage
-#include /usr/share/dpatch/dpatch.make
-# -*- Makefile -*-, you silly Emacs!
-# vim: set ft=make:
-
-DPATCH_PACKAGE	?= ${DEB_SOURCE_PACKAGE}
-DPATCH_PACKAGE	?= ${PACKAGE}
-DPATCH_STAMPDIR	?= debian/patched
-DPATCH_STAMPFN	?= patch-stamp
-
-ifdef PATCHLIST
-UNPATCHLIST	:= ${PATCHLIST}
-DPATCH_ALL	:=
-else
-DPATCH_ALL	:= -all
-endif
-
-ifneq (${DPATCH_STAMPDIR},debian/patched)
-_STAMPDIR	:= --stampdir=${DPATCH_STAMPDIR}
-endif
-
-ifdef DPATCH_WORKDIR
-_WORKDIR	:= --workdir ${DPATCH_WORKDIR}
-endif
-
-patch: ${DPATCH_STAMPFN}
-${DPATCH_STAMPFN}:
-	test -d ${DPATCH_STAMPDIR} || install -d ${DPATCH_STAMPDIR}
-	@echo "Patches applied in the Debian version of ${DPATCH_PACKAGE}:" > $@T
-	@echo >> $@T
-	dpatch ${_WORKDIR} apply${DPATCH_ALL} -v ${_STAMPDIR} ${PATCHLIST}
-	dpatch ${_WORKDIR} cat${DPATCH_ALL} ${PATCHLIST} >>$@T
-	mv -f $@T $@
-
-unpatch:
-	dpatch ${_WORKDIR} deapply${DPATCH_ALL} ${_STAMPDIR} ${UNPATCHLIST}
-	rm -rf ${DPATCH_STAMPFN} ${DPATCH_STAMPFN}T ${DPATCH_STAMPDIR}
-
-# arch-tag: 6bb4c625-9a85-41d9-ab37-23cb0a16fb39
-#END_dpatch.make
+DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+DEB_SOURCE_PACKAGE ?= $(shell LC_ALL=C dpkg-parsechangelog | sed -ne 's/^Source: \(.*-\)/\1/p')
+DEB_SOURCE_FORMAT  := $(shell LC_ALL=C sed -ne 's/^Format: \(.*\)/\1/p' debian/control)
 
 # Extra version information to add to Cyrus IMAPd ID
-DEBVERSION:=$(shell LCALL=C dpkg-parsechangelog | sed -ne 's/^Version: \(.*-\)/\1/p')
-EXTRA_IDENT:="Debian-$(DEBVERSION)"
+DEBVERSION  := $(shell LC_ALL=C dpkg-parsechangelog | sed -ne 's/^Version: \(.*-\)/\1/p')
+EXTRA_IDENT := "Debian-$(DEBVERSION)"
 
 # DB engine version
-DBENGINE=BerkeleyDB$(BDB_VERSION)
-
-DEBUGFLAGS=-g
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-	DEBUGFLAGS += -O0
-else
-	DEBUGFLAGS += -O2
-endif
-
-# FOR AUTOCONF 2.52 AND NEWER ONLY
+export BDB_VERSION ?= $(shell LC_ALL=C dpkg-query -l 'libdb4.[2-7]-dev' | grep ^ii | sed -e 's|.*\s\libdb\(4\.[0-9]\)-dev\s.*|\1|')
+DBENGINE := BerkeleyDB$(BDB_VERSION)
+
 CONFFLAGS =
 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
   CONFFLAGS += --build $(DEB_HOST_GNU_TYPE)
@@ -89,44 +46,53 @@
 	CONFFLAGS += --enable-warnings-are-errors
 endif
 
-# The clean target will remove any and all cruft (as defined by 
-# configure ; make distclean ; cd intl; make distclean ). 
-# This is done to make sure the build daemon's source tree is the 
-# same as the one I am using to produce the i386 debs. 
-clean: clean-patched unpatch
-clean-patched:	configure
-	dh_testdir
-	dh_testroot
-	-xargs -t -r chmod +x < debian/executable.files
-	-rm -f build-indep-stamp build-arch-stamp configure-stamp install-arch-stamp install-indep-stamp build-stamp
-	[ ! -f Makefile ] || $(MAKE) -i distclean
-	-rm -f config.h config.cache config.status config.log stamp-config confdefs.h
-	-rm -f netnews/Makefile perl/imap/Makefile.old perl/sieve/managesieve/Makefile.old snmp/Makefile Makefile et/Makefile
-	-rm -f doc/pod2htm*
-	-rm -f master/makedepend.log 
-	-rm -rf doc/man
-	-rm -f debian/cyrus-db-types.txt debian/cyrus-hardwired-config.txt debian/README.configure-options
-	# -rm -rf et/
-	rm -rf autom4te.cache
-	-xargs -t -r rm -f < debian/deletable.files
-	rm -f mkinstalldirs install-sh config.sub config.guess
-	dh_clean
-
-configure:
-	# ./autogen.sh
-
-build: build-arch build-indep
-
-configure-stamp: patch
-	dh_testdir
+patch:
+	@dh_testdir
+	@echo "Making sure all patches are applied..."
+	@dh_quilt_patch
+
+unpatch:
+	@dh_testdir
+	@echo "Making sure all patches are unapplied..."
+	@dh_quilt_unpatch
+
+build-prepare: patch build-prepare-stamp
+build-prepare-stamp:
+	@dh_testdir
+	# Rebuild the build system
 	aclocal -I cmulocal
 	autoheader
 	autoconf
 	# Run automake to update utilities, not to generate Makefile.in
-	-automake -a -f 2>/dev/null
-	touch configure.in && touch aclocal.m4 && touch configure
-	#
-	./configure CFLAGS="-fno-strict-aliasing -fPIC -Wall -pipe $(DEBUGFLAGS)" $(CONFFLAGS) \
+	automake -a -f 2>/dev/null || true
+	touch build-prepare-stamp
+
+clean:
+	@dh_testdir
+	@dh_testroot
+	[ ! -f Makefile ] || $(MAKE) distclean
+	rm -f build-indep-stamp build-arch-stamp configure-stamp install-arch-stamp install-indep-stamp build-stamp build-prepare-stamp
+	rm -f config.h config.h.in configure config.cache config.status config.log stamp-config confdefs.h
+	rm -rf autom4te.cache
+	rm -f mkinstalldirs install-sh config.sub config.guess
+	rm -f netnews/Makefile perl/imap/Makefile.old perl/sieve/managesieve/Makefile.old snmp/Makefile Makefile et/Makefile
+	rm -f doc/pod2htm* doc/murder.png
+	rm -f master/makedepend.log 
+	rm -rf doc/man
+	rm -f sieve/addr.c sieve/addr.h sieve/addr-lex.c sieve/sieve.c sieve/sieve.h sieve/sieve-lex.c
+	rm -f debian/cyrus-db-types.txt debian/cyrus-hardwired-config.txt debian/README.configure-options
+ifeq ("$(DEB_SOURCE_FORMAT)", "3.0 (quilt)")
+	@echo "debian/control: Format: 3.0 (quilt) is enabled, making sure all patches are applied..."
+	dh_quilt_patch
+else
+	@echo "debian/control: Format: 3.0 (quilt) is NOT enabled, making sure all patches are unapplied..."
+	dh_quilt_unpatch
+endif
+	dh_clean
+
+configure-stamp: | build-prepare
+	dh_testdir
+	./configure CFLAGS="${CFLAGS} -fno-strict-aliasing -Wall -pipe" $(CONFFLAGS) \
 	 --with-extraident=$(EXTRA_IDENT) \
 	 --prefix=/usr/share --exec-prefix=/usr --libexecdir=/usr/sbin \
 	 --bindir=/usr/sbin --sbindir=/usr/sbin \
@@ -136,7 +102,8 @@
 	 --sharedstatedir=/usr/share/cyrus \
 	 --localstatedir=/var/lib/cyrus \
 	 --mandir=/usr/share/man \
-	 --with-cyrus-prefix=/usr/lib/cyrus --with-lock=fcntl \
+	 --with-cyrus-prefix=/usr/lib/cyrus \
+	 --with-lock=fcntl \
 	 --with-perl=/usr/bin/perl \
 	 --with-openssl=/usr --with-auth=unix \
 	 --with-bdb=db-$(BDB_VERSION) \
@@ -145,7 +112,7 @@
 	 --disable-listext --enable-annotatemore --with-sasl=/usr \
 	 --enable-idled --with-drac=/usr \
 	 --with-cyrus-user=cyrus --with-cyrus-group=mail \
-	 --with-tclsh=/usr/bin/tclsh --with-com_err=/usr \
+	 --with-com_err=/usr \
 	 --with-pidfile=/var/run/cyrmaster.pid \
 	 --with-syslogfacility=MAIL \
 	 --with-seen-db=skiplist --with-mboxlist-db=skiplist \
@@ -157,6 +124,8 @@
 		>> debian/README.configure-options
 	sed -i 's/ -lsensors//' master/Makefile
 	touch configure-stamp
+
+build: build-arch build-indep
 
 build-arch: build-arch-stamp
 build-arch-stamp: configure-stamp
@@ -186,6 +155,9 @@
 
 # We aren't actually able to build arch-indep independently from
 # arch-dep, so we guarantee that the arch build has been done first
+# 
+# FIXME: look at doc/Makefile.dist, we miss some stuff and should try to
+# use that makefile
 build-indep: build-indep-stamp
 build-indep-stamp: configure-stamp build-arch-stamp
 	dh_testdir
@@ -203,10 +175,13 @@
 	rm -f pod2htm*
 	touch build-indep-stamp
 
-install-arch: build-arch-stamp
+#FIXME: use dh_lintian
+#FIXME: lots of badly-named utils in sbin!
+install-arch: install-arch-stamp
+install-arch-stamp: build-arch-stamp
 	dh_testdir
 	dh_testroot
-	dh_clean -k
+	dh_prep
 	dh_installdirs -a
 	$(MAKE) install DESTDIR=$(TMPPKG)
 	# fix totaly broken location of the include files;
@@ -296,7 +271,7 @@
 install-indep: build-indep-stamp install-arch
 	dh_testdir
 	dh_testroot
-	#dh_clean -k
+	#dh_prep
 	dh_installdirs -i
 	#
 	# Massage the documentation into place
@@ -317,6 +292,8 @@
 	xargs < debian/cyrus-common-2.3.contrib -rti cp -r '{}' $(DOCDIR)/contrib
 	#
 	dh_install -i --sourcedir=$(TMPPKG)
+
+binary: binary-indep binary-arch
 
 binary-indep: install-indep
 	dh_testdir -i
@@ -373,5 +350,4 @@
 	dh_md5sums -a
 	dh_builddeb -a
 
-binary: binary-indep binary-arch
-.PHONY: build build-indep build-arch clean binary-indep binary-arch binary install-arch install-indep clean-patched
+.PHONY: build build-indep build-arch clean binary-indep binary-arch binary install-arch install-indep clean-patched patch unpatch build-prepare




More information about the Pkg-Cyrus-imapd-Debian-devel mailing list