--- rtmpdump-2.3.orig/debian/rtmpdump.manpages
+++ rtmpdump-2.3/debian/rtmpdump.manpages
@@ -0,0 +1,2 @@
+rtmpdump.1
+rtmpgw.8
--- rtmpdump-2.3.orig/debian/rtmpdump.install
+++ rtmpdump-2.3/debian/rtmpdump.install
@@ -0,0 +1,2 @@
+usr/bin/*
+usr/sbin/*
--- rtmpdump-2.3.orig/debian/clean
+++ rtmpdump-2.3/debian/clean
@@ -0,0 +1 @@
+librtmp/librtmp.pc
--- rtmpdump-2.3.orig/debian/librtmp0.symbols
+++ rtmpdump-2.3/debian/librtmp0.symbols
@@ -0,0 +1,113 @@
+librtmp.so.0 librtmp0 #MINVER#
+* Build-Depends-Package: librtmp-dev
+ AMF3CD_AddProp@Base 2.3
+ AMF3CD_GetProp@Base 2.3
+ AMF3Prop_Decode@Base 2.3
+ AMF3ReadInteger@Base 2.3
+ AMF3ReadString@Base 2.3
+ AMF3_Decode@Base 2.3
+ AMFProp_Decode@Base 2.3
+ AMFProp_Dump@Base 2.3
+ AMFProp_Encode@Base 2.3
+ AMFProp_GetBoolean@Base 2.3
+ AMFProp_GetName@Base 2.3
+ AMFProp_GetNumber@Base 2.3
+ AMFProp_GetObject@Base 2.3
+ AMFProp_GetString@Base 2.3
+ AMFProp_GetType@Base 2.3
+ AMFProp_IsValid@Base 2.3
+ AMFProp_Reset@Base 2.3
+ AMFProp_SetName@Base 2.3
+ AMF_AddProp@Base 2.3
+ AMF_CountProp@Base 2.3
+ AMF_Decode@Base 2.3
+ AMF_DecodeArray@Base 2.3
+ AMF_DecodeBoolean@Base 2.3
+ AMF_DecodeInt16@Base 2.3
+ AMF_DecodeInt24@Base 2.3
+ AMF_DecodeInt32@Base 2.3
+ AMF_DecodeLongString@Base 2.3
+ AMF_DecodeNumber@Base 2.3
+ AMF_DecodeString@Base 2.3
+ AMF_Dump@Base 2.3
+ AMF_Encode@Base 2.3
+ AMF_EncodeBoolean@Base 2.3
+ AMF_EncodeInt16@Base 2.3
+ AMF_EncodeInt24@Base 2.3
+ AMF_EncodeInt32@Base 2.3
+ AMF_EncodeNamedBoolean@Base 2.3
+ AMF_EncodeNamedNumber@Base 2.3
+ AMF_EncodeNamedString@Base 2.3
+ AMF_EncodeNumber@Base 2.3
+ AMF_EncodeString@Base 2.3
+ AMF_GetProp@Base 2.3
+ AMF_Reset@Base 2.3
+ HTTP_get@Base 2.3
+ RTMPPacket_Alloc@Base 2.3
+ RTMPPacket_Dump@Base 2.3
+ RTMPPacket_Free@Base 2.3
+ RTMPPacket_Reset@Base 2.3
+ RTMPProtocolStrings@Base 2.3
+ RTMPProtocolStringsLower@Base 2.3
+ RTMPSockBuf_Close@Base 2.3
+ RTMPSockBuf_Fill@Base 2.3
+ RTMPSockBuf_Send@Base 2.3
+ RTMP_Alloc@Base 2.3
+ RTMP_ClientPacket@Base 2.3
+ RTMP_Close@Base 2.3
+ RTMP_Connect0@Base 2.3
+ RTMP_Connect1@Base 2.3
+ RTMP_Connect@Base 2.3
+ RTMP_ConnectStream@Base 2.3
+ RTMP_DefaultFlashVer@Base 2.3
+ RTMP_DeleteStream@Base 2.3
+ RTMP_DropRequest@Base 2.3
+ RTMP_EnableWrite@Base 2.3
+ RTMP_FindFirstMatchingProperty@Base 2.3
+ RTMP_FindPrefixProperty@Base 2.3
+ RTMP_Free@Base 2.3
+ RTMP_GetDuration@Base 2.3
+ RTMP_GetNextMediaPacket@Base 2.3
+ RTMP_GetTime@Base 2.3
+ RTMP_HashSWF@Base 2.3
+ RTMP_Init@Base 2.3
+ RTMP_IsConnected@Base 2.3
+ RTMP_IsTimedout@Base 2.3
+ RTMP_LibVersion@Base 2.3
+ RTMP_Log@Base 2.3
+ RTMP_LogGetLevel@Base 2.3
+ RTMP_LogHex@Base 2.3
+ RTMP_LogHexString@Base 2.3
+ RTMP_LogPrintf@Base 2.3
+ RTMP_LogSetCallback@Base 2.3
+ RTMP_LogSetLevel@Base 2.3
+ RTMP_LogSetOutput@Base 2.3
+ RTMP_LogStatus@Base 2.3
+ RTMP_ParsePlaypath@Base 2.3
+ RTMP_ParseURL@Base 2.3
+ RTMP_Pause@Base 2.3
+ RTMP_Read@Base 2.3
+ RTMP_ReadPacket@Base 2.3
+ RTMP_ReconnectStream@Base 2.3
+ RTMP_SendChunk@Base 2.3
+ RTMP_SendClientBW@Base 2.3
+ RTMP_SendCreateStream@Base 2.3
+ RTMP_SendCtrl@Base 2.3
+ RTMP_SendPacket@Base 2.3
+ RTMP_SendPause@Base 2.3
+ RTMP_SendSeek@Base 2.3
+ RTMP_SendServerBW@Base 2.3
+ RTMP_Serve@Base 2.3
+ RTMP_SetBufferMS@Base 2.3
+ RTMP_SetOpt@Base 2.3
+ RTMP_SetupStream@Base 2.3
+ RTMP_SetupURL@Base 2.3
+ RTMP_Socket@Base 2.3
+ RTMP_TLS_Init@Base 2.3
+ RTMP_TLS_ctx@Base 2.3
+ RTMP_ToggleStream@Base 2.3
+ RTMP_UpdateBufferMS@Base 2.3
+ RTMP_UserInterrupt@Base 2.3
+ RTMP_Write@Base 2.3
+ RTMP_ctrlC@Base 2.3
+ RTMP_debuglevel@Base 2.3
--- rtmpdump-2.3.orig/debian/README.source
+++ rtmpdump-2.3/debian/README.source
@@ -0,0 +1,13 @@
+rtmpdump for Debian
+-------------------
+
+This package uses quilt to manage all modifications to the upstream
+source.  Changes are stored in the source package as diffs in
+debian/patches and applied during the build.  Please see:
+
+    /usr/share/doc/quilt/README.source
+
+for more information on how to apply the patches, modify patches, or
+remove a patch.
+
+ -- Reinhard Tartler <siretart@tauware.de>, Sun, 30 May 2010 20:47:32 +0200
--- rtmpdump-2.3.orig/debian/rules
+++ rtmpdump-2.3/debian/rules
@@ -0,0 +1,16 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+MAKEVARS=prefix=/usr CRYPTO=GNUTLS
+
+override_dh_auto_build:
+	dh_auto_build -- $(MAKEVARS)
+
+override_dh_auto_install:
+	dh_auto_install -- $(MAKEVARS)
+
+%:
+	dh $@ --with quilt
--- rtmpdump-2.3.orig/debian/compat
+++ rtmpdump-2.3/debian/compat
@@ -0,0 +1 @@
+7
--- rtmpdump-2.3.orig/debian/watch
+++ rtmpdump-2.3/debian/watch
@@ -0,0 +1,3 @@
+# See uscan(1) for format
+version=3
+http://rtmpdump.mplayerhq.hu/download/rtmpdump-(.*)\.tar\.gz
--- rtmpdump-2.3.orig/debian/control
+++ rtmpdump-2.3/debian/control
@@ -0,0 +1,44 @@
+Source: rtmpdump
+Priority: extra
+Maintainer: Debian multimedia packages maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>
+Uploaders: Reinhard Tartler <siretart@tauware.de>, Sebastian Dröge <slomo@debian.org>,
+           Fabian Greffrath <fabian+debian@greffrath.com>
+Build-Depends: quilt (>= 0.46-7~), debhelper (>= 7.0.50~), libgnutls-dev
+Standards-Version: 3.9.0
+Section: web
+Vcs-Git: git://git.debian.org/git/pkg-multimedia/rtmpdump.git
+Vcs-Browser: http://git.debian.org/?p=pkg-multimedia/rtmpdump.git;a=summary
+Homepage: http://rtmpdump.mplayerhq.hu/
+
+Package: rtmpdump
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Suggests: ffmpeg, mplayer
+Description: A small dumper for media content streamed over the RTMP protocol
+ A small dumper for media content streamed over the RTMP protocol (like BBC's
+ iPlayer high quality streams). Supplying an rtmp url will result in a dumped
+ flv file, which can be played/transcoded using ffmpeg/mplayer, etc.
+
+Package: librtmp0
+Section: libs
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Architecture: any
+Description: toolkit for RTMP streams (shared library)
+ A small dumper for media content streamed over the RTMP protocol (like BBC's
+ iPlayer high quality streams). Supplying an rtmp url will result in a dumped
+ flv file, which can be played/transcoded using ffmpeg/mplayer, etc.
+ .
+ This package contains the shared libraries, header files needed by
+ programs that want to use librtmp.
+
+Package: librtmp-dev
+Section: libdevel
+Depends: librtmp0 (= ${binary:Version}), libgnutls-dev, ${misc:Depends}
+Architecture: any
+Description: toolkit for RTMP streams (development files)
+ A small dumper for media content streamed over the RTMP protocol (like BBC's
+ iPlayer high quality streams). Supplying an rtmp url will result in a dumped
+ flv file, which can be played/transcoded using ffmpeg/mplayer, etc.
+ .
+ This package contains the development libraries, header files needed by
+ programs that want to compile with librtmp.
--- rtmpdump-2.3.orig/debian/copyright
+++ rtmpdump-2.3/debian/copyright
@@ -0,0 +1,74 @@
+This work was packaged for Debian by:
+
+    Reinhard Tartler <siretart@tauware.de> on Sun, 30 May 2010 17:07:16 +0200
+
+It was downloaded from http://rtmpdump.mplayerhq.hu/
+
+Upstream Authors and Copyright:
+
+RTMP Dump
+(C) 2009 Andrej Stepanchuk
+(C) 2009-2010 Howard Chu
+(C) 2010 2a665470ced7adb7156fcef47f8199a6371c117b8a79e399a2771e0b36384090
+
+
+License of the programs in the rtmpdump package:
+
+    rtmpdump - small dumper for media content streamed over the RTMP protocol
+    Copyright (C) 2009 Andrej Stepanchuk
+    Copyright (C) 2009-2010 Howard Chu
+
+    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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+
+License of the librtmp library (included in the librtmp-dev package and in the
+librmtp/ subdirectory in the  source tree):
+
+        Copyright (C) 2005-2008 Team XBMC
+        http://www.xbmc.org
+        Copyright (C) 2008-2009 Andrej Stepanchuk
+        Copyright (C) 2009-2010 Howard Chu
+
+
+    librtmp is free software; you can redistribute it and/or modify
+    it under the terms of the GNU Lesser General Public License as
+    published by the Free Software Foundation; either version 2.1,
+    or (at your option) any later version.
+    
+    librtmp 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 Lesser General Public License
+    along with librtmp see the file COPYING.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+    MA 02110-1301, USA.
+    http://www.gnu.org/copyleft/lgpl.html
+
+
+The Debian packaging is:
+
+    Copyright (C) 2010 Reinhard Tartler <siretart@tauware.de>
+
+and is licensed under the GNU Lesser General Public License.
+
+
+On Debian GNU/Linux systems, the complete text of the GNU General Public
+License can be found in `/usr/share/common-licenses/GPL-2' and the text of the
+GNU Lesser General Public License is in `/usr/share/common-licenses/LGPL-2.1'.
+
+
+
--- rtmpdump-2.3.orig/debian/librtmp-dev.install
+++ rtmpdump-2.3/debian/librtmp-dev.install
@@ -0,0 +1,4 @@
+usr/include/*
+usr/lib/lib*.a
+usr/lib/lib*.so
+usr/lib/pkgconfig/*
--- rtmpdump-2.3.orig/debian/docs
+++ rtmpdump-2.3/debian/docs
@@ -0,0 +1 @@
+README
--- rtmpdump-2.3.orig/debian/changelog
+++ rtmpdump-2.3/debian/changelog
@@ -0,0 +1,68 @@
+rtmpdump (2.3-2) unstable; urgency=low
+
+  [ Reinhard Tartler ]
+  * make librtmp-dev depend on librtmp0
+
+  [ Andres Mejia ]
+  * Move ${misc:Depends} as last entry in Depends field of librtmp-dev.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Sun, 01 Aug 2010 08:59:47 -0400
+
+rtmpdump (2.3-1) unstable; urgency=low
+
+  * New upstream release:
+    + debian/patches/02_fix_gnutls_teardown.diff:
+      - Dropped, merged upstream.
+    + debian/librtmp0.install,
+      debian/librtmp0.symbols,
+      debian/control,
+      debian/librtmp-dev.install,
+      debian/rules:
+      - Add shared library package.
+    + debian/patches/01_unbreak_makefile.diff:
+      - Refreshed and fixed the clean rule too.
+    + debian/patches/02_strtime-visibility.patch:
+      - Hide the private strtime symbol by making it static
+        to prevent any symbol conflicts.
+
+ -- Sebastian Dröge <slomo@debian.org>  Mon, 05 Jul 2010 19:57:14 +0200
+
+rtmpdump (2.2e-4) unstable; urgency=low
+
+  [ Fabian Greffrath ]
+  * Add myself to Uploaders.
+  * Add Vcs-* fields to debian/control.
+  * Fix typo in librtmp-dev package description.
+  * Fix debhelper 7 usage as per dh(1) manpage.
+
+  [ Reinhard Tartler ]
+  * librtmp is built against gnutls, so depend on libgnutls headers
+  * Bump standards version, no changes needed
+
+ -- Reinhard Tartler <siretart@tauware.de>  Tue, 29 Jun 2010 13:44:16 +0200
+
+rtmpdump (2.2e-3) unstable; urgency=low
+
+  * Build with -fPIC to allow linking of the library into shared libraries,
+    e.g. ffmpeg (Closes: #585000).
+  * Use new Free Software Foundation address in debian/copyright.
+
+ -- Sebastian Dröge <slomo@debian.org>  Thu, 17 Jun 2010 11:24:05 +0200
+
+rtmpdump (2.2e-2) unstable; urgency=low
+
+  * update debian/copyright after consulting upstream
+
+ -- Reinhard Tartler <siretart@tauware.de>  Thu, 03 Jun 2010 20:53:02 +0200
+
+rtmpdump (2.2e-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Reinhard Tartler <siretart@tauware.de>  Sun, 30 May 2010 21:41:50 +0200
+
+rtmpdump (2.2d-1) unstable; urgency=low
+
+  * Initial release (Closes: #529974) 
+
+ -- Reinhard Tartler <siretart@tauware.de>  Sun, 30 May 2010 17:07:16 +0200
--- rtmpdump-2.3.orig/debian/librtmp0.install
+++ rtmpdump-2.3/debian/librtmp0.install
@@ -0,0 +1 @@
+usr/lib/lib*.so.*
--- rtmpdump-2.3.orig/debian/source/format
+++ rtmpdump-2.3/debian/source/format
@@ -0,0 +1 @@
+1.0
--- rtmpdump-2.3.orig/debian/patches/03-Dont-link-explicitly-against-static-library.patch
+++ rtmpdump-2.3/debian/patches/03-Dont-link-explicitly-against-static-library.patch
@@ -0,0 +1,63 @@
+------------------------------------------------------------------------
+r544 | hyc | 2010-07-08 12:38:33 +0200 (Thu, 08 Jul 2010) | 2 lines
+
+Don't link explicitly against static library
+
+------------------------------------------------------------------------
+--- rtmpdump.orig/Makefile
++++ rtmpdump/Makefile
+@@ -33,7 +33,7 @@ MANDIR=$(DESTDIR)$(mandir)
+ 
+ LIBS_posix=
+ LIBS_mingw=-lws2_32 -lwinmm -lgdi32
+-LIBS=$(CRYPTO_LIB) -lz $(LIBS_$(SYS)) $(XLIBS)
++LIBS=-L librtmp -lrtmp $(CRYPTO_LIB) -lz $(LIBS_$(SYS)) $(XLIBS)
+ 
+ THREADLIB_posix=-lpthread
+ THREADLIB_mingw=
+@@ -47,11 +47,13 @@ EXT_posix=
+ EXT_mingw=.exe
+ EXT=$(EXT_$(SYS))
+ 
+-all:	$(LIBRTMP) progs
++PROGS=rtmpdump rtmpgw rtmpsrv rtmpsuck
+ 
+-progs:	rtmpdump rtmpgw rtmpsrv rtmpsuck
++all:	$(LIBRTMP) $(PROGS)
+ 
+-install:	progs
++$(PROGS): $(LIBRTMP)
++
++install:	$(PROGS)
+ 	-mkdir -p $(BINDIR) $(SBINDIR) $(MANDIR)/man1 $(MANDIR)/man8
+ 	cp rtmpdump$(EXT) $(BINDIR)
+ 	cp rtmpgw$(EXT) rtmpsrv$(EXT) rtmpsuck$(EXT) $(SBINDIR)
+@@ -68,20 +70,17 @@ FORCE:
+ $(LIBRTMP): FORCE
+ 	@cd librtmp; $(MAKE) all
+ 
+-# note: $^ is GNU Make's equivalent to BSD $>
+-# we use both since either make will ignore the one it doesn't recognize
+-
+-rtmpdump: rtmpdump.o $(LIBRTMP)
+-	$(CC) $(LDFLAGS) $^ $> -o $@$(EXT) $(LIBS)
++rtmpdump: rtmpdump.o
++	$(CC) $(LDFLAGS) -o $@$(EXT) $@.o $(LIBS)
+ 
+-rtmpsrv: rtmpsrv.o thread.o $(LIBRTMP)
+-	$(CC) $(LDFLAGS) $^ $> -o $@$(EXT) $(SLIBS)
++rtmpsrv: rtmpsrv.o thread.o
++	$(CC) $(LDFLAGS) -o $@$(EXT) $@.o thread.o $(SLIBS)
+ 
+-rtmpsuck: rtmpsuck.o thread.o $(LIBRTMP)
+-	$(CC) $(LDFLAGS) $^ $> -o $@$(EXT) $(SLIBS)
++rtmpsuck: rtmpsuck.o thread.o
++	$(CC) $(LDFLAGS) -o $@$(EXT) $@.o thread.o $(SLIBS)
+ 
+-rtmpgw: rtmpgw.o thread.o $(LIBRTMP)
+-	$(CC) $(LDFLAGS) $^ $> -o $@$(EXT) $(SLIBS)
++rtmpgw: rtmpgw.o thread.o
++	$(CC) $(LDFLAGS) -o $@$(EXT) $@.o thread.o $(SLIBS)
+ 
+ rtmpgw.o: rtmpgw.c $(INCRTMP) Makefile
+ rtmpdump.o: rtmpdump.c $(INCRTMP) Makefile
--- rtmpdump-2.3.orig/debian/patches/02_strtime-visibility.patch
+++ rtmpdump-2.3/debian/patches/02_strtime-visibility.patch
@@ -0,0 +1,13 @@
+Index: rtmpdump-2.3/librtmp/hashswf.c
+===================================================================
+--- rtmpdump-2.3.orig/librtmp/hashswf.c	2010-07-05 19:54:38.120781678 +0200
++++ rtmpdump-2.3/librtmp/hashswf.c	2010-07-05 19:54:48.908791094 +0200
+@@ -435,7 +435,7 @@
+ /* Convert a Unix time to a network time string
+  * Weekday, DD-MMM-YYYY HH:MM:SS GMT
+  */
+-void
++static void
+ strtime(time_t * t, char *s)
+ {
+   struct tm *tm;
--- rtmpdump-2.3.orig/debian/patches/01_unbreak_makefile.diff
+++ rtmpdump-2.3/debian/patches/01_unbreak_makefile.diff
@@ -0,0 +1,39 @@
+From: siretart@tauware.de
+Subject: allow package to build via debian/rules
+Forwarded: not-needed
+
+Upstream objects to this:
+
+13:57 <siretart> hyc: this allows building rtmpdump when your makefile is executed via
+                 another makefile
+13:57 <hyc> siretart: the BSD guys will object
+13:57 <siretart> hyc: this is the case for debian packages, debian/rules, the main
+                 buildscript, is implementd in make
+13:57 <hyc> make -C only works with gnumake
+13:57 <hyc> look in the svn history, you'll see that it used to use make -C
+13:57 <siretart> hm, then I'll probably need to carry a local distro patch
+13:59 <hyc> and why doesn't $(MAKE) $(MAKEFLAGS) work?
+14:00 <siretart> symptom: 'no rule to make target "w"'
+14:01 <hyc> that's a gmake bug
+14:04 <siretart> hm. probably. the use of MAKEFLAGS is at least described in the gmake manual
+                 5.7.3
+
+
+Index: rtmpdump-2.3/Makefile
+===================================================================
+--- rtmpdump-2.3.orig/Makefile	2010-06-30 21:58:35.000000000 +0200
++++ rtmpdump-2.3/Makefile	2010-07-05 19:52:07.272780868 +0200
+@@ -57,11 +57,11 @@
+ 	cp rtmpgw$(EXT) rtmpsrv$(EXT) rtmpsuck$(EXT) $(SBINDIR)
+ 	cp rtmpdump.1 $(MANDIR)/man1
+ 	cp rtmpgw.8 $(MANDIR)/man8
+-	@cd librtmp; $(MAKE) install
++	$(MAKE) -C librtmp install
+ 
+ clean:
+ 	rm -f *.o rtmpdump$(EXT) rtmpgw$(EXT) rtmpsrv$(EXT) rtmpsuck$(EXT)
+-	@cd librtmp; $(MAKE) clean
++	$(MAKE) -C librtmp clean
+ 
+ FORCE:
+ 
--- rtmpdump-2.3.orig/debian/patches/series
+++ rtmpdump-2.3/debian/patches/series
@@ -0,0 +1,3 @@
+01_unbreak_makefile.diff
+02_strtime-visibility.patch
+03-Dont-link-explicitly-against-static-library.patch
