]> git.llucax.com Git - software/mutt-debian.git/commitdiff
Move Mutt with NNTP support to mutt-nntp package nntp/1.5.21-5nntp2
authorLeandro Lucarella <luca@nibbler.(none)>
Wed, 4 Jul 2012 18:06:15 +0000 (20:06 +0200)
committerLeandro Lucarella <luca@nibbler.(none)>
Wed, 4 Jul 2012 18:06:57 +0000 (20:06 +0200)
13 files changed:
.gitignore
debian/changelog
debian/control
debian/extra/mutt-nntp.rc/nntp.rc [new file with mode: 0644]
debian/mutt-nntp.install [new file with mode: 0644]
debian/mutt-nntp.links [new file with mode: 0644]
debian/mutt-nntp.lintian-overrides [new file with mode: 0644]
debian/mutt-nntp.postinst [new file with mode: 0644]
debian/mutt-nntp.prerm [new file with mode: 0644]
debian/patches/mutt.patched [new file with mode: 0644]
debian/patches/nntp [moved from debian/patches/mutt-patched/nntp with 100% similarity]
debian/patches/series
debian/rules

index 208d7c2ada8129cd9d7d1a69cdbe61532ca264c8..347efa9b295c5b26391cccea83ab0b09cd2e5678 100644 (file)
@@ -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
index d019ef0f88804cde82f09b7f1c24797b9ace69ec..d5e18741e78b29ddd9c3997e4e6b603d92550929 100644 (file)
@@ -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 <luca@llucax.com.ar>  Tue, 12 Apr 2011 14:00:09 -0300
+ -- Leandro Lucarella <luca@llucax.com.ar>  Tue,  3 Jul 2012 21:00:09 +0200
 
 mutt (1.5.21-5) unstable; urgency=low
 
index b62d82368f3af9294562e0368602be8f47147e2c..25ae88d4018742f537d0ba7aa0d60ec9b9ddb665 100644 (file)
@@ -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 (file)
index 0000000..8d45726
--- /dev/null
@@ -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 (file)
index 0000000..479e93e
--- /dev/null
@@ -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 (file)
index 0000000..cba8aaa
--- /dev/null
@@ -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 (file)
index 0000000..0d24947
--- /dev/null
@@ -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 (file)
index 0000000..53662f2
--- /dev/null
@@ -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 (file)
index 0000000..bf383ba
--- /dev/null
@@ -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 (file)
index 0000000..db0f578
--- /dev/null
@@ -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
index e788b3427e2b972e2f368c8da103509a7d11ca28..0a9999f0538c847df0d74ad29a3b2e00d914d6fb 100644 (file)
@@ -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
index be8f16d562413abf4b592e6adaa13005ee58118d..227f8705cab5778e1c469f6f624b7f547a78f697 100755 (executable)
@@ -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