--- libnetxap-perl-0.02.orig/debian/rules +++ libnetxap-perl-0.02/debian/rules @@ -0,0 +1,74 @@ +#!/usr/bin/make -f +# This debian/rules file is provided as a template for normal perl +# packages. It was created by Marc Brockschmidt for +# the Debian Perl Group (http://pkg-perl.alioth.debian.org/) but may +# be used freely wherever it is useful. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +include /usr/share/quilt/quilt.make + +# If set to a true value then MakeMaker's prompt function will +# always return the default without waiting for user input. +export PERL_MM_USE_DEFAULT=1 + +PACKAGE=$(shell dh_listpackages) + +ifndef PERL +PERL = /usr/bin/perl +endif + +TMP =$(CURDIR)/debian/$(PACKAGE) + +build: build-stamp +build-stamp: $(QUILT_STAMPFN) + dh_testdir + + $(PERL) Makefile.PL INSTALLDIRS=vendor + $(MAKE) + # don't run tests, they need an imapd + # $(MAKE) test + + touch $@ + +clean: unpatch + dh_testdir + dh_testroot + + dh_clean build-stamp install-stamp + [ ! -f Makefile ] || $(MAKE) realclean + +install: install-stamp +install-stamp: build-stamp + dh_testdir + dh_testroot + dh_clean -k + + $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr + [ ! -d $(TMP)/usr/lib/perl5 ] || rmdir --ignore-fail-on-non-empty --parents --verbose $(TMP)/usr/lib/perl5 + + touch $@ + +binary-arch: +# We have nothing to do here for an architecture-independent package + +binary-indep: build install + dh_testdir + dh_testroot + dh_installexamples examples/* + dh_installdocs ANNOUNCE BUGS CREDITS NEWS README TODO + dh_installchangelogs + dh_perl + dh_compress + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- libnetxap-perl-0.02.orig/debian/patches/90quota.patch +++ libnetxap-perl-0.02/debian/patches/90quota.patch @@ -0,0 +1,16 @@ +Author: Niko Tyni +Description: Fix quota support. (#366480) +Original patch by Mike Beattie. +--- libnetxap-perl.orig/Net/IMAP.pm ++++ libnetxap-perl/Net/IMAP.pm +@@ -2621,8 +2621,8 @@ + my @fields = @{Net::xAP->parse_fields($str)}; + $self->{QuotaRoot} = shift(@fields); + while (@fields) { +- my ($resource, $usage, $limit) = splice(@fields, 0, 3); +- $self->{Quota}{lc($resource)} = [$usage, $limit]; ++ my ($resource, $usage, $limit) = splice(@{$fields[0]}, 0, 3); ++ $self->{Quotas}{lc($resource)} = [$usage, $limit]; + } + + return $self; --- libnetxap-perl-0.02.orig/debian/patches/10shebang.patch +++ libnetxap-perl-0.02/debian/patches/10shebang.patch @@ -0,0 +1,16 @@ +Author: Niko Tyni +Description: Remove unneeded shebang lines from the module files. +--- libnetxap-perl.orig/Net/IMAP.pm ++++ libnetxap-perl/Net/IMAP.pm +@@ -1,4 +1,3 @@ +-#!/usr/local/bin/perl + # + # Copyright (c) 1997-1999 Kevin Johnson . + # +--- libnetxap-perl.orig/Net/xAP.pm ++++ libnetxap-perl/Net/xAP.pm +@@ -1,4 +1,3 @@ +-#!/usr/local/bin/perl + # + # Copyright (c) 1997-1999 Kevin Johnson . + # --- libnetxap-perl-0.02.orig/debian/patches/30banner.patch +++ libnetxap-perl-0.02/debian/patches/30banner.patch @@ -0,0 +1,33 @@ +Author: Niko Tyni +Description: Fix mishandling of IMAP banner (#256836) +Originally by Jaldhar H. Vyas +--- libnetxap-perl.orig/Net/IMAP.pm ++++ libnetxap-perl/Net/IMAP.pm +@@ -232,6 +232,12 @@ + return undef; + } + ++ unless ($self->has_capability("IMAP4rev1")){ ++ carp "server does not support IMAP4rev1"; ++ $self->close_connection or carp "error closing connection: $!"; ++ return undef; ++ } ++ + return $self; + } + +@@ -262,14 +268,6 @@ + } elsif (($list->[0] ne '*') || ($list->[1] !~ /^ok$/i)) { + return undef; + } +- my $supports_imap4rev1 = 0; +- for my $item (@{$list}) { +- $supports_imap4rev1++ if ($item =~ /^imap4rev1$/i); +- } +- unless ($supports_imap4rev1) { +- $self->close_connection; +- return undef; +- } + + $self->{Banner} = $list; + --- libnetxap-perl-0.02.orig/debian/patches/40namespace.patch +++ libnetxap-perl-0.02/debian/patches/40namespace.patch @@ -0,0 +1,33 @@ +Author: Niko Tyni +Description: Fix an issue with the namespace function returning NIL. (#256837) +Originally by Jaldhar H. Vyas +--- libnetxap-perl.orig/Net/IMAP.pm ++++ libnetxap-perl/Net/IMAP.pm +@@ -2391,14 +2391,21 @@ + $self->{Parent} = $parent; + + my $fields = Net::xAP->parse_fields($str); +- for my $n (0 .. 2) { +- my $field = $fields->[$n]; +- for my $item (@{$field}) { +- $item->[1] = '' if (lc($item->[1]) eq 'nil'); +- $self->{Namespaces}{$namespace_types[$n]}{$item->[0]} = $item->[1]; ++ if (lc($fields->[1]) eq 'nil') ++ { ++ for my $n (0 .. 2) { ++ $self->{Namespaces}{$namespace_types[$n]}{$fields->[0]} = ''; ++ } ++ } ++ else ++ { ++ for my $n (0 .. 2) { ++ my $field = $fields->[$n]; ++ for my $item (@{$field}) { ++ $self->{Namespaces}{$namespace_types[$n]}{$item->[0]} = $item->[1]; ++ } + } + } +- + return $self; + } + --- libnetxap-perl-0.02.orig/debian/patches/50debug.patch +++ libnetxap-perl-0.02/debian/patches/50debug.patch @@ -0,0 +1,15 @@ +Author: Niko Tyni +Description: Suppress debug output unless we actually asked for it. +Originally from Morten Bgeskov (#319558) +--- libnetxap-perl.orig/Net/IMAP.pm ++++ libnetxap-perl/Net/IMAP.pm +@@ -2088,7 +2088,8 @@ + my %hash = @{Net::xAP->parse_fields($str)->[0]}; + for my $key (keys %hash) { + my $lckey = lc($key); +- print "$lckey $hash{$key}\n"; ++ print "$lckey $hash{$key}\n" ++ if $parent->debug; + if ($lckey eq 'envelope') { + $self->{Items}{$lckey} = Net::IMAP::Envelope->new($hash{$key}); + } elsif (($lckey eq 'bodystructure') || ($lckey eq 'body')) { --- libnetxap-perl-0.02.orig/debian/patches/20pod.patch +++ libnetxap-perl-0.02/debian/patches/20pod.patch @@ -0,0 +1,38 @@ +Author: Niko Tyni +Description: Fix POD markup. +Originally probably from CPAN #346 by Michael Guennewig +--- libnetxap-perl.orig/Net/IMAP.pm ++++ libnetxap-perl/Net/IMAP.pm +@@ -2523,7 +2523,7 @@ + + =head1 Myrights + +-This is a container for C responses> ++This is a container for C responses + + =head2 mailbox + +@@ -2807,7 +2807,7 @@ + + =head1 Multipart + +-This is a container for C objects that are multipart entities. + + =head2 parts + +@@ -2902,12 +2902,12 @@ + + =head2 envelope + +-If the MIME content type is C, returns a + C object, otherwise returns undef. + + =head2 bodystructure + +-If the MIME content type is C, returns a + C object, otherwise returns undef. + + =head2 md5 --- libnetxap-perl-0.02.orig/debian/patches/80expunge.patch +++ libnetxap-perl-0.02/debian/patches/80expunge.patch @@ -0,0 +1,14 @@ +Author: Niko Tyni +Description: Fix handling of expunge responses. (#366209) +Patch by Torsten Hilbrich. +--- libnetxap-perl.orig/Net/IMAP.pm ++++ libnetxap-perl/Net/IMAP.pm +@@ -1850,7 +1850,7 @@ + return $self; + } + +-sub msgnum { $_->{Msgnum} } ++sub msgnum { $_[0]->{Msgnum} } + + ############################################################################### + --- libnetxap-perl-0.02.orig/debian/patches/series +++ libnetxap-perl-0.02/debian/patches/series @@ -0,0 +1,9 @@ +10shebang.patch +20pod.patch +30banner.patch +40namespace.patch +50debug.patch +60lc.patch +70search.patch +80expunge.patch +90quota.patch --- libnetxap-perl-0.02.orig/debian/patches/60lc.patch +++ libnetxap-perl-0.02/debian/patches/60lc.patch @@ -0,0 +1,14 @@ +Author: Niko Tyni +Description: Fix lc() usage. +Originally from CPAN #346 by Michael Guennewig +--- libnetxap-perl.orig/Net/IMAP.pm ++++ libnetxap-perl/Net/IMAP.pm +@@ -2465,7 +2465,7 @@ + $self->{Mailbox} = shift(@fields); + my %hash = @fields; + for my $key (keys %hash) { +- $self->{Identifiers}{lc{$key}} = $hash{$key}; ++ $self->{Identifiers}{lc($key)} = $hash{$key}; + } + + return $self; --- libnetxap-perl-0.02.orig/debian/patches/70search.patch +++ libnetxap-perl-0.02/debian/patches/70search.patch @@ -0,0 +1,18 @@ +Author: Niko Tyni +Description: Fix 'use of uninitialized value' messages when an IMAP search +doesn't match. +Originally from CPAN #346 by Michael Guennewig +--- libnetxap-perl.orig/Net/IMAP.pm ++++ libnetxap-perl/Net/IMAP.pm +@@ -2202,6 +2202,11 @@ + + $self->{Parent} = $parent; + ++ if (!defined $str) { ++ $self->{Msgnums} = {}; ++ return $self; ++ } ++ + for my $item (split(/\s/, $str)) { + $self->{Msgnums}{$item}++; + } --- libnetxap-perl-0.02.orig/debian/watch +++ libnetxap-perl-0.02/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://search.cpan.org/dist/NetxAP/ .*/NetxAP-v?(\d[\d_.]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip) --- libnetxap-perl-0.02.orig/debian/compat +++ libnetxap-perl-0.02/debian/compat @@ -0,0 +1 @@ +5 --- libnetxap-perl-0.02.orig/debian/copyright +++ libnetxap-perl-0.02/debian/copyright @@ -0,0 +1,18 @@ +This is the debian package for the Net::IMAP module. +It was created by Jaldhar H. Vyas using dh-make-perl. + +The upstream author is: +Kevin Johnson . + +Upstream source location: +http://search.cpan.org/dist/NetxAP/ + +Copyright (c) 1997-1999 Kevin Johnson . + +All rights reserved. This program is free software; you can +redistribute it and/or modify it under the same terms as Perl itself. + +Perl is distributed under your choice of the GNU General Public License or +the Artistic License. On Debian GNU/Linux systems, the complete text of the +GNU General Public License can be found in `/usr/share/common-licenses/GPL' +and the Artistic Licence in `/usr/share/common-licenses/Artistic'. --- libnetxap-perl-0.02.orig/debian/changelog +++ libnetxap-perl-0.02/debian/changelog @@ -0,0 +1,73 @@ +libnetxap-perl (0.02-7) unstable; urgency=low + + * debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser + field (source stanza); Homepage field (source stanza). Removed: XS- + Vcs-Svn fields. Added: /me to Uploaders. + * debian/watch: use dist-based URL. + * debian/rules: + - delete /usr/lib/perl5 only if it exists (closes: #467989) + - update based on dh-make-perl's templates + * Delete debian/examples, install sample scripts directly from + debian/rules. + * Set Standards-Version to 3.7.3 (no changes). + * debian/copyright: add download URL. + * Change patch system from dpatch to quilt. + + -- gregor herrmann Sun, 09 Mar 2008 16:00:14 +0100 + +libnetxap-perl (0.02-6) unstable; urgency=low + + * Migrate to dpatch. + * Upgrade to Standards-Version 3.7.2. No changes needed. + * Upgrade to debhelper compatibility level 5. + * Move debhelper from Build-Depends-Indep to Build-Depends, + as it's required by the 'clean' target. + * Don't ignore the return value of 'make realclean'. + * Cleanup of debian/rules. + * debian/patches: + + 20pod.dpatch: One more fix for POD comments. + + 60lc.dpatch: Fix typo in Net::IMAP:Acl::new() + + 70search.dpatch: Fix 'use of uninitialized value' messages + when an IMAP search doesn't match. + + 80expunge.dpatch: Fix handling of expunge responses. + Thanks to Torsten Hilbrich for the patch. (Closes: #366209) + + 90quota.dpatch: Fix quota support. + Thanks to Mike Beattie for the patch. (Closes: #366480) + * Don't install an empty '/usr/lib/perl5' directory. + + -- Niko Tyni Sat, 13 May 2006 22:00:04 +0300 + +libnetxap-perl (0.02-5) unstable; urgency=low + + * Suppress debug output unless we actually asked for it. Thanks to + Morten Bgeskov for the patch. (Closes: #319558) + + -- Jaldhar H. Vyas Wed, 3 Aug 2005 17:44:55 -0400 + +libnetxap-perl (0.02-4) unstable; urgency=low + + * Package now maintained by the Debian Perl group. + + -- Jaldhar H. Vyas Wed, 15 Jun 2005 09:32:11 -0400 + +libnetxap-perl (0.02-3) unstable; urgency=low + + * Fixed mishandling of IMAP banner (Closes: #256836) + * I think I fixed the issue with the namespace function returning NIL. + Further testing would be helpful. (Closes: #256837) + + -- Jaldhar H. Vyas Wed, 7 Jul 2004 22:13:09 -0400 + +libnetxap-perl (0.02-2) unstable; urgency=low + + * Added missing dependency on libdigest-hmac-perl. Removed incorrect + dependency on libmd4-perl (Closes: #221017) + + -- Jaldhar H. Vyas Sun, 16 Nov 2003 08:30:42 -0500 + +libnetxap-perl (0.02-1) unstable; urgency=low + + * Initial Release (Closes #204112.) + + -- Jaldhar H. Vyas Mon, 4 Aug 2003 13:28:16 -0400 + --- libnetxap-perl-0.02.orig/debian/control +++ libnetxap-perl-0.02/debian/control @@ -0,0 +1,19 @@ +Source: libnetxap-perl +Section: perl +Priority: optional +Build-Depends: debhelper (>= 5), quilt +Build-Depends-Indep: perl (>= 5.8.0-7) +Maintainer: Debian Perl Group +Uploaders: Jaldhar H. Vyas , Niko Tyni , + gregor herrmann +Standards-Version: 3.7.3 +Homepage: http://search.cpan.org/dist/NetxAP/ +Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libnetxap-perl/ +Vcs-Browser: http://svn.debian.org/wsvn/pkg-perl/trunk/libnetxap-perl/ + +Package: libnet-imap-perl +Architecture: all +Depends: ${perl:Depends}, ${misc:Depends}, libdigest-hmac-perl, libmime-base64-perl +Description: A client interface to IMAP (Internet Message Access Protocol) + Net::IMAP provides a perl interface to the client portion of IMAP + (Internet Message Access Protocol).