--- mingw32-runtime-3.13.orig/debian/copyright
+++ mingw32-runtime-3.13/debian/copyright
@@ -0,0 +1,35 @@
+This package was debianized by Ron Lee <ron@debian.org>
+
+It's components are available from www.mingw.org.
+
+The mingw32-runtime source is in the public domain,
+the win32api source is licenced as follows:
+
+
+        Written by Anders Norlander <anorland@hem2.passagen.se>
+        URL: http://www.acc.umu.se/~anorland/gnu-win32/
+
+	Maintained by MinGW Developers
+        Send bug reports and questions to MinGW-users@lists.sourceforge.net
+	URL: http://www.mingw.org
+
+* License
+
+  You are free to use, modify and copy this package. No restrictions
+  are imposed on programs or object files compiled with this library.
+  
+  You may not restrict the the usage of this library.
+
+  You may distribute this library as part of another package or as a
+  modified package if and only if you do *not* restrict the usage of
+  the portions consisting of this (optionally modified) library.
+
+  If distributed as part of another package, please notify the author
+  of what you are going to do.  If distributed as a modified package,
+  this file *must* be included.
+
+  This library 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.
+
+
--- mingw32-runtime-3.13.orig/debian/control
+++ mingw32-runtime-3.13/debian/control
@@ -0,0 +1,17 @@
+Source: mingw32-runtime
+Section: devel
+Priority: optional
+Build-Depends: debhelper (>=4.0)
+Build-Depends-Indep: mingw32-binutils, mingw32
+Maintainer: Ron Lee <ron@debian.org>
+Standards-Version: 3.7.2.2
+
+Package: mingw32-runtime
+Architecture: all
+Recommends: mingw32
+Conflicts: mingw32 (<< 3.4.2.20040916.1-2)
+Replaces: mingw32 (<= 2.95.2-7)
+Description: Minimalist GNU win32 (cross) runtime
+ This package contains the target runtime files for a Linux hosted,
+ win32 target, C/C++ cross compiler.
+
--- mingw32-runtime-3.13.orig/debian/rules
+++ mingw32-runtime-3.13/debian/rules
@@ -0,0 +1,177 @@
+#!/usr/bin/make -f
+#
+# debian/rules file to build the Mingw32 runtime package.
+#
+# Created 21 Aug 2001, by Ron Lee <ron@debian.org>
+
+#export DH_VERBOSE=1
+
+package = mingw32-runtime
+target  = i586-mingw32msvc
+
+top_dir      := $(shell pwd)
+upstream_dir := $(top_dir)/upstream
+patch_dir    := $(top_dir)/debian/patches
+build_dir    := $(top_dir)/build_dir
+build_src    := $(build_dir)/src
+build_objs   := $(build_dir)/objs
+
+PACKAGE_BASENAME = $(patsubst %-src.tar,%,$(basename $(notdir $(wildcard $(upstream_dir)/$(1)*))))
+
+mingw_runtime := $(call PACKAGE_BASENAME,mingw-runtime)
+win32api      := $(call PACKAGE_BASENAME,w32api)
+
+ifneq ($(words $(mingw_runtime)),1)
+  $(error mingw_runtime defined as '$(mingw_runtime)')
+endif
+
+ifneq ($(words $(win32api)),1)
+  $(error win32api defined as '$(win32api)')
+endif
+
+
+build : build-win32api-stamp build-mingw-stamp
+
+configure-win32api-stamp : unpack-stamp
+	dh_testdir
+	mkdir -p $(build_objs)/$(win32api)
+
+	cd $(build_objs)/$(win32api) 							\
+		&& $(build_src)/$(win32api)/configure -v				\
+			--prefix=/usr      						\
+			--host=$(target)   						\
+			--target=$(target) 						\
+			--build=`$(build_src)/$(win32api)/config.guess` 		\
+			--includedir=$(top_dir)/debian/$(package)/usr/$(target)/include	\
+			--libdir=$(top_dir)/debian/$(package)/usr/$(target)/lib
+	touch $@
+
+build-win32api-stamp : configure-win32api-stamp
+	dh_testdir
+	cd $(build_objs)/$(win32api) && $(MAKE)
+
+	touch $@
+
+configure-mingw-stamp : unpack-stamp
+	dh_testdir
+	mkdir -p $(build_objs)/$(mingw_runtime)
+
+	cd $(build_objs)/$(mingw_runtime) 						\
+		&& $(build_src)/$(mingw_runtime)/configure -v				\
+			--prefix=/usr     						\
+			--host=$(target)   						\
+			--target=$(target) 						\
+			--build=`$(build_src)/$(win32api)/config.guess` 		\
+			--includedir=$(top_dir)/debian/$(package)/usr/$(target)/include	\
+			--libdir=$(top_dir)/debian/$(package)/usr/$(target)/lib
+	touch $@
+
+build-mingw-stamp : configure-mingw-stamp
+	dh_testdir
+	cd $(build_objs)/$(mingw_runtime) && $(MAKE)
+
+	touch $@
+
+
+install : preinstall-stamp install-win32api-stamp install-mingw-stamp
+	# remove mingwm10.dll from bin, it's billware runtime only
+	# so we install it in DOCDIR instead.
+	$(RM) -r $(top_dir)/debian/$(package)/usr/bin
+
+	# w32api2.5 installs some things in /usr/doc.
+	# Remove that dir for FHS complience, anything valuable should already be
+	# installed in /usr/share/doc by the time we get here.
+	$(RM) -r $(top_dir)/debian/$(package)/usr/doc
+
+	# remove some non-cross stuff that will clash with other packages
+	$(RM) -r debian/$(package)/usr/share/man
+
+
+install-win32api-stamp : build-win32api-stamp preinstall-stamp
+	dh_testdir
+	dh_testroot
+	cd $(build_objs)/$(win32api)							\
+		&& $(MAKE) install prefix=$(top_dir)/debian/$(package)/usr		\
+				   mandir=$(top_dir)/debian/$(package)/usr/share/man
+	touch $@
+
+install-mingw-stamp : build-mingw-stamp preinstall-stamp
+	dh_testdir
+	dh_testroot
+	cd $(build_objs)/$(mingw_runtime) 						\
+		&& $(MAKE) install prefix=$(top_dir)/debian/$(package)/usr 		\
+				   mandir=$(top_dir)/debian/$(package)/usr/share/man
+	touch $@
+
+
+preinstall-stamp: 
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+
+	dh_installdirs usr/share/lintian/overrides
+	# install override for the non fhs target dir gcc wants to use
+	# (until we find a better solution or change policy)
+	cp debian/lintian-overrides debian/$(package)/usr/share/lintian/overrides/$(package)
+
+	touch $@
+
+
+unpack-stamp:
+	dh_testdir
+	mkdir -p $(build_src)
+
+	# unpack upstream tarballs
+	@cd $(build_src) 							\
+		&& for f in $(mingw_runtime) $(win32api); do			\
+			echo "unpacking $$f";					\
+			if [ -r $(upstream_dir)/$$f-src.tar.gz ]; then		\
+				tar zxf $(upstream_dir)/$$f-src.tar.gz;		\
+			elif [ -r $(upstream_dir)/$$f-src.tar.bz2 ]; then	\
+				tar jxf $(upstream_dir)/$$f-src.tar.bz2;	\
+			else							\
+				echo " *** Error: Failed to unpack $$f";	\
+				exit 1;						\
+			fi;							\
+		done;
+
+	# fix bogus mingw package & dir names
+#	mv $(build_src)/mingw-runtime* $(build_src)/$(mingw_runtime)
+#	mv $(build_src)/w32api* $(build_src)/$(win32api)
+	ln -s $(win32api) $(build_src)/w32api
+
+	# apply any patches
+	@cd $(build_src) &&							\
+		for p in $(wildcard $(patch_dir)/*.patch); do			\
+			patch -p0 < $$p;					\
+		done
+
+	touch $@
+
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -rf $(build_dir) *-stamp
+	dh_clean
+
+
+binary-indep:
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installdocs $(build_objs)/$(mingw_runtime)/mingwm10.dll
+	dh_installchangelogs
+	dh_strip -Xusr/$(target)/lib
+	$(target)-strip --strip-debug 	debian/$(package)/usr/$(target)/lib/*.a
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+
+.PHONY: binary-indep binary-arch binary clean build install
+
--- mingw32-runtime-3.13.orig/debian/changelog
+++ mingw32-runtime-3.13/debian/changelog
@@ -0,0 +1,177 @@
+mingw32-runtime (3.13-1) unstable; urgency=low
+
+  * runtime-3.13 / w32api-3.10  Closes: #442793
+
+ -- Ron Lee <ron@debian.org>  Sat, 22 Sep 2007 22:12:42 +0930
+
+mingw32-runtime (3.12-1) unstable; urgency=low
+
+  * runtime-3.12 / w32api-3.9  Closes: #400540
+  * Drop local patches merged upstream.
+
+ -- Ron Lee <ron@debian.org>  Sat, 26 May 2007 15:21:15 +0930
+
+mingw32-runtime (3.9-4) unstable; urgency=low
+
+  * Typo fix for the IN/OUT patch, add backward compatible
+    defines that may be disabled optionally.  Closes: #353093
+
+ -- Ron Lee <ron@debian.org>  Fri, 24 Feb 2006 18:19:11 +1030
+
+mingw32-runtime (3.9-3) unstable; urgency=low
+
+  * Patch IN, OUT and OPTIONAL 'documentation' macros to prefix
+    them with __W32_ and get them out of the global namespace.
+  * The previous patch has been accepted upstream, and this one
+    has preliminary approval -- please report any teething
+    problems to me, at this stage I can find none I've missed,
+    or any I've changed wrongly, but its a big hunt for common
+    symbols, so there could be a few.  Thanks for your patience
+    and testing!
+
+ -- Ron Lee <ron@debian.org>  Mon,  6 Feb 2006 16:30:53 +1030
+
+mingw32-runtime (3.9-2) unstable; urgency=low
+
+  * Patch winnls.h to remove bogus semicolons which break
+    #define'd generic names when WINVER >= 0x0500.
+
+ -- Ron Lee <ron@debian.org>  Sun,  5 Feb 2006 02:22:55 +1030
+
+mingw32-runtime (3.9-1) unstable; urgency=low
+
+  * runtime-3.9 / w32api-3.6
+  * Repacked the pristine runtime tarball without dos line endings.
+
+ -- Ron Lee <ron@debian.org>  Sun, 29 Jan 2006 18:11:04 +1030
+
+mingw32-runtime (3.8-1) unstable; urgency=low
+
+  * runtime-3.8 / w32api-3.3
+  * Fixes location of IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS,
+    Closes: #281049
+  * Fixes stat.h guards, Closes: #281162.
+
+ -- Ron Lee <ron@debian.org>  Fri,  7 Oct 2005 12:03:12 +0930
+
+mingw32-runtime (3.7-1) unstable; urgency=low
+
+  * runtime-3.7 / w32api-3.2
+  * Does not close #281049 or #281162 at this stage, sorry.
+  * Declare a conflict with prior compilers, as the switch
+    to sjlj-exceptions is not binary compatible.
+
+ -- Ron Lee <ron@debian.org>  Mon,  7 Feb 2005 14:49:10 +1030
+
+mingw32-runtime (3.5-1) unstable; urgency=low
+
+  * runtime-3.5 / w32api-3.1
+  * Patch from 3.3-2 now incorporated upstream.
+
+ -- Ron Lee <ron@debian.org>  Wed, 10 Nov 2004 17:03:02 +1030
+
+mingw32-runtime (3.3-2) unstable; urgency=high
+
+  * Added patch for a typo pointed out by Fabian Wenzel which
+    prevents apps that use ocidl.h from compiling.
+    No other changes, this update should progress to testing asap.
+
+ -- Ron Lee <ron@debian.org>  Thu, 19 Aug 2004 04:55:54 +0930
+
+mingw32-runtime (3.3-1) unstable; urgency=low
+
+  * runtime-3.3 / w32api-2.5.
+  * mingw 3.3.3 and 3.4.1 both seem flakey, but the new runtime has many
+    fixes worth incorporating before the freeze, so this is a runtime
+    update for the existing 3.3.1 compiler release.
+
+ -- Ron Lee <ron@debian.org>  Tue,  3 Aug 2004 16:04:31 +0930
+
+mingw32-runtime (3.2-1) unstable; urgency=low
+
+  * runtime-3.2 / w32api-2.4.  Closes: #192179, #187431
+  * includes vfw.h  Closes: #166491
+
+ -- Ron Lee <ron@debian.org>  Sun, 26 Oct 2003 17:38:51 +1030
+
+mingw32-runtime (2.3-1) unstable; urgency=low
+
+  * runtime-2.3 / w32api-2.1.
+  * Includes GL and ddk support.
+  * Includes SHGFI_ATTR_SPECIFIED.  Closes: #140534
+  * Made package arch all to kickstart buildd for the binutils/gcc packages.
+
+ -- Ron Lee <ron@debian.org>  Thu, 23 Jan 2003 21:33:30 -0800
+
+mingw32-runtime (2.2-1) unstable; urgency=low
+
+  * runtime-2.2 / w32api-2.0 release.  Closes: #141485 too.
+  * Built with gcc3.2, expecially since builds of 2.95 appear 
+    to have gone (and remained) down the toilet.  It appears
+    to work fine with 2.95, but none of the recent 2.95
+    releases actually build anymore.
+
+ -- Ron Lee <ron@debian.org>  Wed,  9 Oct 2002 19:41:05 -0700
+
+mingw32-runtime (2.1-2) unstable; urgency=low
+
+  * Rebuilt for gcc3.2
+
+ -- Ron Lee <ron@debian.org>  Sat, 24 Aug 2002 12:23:33 -0700
+
+mingw32-runtime (2.1-1) unstable; urgency=low
+
+  * runtime-2.1 / w32api-1.5 release.
+  * Patch forwarded (and applied) upstream.  Closes: #140534
+  * Patch from #141485 not yet applied upstream, status currently unknown.
+
+ -- Ron Lee <ron@debian.org>  Thu, 22 Aug 2002 13:35:40 -0700
+
+mingw32-runtime (2.0-1) unstable; urgency=low
+
+  * runtime-2.0 / w32api-1.5 release.
+
+ -- Ron Lee <ron@debian.org>  Mon, 15 Jul 2002 19:53:18 -0700
+
+mingw32-runtime (1.2-1) unstable; urgency=medium
+
+  * New upstream runtime and w32api release.
+
+ -- Ron Lee <ron@debian.org>  Fri,  7 Dec 2001 15:09:54 -0800
+
+mingw32-runtime (1.1-2) unstable; urgency=low
+
+  * Rebuilt with gcc-2.95.3-7
+
+ -- Ron Lee <ron@debian.org>  Tue, 13 Nov 2001 18:46:35 -0800
+
+mingw32-runtime (1.1-1) unstable; urgency=low
+
+  * New upstream mingw-runtime.
+
+ -- Ron Lee <ron@debian.org>  Mon, 17 Sep 2001 09:51:44 -0700
+
+mingw32-runtime (1.0.1.20010915-1) unstable; urgency=low
+
+  * New upstream w32api.
+
+ -- Ron Lee <ron@debian.org>  Sun, 16 Sep 2001 23:23:53 -0700
+
+mingw32-runtime (1.0.1-2) unstable; urgency=low
+
+  * rebuild with gcc-2.95.3-6 after a change to the
+    struct offset.
+
+ -- Ron Lee <ron@debian.org>  Tue, 28 Aug 2001 15:43:52 -0700
+
+mingw32-runtime (1.0.1-1) unstable; urgency=low
+
+  * split runtime out from toolchain package to accommodate
+    new upstream packaging and later hopes of merging with
+    'mainstream' gcc/binutils.
+
+ -- Ron Lee <ron@debian.org>  Fri, 10 Aug 2001 11:41:57 -0700
+
+Local variables:
+mode: debian-changelog
+End:
--- mingw32-runtime-3.13.orig/debian/lintian-overrides
+++ mingw32-runtime-3.13/debian/lintian-overrides
@@ -0,0 +1,3 @@
+mingw32-runtime: non-standard-dir-in-usr
+mingw32-runtime: file-in-unusual-dir
+mingw32-runtime: arch-independent-package-contains-binary-or-object
--- mingw32-runtime-3.13.orig/debian/compat
+++ mingw32-runtime-3.13/debian/compat
@@ -0,0 +1 @@
+4
--- mingw32-runtime-3.13.orig/debian/README.Debian
+++ mingw32-runtime-3.13/debian/README.Debian
@@ -0,0 +1,7 @@
+
+The mingwm10.dll file here is required at runtime.  You'll need to
+copy it to wherever your favorite billware runtime dll's are found.
+
+  Ron
+
+
