[mutt] 09/16: Migrate to dh and dh-autoreconf

Faidon Liambotis paravoid at moszumanska.debian.org
Mon Jul 4 15:51:49 UTC 2016


This is an automated email from the git hooks/post-receive script.

paravoid pushed a commit to branch experimental
in repository mutt.

commit a625bb8f1384e90631f6c69e622afe333e4c16c8
Author: Faidon Liambotis <paravoid at debian.org>
Date:   Mon Jul 4 00:39:38 2016 +0300

    Migrate to dh and dh-autoreconf
---
 debian/changelog                                   |   2 +
 debian/clean                                       |   1 -
 debian/control                                     |   2 +-
 debian/mutt.docs                                   |  14 +--
 debian/mutt.examples                               |   2 +-
 debian/mutt.install                                |   4 +-
 .../features/compressed-folders.debian.patch       |  20 ----
 debian/patches/misc/am-maintainer-mode.patch       |  21 ----
 debian/patches/series                              |   2 -
 debian/rules                                       | 123 +++++----------------
 debian/update-autotools.sh                         |  38 -------
 11 files changed, 39 insertions(+), 190 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 5e562cd..141aae7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,8 @@ mutt (1.6.1-2) UNRELEASED; urgency=medium
     (quilt) source package format instead for applying debian/patches.
   * Use dh_bugfiles instead of manual install invocations.
   * Migrate from our own -dbg package to the automatic -dbgsym package.
+  * Migrate to dh, instead of our hand-crafted old-style debhelper d/rules.
+  * Migrate to dh-autoreconf instead of autotools-dev.
 
  -- Faidon Liambotis <paravoid at debian.org>  Sun, 03 Jul 2016 22:32:37 +0200
 
diff --git a/debian/clean b/debian/clean
deleted file mode 100644
index 0354034..0000000
--- a/debian/clean
+++ /dev/null
@@ -1 +0,0 @@
-aclocal.m4
diff --git a/debian/control b/debian/control
index fd19d80..6db9942 100644
--- a/debian/control
+++ b/debian/control
@@ -5,7 +5,7 @@ Maintainer: Antonio Radici <antonio at dyne.org>
 Uploaders: Christoph Berg <myon at debian.org>,
  Matteo F. Vescovi <mfv at debian.org>,
  Faidon Liambotis <paravoid at debian.org>
-Build-Depends: automake, debhelper (>= 9), autotools-dev,
+Build-Depends: automake, debhelper (>= 9), dh-autoreconf,
  docbook-xml, docbook-xsl, w3m, gawk, gettext, libgnutls28-dev,
  libgpgme11-dev, libidn11-dev, libkrb5-dev, libncurses5-dev, libncursesw5-dev,
  libsasl2-dev, libtool, pkg-config, xsltproc, zlib1g-dev,
diff --git a/debian/mutt.docs b/debian/mutt.docs
index f24764f..67c08b9 100644
--- a/debian/mutt.docs
+++ b/debian/mutt.docs
@@ -1,8 +1,8 @@
 debian/extra/README.SMIME
-debian/tmp/usr/share/doc/NEWS
-debian/tmp/usr/share/doc/NEWS.old
-debian/tmp/usr/share/doc/TODO
-debian/tmp/usr/share/doc/README
-debian/tmp/usr/share/doc/README.SSL
-debian/tmp/usr/share/doc/README.SECURITY
-debian/tmp/usr/share/doc/PGP-Notes.txt
+debian/tmp/usr/share/doc/mutt/NEWS
+debian/tmp/usr/share/doc/mutt/NEWS.old
+debian/tmp/usr/share/doc/mutt/TODO
+debian/tmp/usr/share/doc/mutt/README
+debian/tmp/usr/share/doc/mutt/README.SSL
+debian/tmp/usr/share/doc/mutt/README.SECURITY
+debian/tmp/usr/share/doc/mutt/PGP-Notes.txt
diff --git a/debian/mutt.examples b/debian/mutt.examples
index b20617c..b35b174 100644
--- a/debian/mutt.examples
+++ b/debian/mutt.examples
@@ -1,3 +1,3 @@
 debian/extra/samples/*
 debian/tmp/etc/Muttrc
-debian/tmp/usr/share/doc/samples/*
+debian/tmp/usr/share/doc/mutt/samples/*
diff --git a/debian/mutt.install b/debian/mutt.install
index 7a3ac5f..b87e5bc 100644
--- a/debian/mutt.install
+++ b/debian/mutt.install
@@ -15,5 +15,5 @@ debian/tmp/gpg.rc			etc/Muttrc.d
 contrib/smime.rc			etc/Muttrc.d
 debian/extra/rc/*.rc			etc/Muttrc.d
 debian/extra/mutt.xpm			usr/share/pixmaps
-debian/extra/mutt.desktop       usr/share/applications
-debian/tmp/usr/share/doc/*.html		usr/share/doc/mutt/html-org
+debian/extra/mutt.desktop		usr/share/applications
+debian/tmp/usr/share/doc/mutt/*.html		usr/share/doc/mutt/html-org
diff --git a/debian/patches/features/compressed-folders.debian.patch b/debian/patches/features/compressed-folders.debian.patch
deleted file mode 100644
index dc6db08..0000000
--- a/debian/patches/features/compressed-folders.debian.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-From: Antonio Radici <antonio at debian.org>
-Date: Thu, 27 Feb 2014 15:49:18 +0100
-Subject: compressed-folders.debian
-
-To enable the use of compressed folders.
----
- config-debian.h | 4 ++++
- 1 file changed, 4 insertions(+)
- create mode 100644 config-debian.h
-
-diff --git a/config-debian.h b/config-debian.h
-new file mode 100644
-index 0000000..fdf5322
---- /dev/null
-+++ b/config-debian.h
-@@ -0,0 +1,4 @@
-+#ifndef USE_COMPRESSED
-+#error "You forgot to update debian/patches/autotools-update."
-+#error "Run sh debian/update-autotools.sh"
-+#endif
diff --git a/debian/patches/misc/am-maintainer-mode.patch b/debian/patches/misc/am-maintainer-mode.patch
deleted file mode 100644
index 58b5cb2..0000000
--- a/debian/patches/misc/am-maintainer-mode.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-From: Antonio Radici <antonio at debian.org>
-Date: Mon, 10 Feb 2014 18:14:45 +0100
-Subject: am-maintainer-mode
-
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index fe18ecc..18ba5bf 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -7,7 +7,7 @@ AC_INIT([mutt],[m4_esyscmd(tr -d \\n <VERSION)])
- AC_CONFIG_SRCDIR(mutt.h)
- AM_INIT_AUTOMAKE
- AC_CONFIG_HEADERS([config.h])
--
-+AM_MAINTAINER_MODE
- AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/VERSION'])
- 
- MUTT_VERSION=`env sh "$srcdir/version.sh"`
diff --git a/debian/patches/series b/debian/patches/series
index 1a33137..25cf758 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,9 +1,7 @@
-misc/am-maintainer-mode.patch
 neomutt/11-ifdef.patch
 neomutt/14-trash.patch
 neomutt-devel/sensible-browser.patch
 features/compressed-folders.patch
-features/compressed-folders.debian.patch
 debian-specific/Muttrc.patch
 debian-specific/Md.etc_mailname_gethostbyname.patch
 debian-specific/use_usr_bin_editor.patch
diff --git a/debian/rules b/debian/rules
index 64ec03b..4ca4499 100755
--- a/debian/rules
+++ b/debian/rules
@@ -32,14 +32,20 @@ ifeq ($(HCACHE_DB),tokyocabinet)
     endif
 endif
 
-confflags =	--prefix=/usr			\
-		--sysconfdir=/etc		\
-		--mandir=/usr/share/man		\
-		--with-docdir=/usr/share/doc	\
+###################### main ######################
+
+include /usr/share/dpkg/buildflags.mk
+
+CFLAGS += -Wall
+CPPFLAGS += -I/usr/include/qdbm
+
+%:
+	dh $@  --with autoreconf
+
+override_dh_auto_configure:
+	dh_auto_configure -- \
 		--with-mailpath=/var/mail	\
 						\
-		--disable-dependency-tracking	\
-						\
 		--enable-compressed		\
 		--enable-debug			\
 		--enable-fcntl			\
@@ -60,60 +66,18 @@ confflags =	--prefix=/usr			\
 						\
 		$(hcache_db)
 
-DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-confflags += --build $(DEB_BUILD_GNU_TYPE)
-# Only specify --host when cross-compiling
-ifneq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
-    confflags += --host $(DEB_HOST_GNU_TYPE)
-endif
-
-# CFLAGS
-CFLAGS = `dpkg-buildflags --get CFLAGS`
-CFLAGS += -Wall
-LDFLAGS = `dpkg-buildflags --get LDFLAGS`
-CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
-CPPFLAGS += -I/usr/include/qdbm
-
-# Directory to make the build on
-objdir = $(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)
-
-###################### main ######################
-
-build build-arch: $(objdir)/build-stamp
-$(objdir)/build-stamp:
-	dh_testdir
-	dh_clean
-	dh_autotools-dev_updateconfig
+override_dh_auto_install:
+	dh_auto_install --destdir=debian/tmp
 	
-	###################### building mutt ######################
-	autoreconf --install --include=m4
-	-mkdir $(objdir)
-	cd $(objdir) && \
-	env CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"  \
-	../configure $(confflags)
-	
-	echo '#include "config-debian.h"' >>$(objdir)/config.h
-	
-	cd $(objdir) && $(MAKE) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)"
-	
-	touch $@
-
-install: build
-	###################### install ######################
-	dh_testdir
-	dh_testroot
-	dh_prep
-	cd $(objdir) && $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
-	
-	cd debian/tmp/usr/share/doc && \
+override_dh_install:
+	cd debian/tmp/usr/share/doc/mutt && \
 	rm -rf samples/iconv samples/ca-bundle.crt && \
 	mv NEWS NEWS.old && \
 	cp $(CURDIR)/UPDATING NEWS
 	
 	chmod +x debian/extra/lib/*
 	
-	( sed -e '/## More settings/,$$d' $(objdir)/doc/Muttrc || exit 1 ; \
+	( sed -e '/## More settings/,$$d' $(CURDIR)/doc/Muttrc || exit 1 ; \
 	  cat debian/extra/rc/Muttrc.foot ) > debian/tmp/Muttrc
 	
 	( echo "# GnuPG configuration"; \
@@ -126,52 +90,17 @@ install: build
 	mv debian/mutt/usr/bin/mutt debian/mutt/usr/bin/mutt-org
 	install -D debian/tmp/usr/share/man/man1/mutt.1 debian/mutt/usr/share/man/man1/mutt-org.1
 	install -D debian/tmp/usr/share/man/man5/muttrc.5 debian/mutt/usr/share/man/man5/muttrc-org.5
-	install -D debian/tmp/usr/share/doc/manual.txt debian/mutt/usr/share/doc/mutt/manual-org.txt
-	
-	# reportbug driver
-	dh_installdirs
-	dh_bugfiles
-
-binary binary-arch: install
-	###################### binary ######################
-	dh_installman
-	dh_installmenu
-	dh_installmime
-	dh_installdocs
-	dh_installexamples
-	dh_installchangelogs ChangeLog
-	-dh_lintian
+	install -D debian/tmp/usr/share/doc/mutt/manual.txt debian/mutt/usr/share/doc/mutt/manual-org.txt
 	
+override_dh_strip:
 	dh_strip -O--dbgsym-migration='mutt-dbg (<< 1.6.1.2~)'
-	
-	dh_link
-	dh_compress
-	dh_fixperms --exclude usr/bin/mutt_dotlock
-	dh_installdeb
-	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb -- -Zxz
 
-build-indep binary-indep:
-	@echo "Nothing to do."
+override_dh_installchangelogs:
+	dh_installchangelogs ChangeLog
 
-clean:
-	###################### clean ######################
-	dh_testdir
-	dh_testroot
-	
-	# please dpkg-source
-	rm -f po/*.gmo
-	
-	# remove build trees
-	rm -rf $(objdir)
-	
-	# remove autotool-generated files so they don't show up in the diff.gz
-	dh_autotools-dev_restoreconfig
-	rm -f configure config.h.in compile
-	rm -f Makefile.in contrib/Makefile.in imap/Makefile.in doc/Makefile.in m4/Makefile.in
-	
-	dh_clean
+override_dh_fixperms:
+	dh_fixperms --exclude usr/bin/mutt_dotlock
 
-.PHONY: configure build build-arch build-indep clean install binary binary-arch binary-indep
+override_dh_auto_clean:
+	dh_auto_clean
+	-rm -f po/*.gmo
diff --git a/debian/update-autotools.sh b/debian/update-autotools.sh
deleted file mode 100644
index f161b02..0000000
--- a/debian/update-autotools.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /bin/sh
-
-set -e
-
-dh_testdir
-
-D=$(basename "$PWD")
-PATCH_NAME=misc/autotools-update.diff 
-
-debclean
-quilt delete $PATCH_NAME || test $? -eq 1
-quilt push -aq
-ln -sf /usr/share/misc/config.sub .
-ln -sf /usr/share/misc/config.guess .
-
-cd ..
-cp -al $D $D.orig
-
-cd $D 
-aclocal -I m4
-autoheader
-( cd m4 && make -f Makefile.am.in )
-automake
-autoconf
-cd ..
-
-T=`mktemp $D/diff.XXXXXX`
-diff -ru $D.orig $D >$T || test $? -eq 1
-patch -p1 -R -d $D <$T
-
-cd $D
-quilt import -f -P $PATCH_NAME `basename $T`
-quilt push
-quilt refresh -p0
-cd ..
-
-rm -f $T
-rm -rf $D.orig

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mutt/mutt.git



More information about the pkg-mutt-commits mailing list