From: Leandro Lucarella Date: Wed, 4 Jul 2012 18:06:15 +0000 (+0200) Subject: Move Mutt with NNTP support to mutt-nntp package X-Git-Tag: nntp/1.5.21-5nntp2 X-Git-Url: https://git.llucax.com/software/mutt-debian.git/commitdiff_plain/84b9ea1689a8189d41ea4a821a1fd6cc446b9332?ds=sidebyside;hp=20f65ac3b82b354496b5bb469ff184ba8b0bcd96 Move Mutt with NNTP support to mutt-nntp package --- diff --git a/.gitignore b/.gitignore index 208d7c2..347efa9 100644 --- a/.gitignore +++ b/.gitignore @@ -29,11 +29,13 @@ po/Makefile po/Makefile.in po/POTFILES stamp-h1 +PATCHES debian/files debian/mutt debian/mutt-dbg debian/mutt-patched +debian/mutt-nntp debian/stamp-patched debian/tmp debian/*.substvars @@ -43,4 +45,5 @@ obj-i486-linux-gnu-patched/ obj-i486-linux-gnu/ obj-x86_64-linux-gnu/ obj-x86_64-linux-gnu-patched/ +obj-x86_64-linux-gnu-nntp/ tags diff --git a/debian/changelog b/debian/changelog index d019ef0..d5e1874 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -mutt (1.5.21-5nntp1) unstable; urgency=low +mutt (1.5.21-5nntp2) unstable; urgency=low - * Add NNTP patch: + * Add new package mutt-nntp with NNTP patch: http://mutt.org.ua/download/mutt-1.5.21/patch-1.5.21.vvv.nntp.gz - -- Leandro Lucarella Tue, 12 Apr 2011 14:00:09 -0300 + -- Leandro Lucarella Tue, 3 Jul 2012 21:00:09 +0200 mutt (1.5.21-5) unstable; urgency=low diff --git a/debian/control b/debian/control index b62d823..25ae88d 100644 --- a/debian/control +++ b/debian/control @@ -48,6 +48,16 @@ Description: Mutt Mail User Agent with extra patches This package adds the "sidebar" patch that lists mailboxes with new mail in a separate column on screen. +Package: mutt-nntp +Architecture: any +Priority: extra +Depends: ${shlibs:Depends}, ${misc:Depends}, mutt (<= ${binary:Version}) +Description: Mutt Mail User Agent with extra patches and NNTP support + Mutt is a sophisticated text-based Mail User Agent. + . + This package adds the "sidebar" patch that lists mailboxes with new mail + in a separate column on screen and support for reading newsgroups via NNTP. + Package: mutt-dbg Architecture: any Section: debug diff --git a/debian/extra/mutt-nntp.rc/nntp.rc b/debian/extra/mutt-nntp.rc/nntp.rc new file mode 100644 index 0000000..8d45726 --- /dev/null +++ b/debian/extra/mutt-nntp.rc/nntp.rc @@ -0,0 +1,6 @@ + +# Example configuration for the NNTP patch +#set news_server = "nntp.example.com" +#set news_cache_dir = "~/.mutt-news-cache" +#set newsrc = "~/.mutt-newsrc" + diff --git a/debian/mutt-nntp.install b/debian/mutt-nntp.install new file mode 100644 index 0000000..479e93e --- /dev/null +++ b/debian/mutt-nntp.install @@ -0,0 +1 @@ +debian/extra/mutt-nntp.rc/*.rc etc/Muttrc.d diff --git a/debian/mutt-nntp.links b/debian/mutt-nntp.links new file mode 100644 index 0000000..cba8aaa --- /dev/null +++ b/debian/mutt-nntp.links @@ -0,0 +1 @@ +usr/share/doc/mutt usr/share/doc/mutt-nntp diff --git a/debian/mutt-nntp.lintian-overrides b/debian/mutt-nntp.lintian-overrides new file mode 100644 index 0000000..0d24947 --- /dev/null +++ b/debian/mutt-nntp.lintian-overrides @@ -0,0 +1 @@ +mutt-nntp: binary-without-manpage usr/bin/mutt-nntp diff --git a/debian/mutt-nntp.postinst b/debian/mutt-nntp.postinst new file mode 100644 index 0000000..53662f2 --- /dev/null +++ b/debian/mutt-nntp.postinst @@ -0,0 +1,17 @@ +#!/bin/sh + +set -e + +if [ "$1" = "configure" ] ; then + # versions prior to 1.5.20-9 used dpkg-divert instead of update-alternatives + if [ "$2" ] && dpkg --compare-versions "$2" lt "1.5.20-9" ; then + dpkg-divert --remove --package mutt-nntp --rename \ + --divert /usr/bin/mutt.org /usr/bin/mutt + fi + + update-alternatives --install /usr/bin/mutt mutt /usr/bin/mutt-nntp 80 +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/mutt-nntp.prerm b/debian/mutt-nntp.prerm new file mode 100644 index 0000000..bf383ba --- /dev/null +++ b/debian/mutt-nntp.prerm @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e + +case "$1" in + remove|deconfigure) + update-alternatives --remove mutt /usr/bin/mutt-nntp + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/patches/mutt.patched b/debian/patches/mutt.patched new file mode 100644 index 0000000..db0f578 --- /dev/null +++ b/debian/patches/mutt.patched @@ -0,0 +1,6 @@ +Dummy patch to serve as marker separating patches for mutt-nntp + +--- /dev/null ++++ b/.mutt.patched +@@ -0,0 +1 @@ ++# dummy patch to serve as marker separating patches for mutt-nntp diff --git a/debian/patches/mutt-patched/nntp b/debian/patches/nntp similarity index 100% rename from debian/patches/mutt-patched/nntp rename to debian/patches/nntp diff --git a/debian/patches/series b/debian/patches/series index e788b34..0a9999f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -62,8 +62,9 @@ mutt-patched/sidebar-sorted mutt-patched/sidebar-utf8 mutt-patched/multiple-fcc +mutt.patched # taken from http://mutt.org.ua/download/mutt-1.5.21/patch-1.5.21.vvv.nntp.gz -mutt-patched/nntp +nntp # unapplied patches for custom packages # not-applied/chdir diff --git a/debian/rules b/debian/rules index be8f16d..227f870 100755 --- a/debian/rules +++ b/debian/rules @@ -6,6 +6,8 @@ QUILT = QUILT_PATCHES=$(QUILT_PATCH_DIR) quilt --quiltrc /dev/null ###################### user serviceable parts ###################### ### +# build a separate mutt-nntp package? +BUILD_NNTP := yes # build a separate mutt-patched package? BUILD_PATCHED := yes ### @@ -21,8 +23,12 @@ GPGME := --enable-gpgme ###################### variables ###################### +ifneq ($(BUILD_NNTP),yes) +export DH_OPTIONS += -Nmutt-nntp +endif + ifneq ($(BUILD_PATCHED),yes) -export DH_OPTIONS := -Nmutt-patched +export DH_OPTIONS += -Nmutt-patched endif # Configure arguments @@ -93,25 +99,47 @@ objdir = $(CURDIR)/obj-$(DEB_HOST_GNU_TYPE) ###################### main ###################### -$(objdir)-patched/build-stamp: $(QUILT_STAMPFN) +$(objdir)-nntp/build-stamp: $(QUILT_STAMPFN) + dh_testdir + dh_clean + -mkdir $(objdir)-nntp + +ifeq ($(BUILD_NNTP),yes) + ###################### building mutt-nntp ###################### + $(QUILT) applied > PATCHES + autoreconf --install --include=m4 + cd $(objdir)-nntp && \ + env CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ + ../configure --enable-nntp $(confflags) + + echo '#include "config-debian.h"' >> $(objdir)-nntp/config.h + + # we should just "make mutt" here, but that doesn't work yet + cd $(objdir)-nntp && $(MAKE) CFLAGS="$(CFLAGS)" +endif + + touch $@ + +$(objdir)-patched/build-stamp: $(objdir)-nntp/build-stamp dh_testdir dh_clean -mkdir $(objdir)-patched - + ifeq ($(BUILD_PATCHED),yes) ###################### building mutt-patched ###################### + $(QUILT) pop mutt.patched $(QUILT) applied > PATCHES autoreconf --install --include=m4 cd $(objdir)-patched && \ env CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ - ../configure --enable-nntp $(confflags) - + ../configure $(confflags) + echo '#include "config-debian.h"' >> $(objdir)-patched/config.h - + # we should just "make mutt" here, but that doesn't work yet cd $(objdir)-patched && $(MAKE) CFLAGS="$(CFLAGS)" endif - + touch $@ build build-arch: $(objdir)/build-stamp @@ -163,6 +191,9 @@ install: build ifeq ($(BUILD_PATCHED),yes) install -D $(objdir)-patched/mutt debian/mutt-patched/usr/bin/mutt-patched endif +ifeq ($(BUILD_NNTP),yes) + install -D $(objdir)-nntp/mutt debian/mutt-nntp/usr/bin/mutt-nntp +endif # reportbug driver dh_installdirs @@ -181,7 +212,8 @@ binary binary-arch: install dh_strip --dbg-package=mutt-dbg rm -rf $(CURDIR)/debian/mutt-dbg/usr/share/doc/mutt-dbg \ - $(CURDIR)/debian/mutt-patched/usr/share/doc/mutt-patched + $(CURDIR)/debian/mutt-patched/usr/share/doc/mutt-patched \ + $(CURDIR)/debian/mutt-nntp/usr/share/doc/mutt-nntp dh_link dh_compress --exclude usr/share/doc/mutt/README.Patches @@ -205,7 +237,7 @@ clean: unpatch echo -n > PATCHES # remove build trees - rm -rf $(objdir) $(objdir)-patched + rm -rf $(objdir) $(objdir)-patched $(objdir)-nntp # remove autotool-generated files so they don't show up in the diff.gz rm -f configure config.h.in