--- nget-0.27.1.orig/debian/control
+++ nget-0.27.1/debian/control
@@ -0,0 +1,16 @@
+Source: nget
+Section: news
+Priority: optional
+Maintainer: Arnaud Cornet <acornet@debian.org>
+Build-Depends: cdbs, debhelper (>= 5), liblockfile-dev, libncurses-dev, libpopt-dev, libuu-dev, zlib1g-dev, quilt
+Standards-Version: 3.7.3
+Homepage: http://nget.sourceforge.net/
+
+Package: nget
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: auto-resuming command line NNTP file grabber
+ nget is a command line NNTP file grabber. It automatically pieces together
+ multipart postings for easy retrieval, even substituting parts from multiple
+ servers. It handles disconnects gracefully, resuming after the last part
+ successfully downloaded. nget also caches header data for quick access.
--- nget-0.27.1.orig/debian/nget.bash_completion
+++ nget-0.27.1/debian/nget.bash_completion
@@ -0,0 +1,92 @@
+# (c) 2007 Yoann Guillot, released under WTFPL
+
+have par2 &&
+_par2()
+{
+	local cur prev tmp i
+
+	COMPREPLY=()
+	cur=${COMP_WORDS[COMP_CWORD]}
+	prev=${COMP_WORDS[COMP_CWORD-1]}
+
+	if [[ "$COMP_CWORD" == '1' ]]
+	then
+		if [[ -z $cur ]]
+		then
+			COMPREPLY=(r)
+		else
+			COMPREPLY=( $( compgen -W "repair verify" -- $cur ) )
+		fi
+		return 0
+	fi
+
+        _expand || return 0
+	[[ "$COMP_CWORD" -gt 2 ]] && return 0
+
+	local IFS=$'\t\n'
+	
+	tmp=( $( compgen -f -X '!*.@(PAR2|par2|par|PAR)' -- $cur ) )
+	COMPREPLY=()
+	for i in ${tmp[@]}
+	do
+		case $i in
+			*.vol*+*) ;;
+			*) COMPREPLY=( ${COMPREPLY[@]} $i ) ;;
+		esac
+	done
+	COMPREPLY=( ${COMPREPLY[@]} $( compgen -d -- $cur ) )
+}
+
+[ -n "${have:-}" ] && complete -F _par2 $filenames par2
+
+have rar &&
+_rar()
+{
+	local cur tmp ori partial i IFS=$'\t\n'
+	
+	COMPREPLY=()
+	cur=${COMP_WORDS[COMP_CWORD]}
+
+	if [[ "$COMP_CWORD" == '1' ]]
+	then
+		COMPREPLY=(x)
+		return 0
+	fi
+
+        _expand || return 0
+	ori=( $( compgen -f -X '!*.@(rar|RAR)' -- "$cur" ) )
+	tmp=()
+	for i in "${ori[@]}"
+	do
+		case "$i" in
+		*.part1.??? | *.part01.??? | *.part001.??? | *.part0001.???)
+			partial='1'
+			tmp=( "${tmp[@]}" "$i" ) ;;
+		*.part*) ;;
+		*) tmp=( "${tmp[@]}" "$i" ) ;;
+		esac
+	done
+	[ -n "$partial" ] || tmp=( "${ori[@]}" )
+        COMPREPLY=( "${tmp[@]}" $( compgen -d -- "$cur" ) )
+}
+[ -n "${have:-}" ] && complete -F _rar $filenames rar
+
+complete -f -X '!*.@(iso|ISO)' extract-xiso
+
+have nget &&
+_nget()
+{
+	local cur tmp
+	cur=${COMP_WORDS[COMP_CWORD]}
+	prev=${COMP_WORDS[COMP_CWORD-1]}
+	
+	[[ "$prev" == '-g' || "$prev" == '-G' ]] || return 0
+	tmp=( $HOME/.nget5/*,cache.gz )
+	tmp=( ${tmp[@]##*/} )
+	tmp=( ${tmp[@]%,cache.gz} )
+	tmp=${tmp[@]} 
+	COMPREPLY=( $( compgen -W "$tmp" -- $cur ) )
+}
+[ -n "${have:-}" ] && complete -F _nget nget
+
+# vim:ft=sh:
--- nget-0.27.1.orig/debian/copyright
+++ nget-0.27.1/debian/copyright
@@ -0,0 +1,53 @@
+This package was first debianized by Matthew Mueller <donut@azstarnet.com>
+Tue,  5 Sep 2000 19:24:28 -0700.
+It has been adopted by Daniel Baumann <daniel@debian.org>
+Sat, 20 Nov 2004 15:38:00 +0100.
+It has been adopted by Arnaud Cornet <arnaud.cornet@gmail.com>
+Sun, 28 Jan 2007 14:28:56 +0100.
+
+It was downloaded from <http://nget.sourceforge.net/>.
+
+Upstream Author: Matthew Mueller <donut@azstarnet.com>
+
+License:
+
+	Copyright (C) 1999-2003 Matthew Mueller <donut@azstarnet.com>
+
+	This program is free software; you can redistribute it and/or modify
+	it under the terms of the GNU General Public License as published by
+	the Free Software Foundation; either version 2 of the License, or
+	(at your option) any later version.
+
+	This program is distributed in the hope that it will be useful,
+	but WITHOUT ANY WARRANTY; without even the implied warranty of
+	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+	GNU General Public License for more details.
+
+	You should have received a copy of the GNU General Public License
+	along with this program; if not, write to the Free Software
+	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+On Debian systems, the complete text of the GNU General Public License
+can be found in /usr/share/common-licenses/GPL file.
+
+debian/nget.bash_completion is copyright (c) 2007 Yoann Guillot, released under
+WTFPL.
+            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+                    Version 2, December 2004
+
+ Copyright (C) 2004 Sam Hocevar
+  14 rue de Plaisance, 75014 Paris, France
+ Everyone is permitted to copy and distribute verbatim or modified
+ copies of this license document, and changing it is allowed as long
+ as the name is changed.
+
+            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. You just DO WHAT THE FUCK YOU WANT TO.
+
+The Debian packaging is (C) 2004-2007, Daniel Baumann <daniel@debian.org> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
+The debian/rules is (C) 2007, Arnaud Cornet <arnaud.cornet@gmail.com> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
+
--- nget-0.27.1.orig/debian/watch
+++ nget-0.27.1/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://sf.net/nget/nget-([0-9\.]*)\.tar\.gz
--- nget-0.27.1.orig/debian/examples
+++ nget-0.27.1/debian/examples
@@ -0,0 +1,2 @@
+dot_ngetrc
+fixnames.sh
--- nget-0.27.1.orig/debian/changelog
+++ nget-0.27.1/debian/changelog
@@ -0,0 +1,254 @@
+nget (0.27.1-11) unstable; urgency=low
+
+  * Add limits.patch for missing include (Closes: #527681).
+
+ -- Arnaud Cornet <acornet@debian.org>  Fri, 08 May 2009 21:11:49 +0200
+
+nget (0.27.1-10) unstable; urgency=low
+
+  * Fix bashism in debian/rules (Closes: #484416).
+
+ -- Arnaud Cornet <acornet@debian.org>  Thu, 05 Jun 2008 00:07:19 +0200
+
+nget (0.27.1-9) unstable; urgency=low
+
+  * Add debian/patches/nget-gcc43.patch to build with gcc 4.3 (Closes:
+    456072).
+  * Use dpkg Homepage tag.
+  * Bump standard version (no change needed).
+
+ -- Arnaud Cornet <acornet@debian.org>  Sat, 02 Feb 2008 23:19:01 +0100
+
+nget (0.27.1-8) unstable; urgency=low
+
+  * Fix install command to support 'nostrip' in DEB_BUILD_OPTIONS
+    (Closes: #437635).
+  * Use my debian mail address in Maintainer field.
+
+ -- Arnaud Cornet <acornet@debian.org>  Thu, 16 Aug 2007 10:43:29 +0200
+
+nget (0.27.1-7) unstable; urgency=low
+
+  * Cleanup config.{guess,sub,status,log}, for clearer diff.
+  * Remove useless square bracket in Homepage statement in debian/control.
+  * Make watchfile stricter.
+  * Add jj's bash completion in doc/.
+  * Use quilt patchsystem.
+  * Add patch nget-gcc42 (Closes: #361818, #388034).
+
+ -- Arnaud Cornet <arnaud.cornet@gmail.com>  Tue, 29 May 2007 20:17:04 +0200
+
+nget (0.27.1-6) experimental; urgency=low
+
+  * New maintainer (Closes: #407631).
+  * CDBSize!
+  * Corrected initial debianizer in copyright. Set myself as debian/rules
+    copyright holder.
+  * Drop useless autotools-dev and autoconf build-deps.
+  * To experimental not to annoy the release team.
+  * Fix watchfile.
+  * Rename the sample rc file and add it to doc/examples, because hidden file
+    is likely to be missed.
+
+ -- Arnaud Cornet <arnaud.cornet@gmail.com>  Sun,  4 Feb 2007 23:36:43 +0100
+
+nget (0.27.1-5) unstable; urgency=low
+
+  * Orphaning package.
+
+ -- Daniel Baumann <daniel@debian.org>  Sun, 10 Sep 2006 11:27:00 +0200
+
+nget (0.27.1-4) unstable; urgency=low
+
+  * New email address.
+  * Bumped policy version.
+  * Simplified build-dependencies.
+
+ -- Daniel Baumann <daniel@debian.org>  Sun, 10 Sep 2006 11:27:00 +0200
+
+nget (0.27.1-3) unstable; urgency=low
+
+  * Bumped policy version.
+  * Minor formal cleanups.
+
+ -- Daniel Baumann <daniel.baumann@panthera-systems.net>  Mon, 24 Oct 2005 15:05:00 +0200
+
+nget (0.27.1-2) unstable; urgency=low
+
+  * Rebuild against new CXX Abi.
+  * Minor formal changes.
+  * Updated config.{guess,sub} via debian/rules.
+
+ -- Daniel Baumann <daniel.baumann@panthera-systems.net>  Mon,  3 Oct 2005 19:45:00 +0200
+
+nget (0.27.1-1) unstable; urgency=low
+
+  * New upstream release:
+    - Fixes ignoring of cachedir (Closes: #271585)
+    - Adds fallback to RFC977 on non-RFC2980-compliant server (Closes: #284122)
+  * debian/* formal cleanup.
+
+ -- Daniel Baumann <daniel.baumann@panthera-systems.net>  Tue, 21 Dec 2004 15:38:00 +0100
+
+nget (0.27-3) unstable; urgency=low
+
+  * New maintainer (Closes: #198490).
+  * debian/rules: fixed policy-incorrectnes.
+  * debian/watch added.
+
+ -- Daniel Baumann <daniel.baumann@panthera-systems.net>  Sat, 20 Nov 2004 15:38:00 +0100
+
+nget (0.27-2) unstable; urgency=low
+
+  * Compile using liblockfile.  (Closes: #271557)
+
+ -- Chris Lawrence <lawrencc@debian.org>  Mon, 13 Sep 2004 19:38:09 -0500
+
+nget (0.27-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Chris Lawrence <lawrencc@debian.org>  Mon,  5 Jul 2004 04:54:41 -0500
+
+nget (0.26-1) unstable; urgency=low
+
+  * New upstream release.  (Closes: #213995)
+  * Since Debian's libuu-dev is out-of-date, this package uses the
+    upstream nget+uulib tarball.
+  * Reminder: this package is still up for adoption... see #198490.
+
+ -- Chris Lawrence <lawrencc@debian.org>  Sat, 21 Feb 2004 02:42:30 -0600
+
+nget (0.23-1) unstable; urgency=low
+
+  * Not-so-new upstream release.  (Closes: #181293)
+
+ -- Chris Lawrence <lawrencc@debian.org>  Mon, 23 Jun 2003 05:41:26 -0500
+
+nget (0.22.1-1) unstable; urgency=medium
+
+  * New upstream release.
+  * Bumped urgency to medium, since .22 was six days old.
+
+ -- Chris Lawrence <lawrencc@debian.org>  Tue, 29 Oct 2002 11:02:24 -0600
+
+nget (0.22-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Chris Lawrence <lawrencc@debian.org>  Fri, 18 Oct 2002 22:54:28 -0500
+
+nget (0.21-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Chris Lawrence <lawrencc@debian.org>  Mon,  5 Aug 2002 14:20:57 -0500
+
+nget (0.20-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Chris Lawrence <lawrencc@debian.org>  Thu, 11 Jul 2002 17:30:53 -0500
+
+nget (0.19.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * Fixes segfault in 'nget -F free'. (Closes: #150288)
+
+ -- Chris Lawrence <lawrencc@debian.org>  Mon, 17 Jun 2002 22:06:38 -0500
+
+nget (0.18.2-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Chris Lawrence <lawrencc@debian.org>  Sat, 18 May 2002 23:49:38 -0500
+
+nget (0.18.1-1) unstable; urgency=low
+
+  * New upstream release.  Includes 64-bit compliation patch from 0.18-2.
+  * Updated to debhelper v3.
+
+ -- Chris Lawrence <lawrencc@debian.org>  Thu,  9 May 2002 02:08:38 -0500
+
+nget (0.18-2) unstable; urgency=low
+
+  * Only instantiate durationstr(int_fast64_t) on 32-bit platforms.
+    This should fix build failures on ia64 and alpha.
+
+ -- Chris Lawrence <lawrencc@debian.org>  Tue,  9 Apr 2002 18:48:29 -0500
+
+nget (0.18-1) unstable; urgency=low
+
+  * New upstream release.
+    + Added yEnc support.  (Closes: #135684)
+    + Other cool new features, of course.  (See upstream changelog.)
+  * Remove period from end of short description, per proposed policy
+    amendment.
+  
+ -- Chris Lawrence <lawrencc@debian.org>  Sat,  6 Apr 2002 22:28:34 -0600
+
+nget (0.17-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Chris Lawrence <lawrencc@debian.org>  Sat,  2 Mar 2002 19:00:52 -0600
+
+nget (0.16-1) unstable; urgency=low
+
+  * First release in Debian, per RFP.  (Closes: #106780)
+    My changes were minimal; mainly moving examples into a proper examples
+    directory.
+  * New version.  (NOTE: the cache file format has changed, see main
+    README and Changelog for more info.)
+
+ -- Chris Lawrence <lawrencc@debian.org>  Wed, 30 Jan 2002 23:19:12 -0600
+
+nget (0.15.2-1) unstable; urgency=low
+
+  * New version.
+
+ -- Matthew Mueller <donut@azstarnet.com>  Sat, 24 Nov 2001 05:24:48 -0700
+
+nget (0.15.1-1) unstable; urgency=low
+
+  * New version.
+  * Include build-deps.
+
+ -- Matthew Mueller <donut@azstarnet.com>  Sat,  7 Nov 2001 21:41:27 -0700
+
+nget (0.15-1) unstable; urgency=low
+
+  * New version.
+
+ -- Matthew Mueller <donut@azstarnet.com>  Thu,  1 Nov 2001 16:44:38 -0700
+
+nget (0.14-2) unstable; urgency=low
+
+  * Fix the problem with apt-get source nget in the last upload.
+
+ -- Matthew Mueller <donut@azstarnet.com>  Thu, 20 Sep 2001 14:25:52 -0700
+
+nget (0.14-1) unstable; urgency=low
+
+  * New version.
+
+ -- Matthew Mueller <donut@azstarnet.com>  Thu,  2 Aug 2001 18:25:38 -0700
+
+nget (0.13.2-1) unstable; urgency=low
+
+  * New version.
+  * removed unused suidregister thingy from rules.
+
+ -- Matthew Mueller <donut@azstarnet.com>  Thu,  8 Feb 2001 04:54:40 -0700
+
+nget (0.13.1-1) unstable; urgency=low
+
+  * New version.
+
+ -- Matthew Mueller <donut@azstarnet.com>  Mon,  8 Jan 2001 16:40:39 -0700
+
+nget (0.13-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Matthew Mueller <donut@azstarnet.com>  Tue,  5 Sep 2000 19:24:28 -0700
--- nget-0.27.1.orig/debian/compat
+++ nget-0.27.1/debian/compat
@@ -0,0 +1 @@
+5
--- nget-0.27.1.orig/debian/docs
+++ nget-0.27.1/debian/docs
@@ -0,0 +1,5 @@
+FAQ
+README
+TODO
+format-TODO
+debian/nget.bash_completion
--- nget-0.27.1.orig/debian/rules
+++ nget-0.27.1/debian/rules
@@ -0,0 +1,16 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/patchsys-quilt.mk
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/autotools.mk
+
+DEB_MAKE_INSTALL_TARGET = install install_bin="/usr/bin/install -m 0755" prefix=$(DEB_DESTDIR)/usr
+
+build/nget::
+	cp .ngetrc dot_ngetrc
+
+clean::
+	for i in sub status guess log ; do \
+		rm -f config.$$i ; \
+	done
+	rm -f dot_ngetrc
--- nget-0.27.1.orig/debian/patches/series
+++ nget-0.27.1/debian/patches/series
@@ -0,0 +1,3 @@
+nget-gcc42.patch
+nget-gcc43.patch
+limits.patch
--- nget-0.27.1.orig/debian/patches/nget-gcc42.patch
+++ nget-0.27.1/debian/patches/nget-gcc42.patch
@@ -0,0 +1,37 @@
+Index: nget/auto_map.h
+===================================================================
+--- nget.orig/auto_map.h	2007-05-29 20:11:08.000000000 +0200
++++ nget/auto_map.h	2007-05-29 20:11:26.000000000 +0200
+@@ -53,11 +53,14 @@
+ 		auto_map_base& operator= (const auto_map_base &m); //private operator= to disallow assignment
+ };
+ 
++template <class K, class T>
++class default_map : public std::map<K, T> {
++};
+ 
+ template <class K, class T>
+-class auto_map : public auto_map_base<K, T, std::map> {
++class auto_map : public auto_map_base<K, T, default_map> {
+ 	public:
+-		typedef typename auto_map_base<K, T, std::map>::super super;
++		typedef typename auto_map_base<K, T, default_map>::super super;
+ 		typedef typename super::iterator iterator;
+ 		typedef typename super::value_type value_type;
+ 		/*super::value_type value_type(const K &k, T*p) {
+@@ -74,9 +77,13 @@
+ };
+ 
+ template <class K, class T>
+-class auto_multimap : public auto_map_base<K, T, std::multimap> {
++class default_multimap : public std::multimap<K, T> {
++};
++
++template <class K, class T>
++class auto_multimap : public auto_map_base<K, T, default_multimap> {
+ 	public:
+-		typedef typename auto_map_base<K, T, std::multimap>::super super;
++		typedef typename auto_map_base<K, T, default_multimap>::super super;
+ 		typedef typename super::iterator iterator;
+ 		typedef typename super::value_type value_type;
+ 		iterator insert_value(const K &k, T* p) { //we can't really use the normal insert funcs, but we don't want to just name it insert since it would be easy to confuse with all the normal map insert funcs
--- nget-0.27.1.orig/debian/patches/nget-gcc43.patch
+++ nget-0.27.1/debian/patches/nget-gcc43.patch
@@ -0,0 +1,86 @@
+Index: nget/status.cc
+===================================================================
+--- nget.orig/status.cc	2008-02-02 23:12:00.000000000 +0100
++++ nget/status.cc	2008-02-02 23:12:02.000000000 +0100
+@@ -20,6 +20,7 @@
+ #include "server.h"
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <string.h>
+ 
+ static int errorflags=0, warnflags=0, okflags=0;
+ 
+Index: nget/stlhelp.h
+===================================================================
+--- nget.orig/stlhelp.h	2008-02-02 23:12:00.000000000 +0100
++++ nget/stlhelp.h	2008-02-02 23:12:02.000000000 +0100
+@@ -19,6 +19,8 @@
+ #ifndef _STLHELP_H_
+ #define _STLHELP_H_
+ 
++#include <string.h>
++
+ struct eqstr
+ {
+ 	bool operator()(const char* s1, const char* s2) const
+Index: nget/dupe_file.cc
+===================================================================
+--- nget.orig/dupe_file.cc	2008-02-02 23:12:00.000000000 +0100
++++ nget/dupe_file.cc	2008-02-02 23:12:02.000000000 +0100
+@@ -25,6 +25,7 @@
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <errno.h>
++#include <string.h>
+ 
+ void dupe_file_checker::add(const char *filename, ulong size){
+ 	file_match *fm;
+Index: nget/path.cc
+===================================================================
+--- nget.orig/path.cc	2008-02-02 23:12:00.000000000 +0100
++++ nget/path.cc	2008-02-02 23:12:02.000000000 +0100
+@@ -21,6 +21,7 @@
+ #include <unistd.h>
+ #include "log.h"
+ #include "_fileconf.h"
++#include <string.h>
+ 
+ #ifdef WIN32
+ #include <ctype.h>
+Index: nget/myregex.cc
+===================================================================
+--- nget.orig/myregex.cc	2008-02-02 23:12:00.000000000 +0100
++++ nget/myregex.cc	2008-02-02 23:12:02.000000000 +0100
+@@ -21,6 +21,7 @@
+ #endif
+ #include <stdlib.h>
+ #include "myregex.h"
++#include <string.h>
+ 
+ 
+ static string regex_match_word_beginning_safe_str;
+Index: nget/nrange.h
+===================================================================
+--- nget.orig/nrange.h	2008-02-02 23:12:00.000000000 +0100
++++ nget/nrange.h	2008-02-02 23:12:02.000000000 +0100
+@@ -25,6 +25,7 @@
+ #include <sys/types.h>
+ #include <map>
+ #include <stdexcept>
++#include <limits.h>
+ 
+ 
+ typedef map<ulong, ulong> t_rlist;//we are going to use high as the key, and low as the value
+Index: nget/lite.h
+===================================================================
+--- nget.orig/lite.h	2008-02-02 23:13:24.000000000 +0100
++++ nget/lite.h	2008-02-02 23:13:34.000000000 +0100
+@@ -24,6 +24,8 @@
+ #endif
+ 
+ #include <stdlib.h>
++#include <string.h>
++
+ char * newstrcpy(char *&dest, const char *src);
+ inline void safefree(char *&p){
+     if (p){free(p);p=NULL;}
--- nget-0.27.1.orig/debian/patches/limits.patch
+++ nget-0.27.1/debian/patches/limits.patch
@@ -0,0 +1,12 @@
+Index: nget/server.cc
+===================================================================
+--- nget.orig/server.cc	2009-05-08 21:02:33.000000000 +0200
++++ nget/server.cc	2009-05-08 21:03:44.000000000 +0200
+@@ -20,6 +20,7 @@
+ #include "strreps.h"
+ #include "nget.h"
+ #include "status.h"
++#include "limits.h"
+ #include <sys/types.h>
+ #include <dirent.h>
+ #include <algorithm>
