--- exfat-utils-0.9.7.orig/debian/watch
+++ exfat-utils-0.9.7/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://code.google.com/p/exfat/downloads/list?can=1 .*/exfat-utils-(\d[\d\.]*)\.tar\.gz
--- exfat-utils-0.9.7.orig/debian/links
+++ exfat-utils-0.9.7/debian/links
@@ -0,0 +1,4 @@
+sbin/exfatfsck sbin/fsck.exfat
+sbin/mkexfatfs sbin/mkfs.exfat
+usr/share/man/man8/exfatfsck.8.gz usr/share/man/man8/fsck.exfat.8.gz
+usr/share/man/man8/mkexfatfs.8.gz usr/share/man/man8/mkfs.exfat.8.gz
--- exfat-utils-0.9.7.orig/debian/compat
+++ exfat-utils-0.9.7/debian/compat
@@ -0,0 +1 @@
+9
--- exfat-utils-0.9.7.orig/debian/gbp.conf
+++ exfat-utils-0.9.7/debian/gbp.conf
@@ -0,0 +1,2 @@
+[DEFAULT]
+pristine-tar = True
--- exfat-utils-0.9.7.orig/debian/README.source
+++ exfat-utils-0.9.7/debian/README.source
@@ -0,0 +1,5 @@
+This package uses quilt to manage the patches in debian/patches.
+For further information please install the quilt package and read
+/usr/share/doc/quilt/README.source.
+
+ -- Sven Hoexter <hoexter@debian.org>, Mon, 21 May 2012 20:54:59 +0200
--- exfat-utils-0.9.7.orig/debian/manpages
+++ exfat-utils-0.9.7/debian/manpages
@@ -0,0 +1,4 @@
+dump/dumpexfat.8
+fsck/exfatfsck.8
+label/exfatlabel.8
+mkfs/mkexfatfs.8
--- exfat-utils-0.9.7.orig/debian/copyright
+++ exfat-utils-0.9.7/debian/copyright
@@ -0,0 +1,33 @@
+This work was packaged for Debian by:
+    Sven Hoexter <sven@timegate.de> on Thu, 29 Dec 2011 10:30:47 +0100
+
+It was downloaded from:
+    http://code.google.com/p/exfat/downloads/list
+
+Upstream Author:
+    Andrew Nayenko resver@gmail.com 
+
+Copyright:
+    Copyright (C) 2009, 2010  Andrew Nayenko
+
+License:
+    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 3 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, see <http://www.gnu.org/licenses/>.
+
+    On any Debian system, you can find the complete text of the GNU GPL
+    (GNU General Public License) in the file "/usr/share/common-licenses/GPL-3".
+
+The Debian packaging is:
+    Copyright (C) 2011-2012 Sven Hoexter <sven@timegate.de>
+
+and is licensed under the GPL version 3, see "/usr/share/common-licenses/GPL-3".
--- exfat-utils-0.9.7.orig/debian/install
+++ exfat-utils-0.9.7/debian/install
@@ -0,0 +1,4 @@
+dump/dumpexfat	/sbin
+fsck/exfatfsck	/sbin
+label/exfatlabel /sbin
+mkfs/mkexfatfs	/sbin
--- exfat-utils-0.9.7.orig/debian/changelog
+++ exfat-utils-0.9.7/debian/changelog
@@ -0,0 +1,43 @@
+exfat-utils (0.9.7-2.2.201403221553) ucs4-0-0-0; urgency=low
+
+  * UCS auto build. No patches were applied to the original source package
+
+ -- Univention builddaemon <buildd@univention.de>  Sat, 22 Mar 2014 15:53:37 +0100
+
+exfat-utils (0.9.7-2) unstable; urgency=low
+
+  * Move manual link creation from debian/rules to debian/links
+    and thus make use of dh_link.
+  * Switch dh compat level from 8 to 9.
+  * Enable all hardening flags via DEB_BUILD_MAINT_OPTIONS.
+  * Export CFLAGS as CCFLAGS which is honored by the current
+    SConstruct file.
+  * Add debian/patches/honor-cppflags - scons should use exported
+    CPPFLAGS.
+  * Add debian/patches/utf16-fix - fix handling of characters beyond BMP.
+    Thanks to Vladimir Serbinenko <phcoder@gmail.com>.
+  * Add build-dep on quilt, use dh quilt addon in debian/rules.
+  * Add README.source to reference quilt.
+
+ -- Sven Hoexter <hoexter@debian.org>  Mon, 21 May 2012 21:19:35 +0200
+
+exfat-utils (0.9.7-1) unstable; urgency=low
+
+  * New upstream release.
+  * Bump Standards-Version to 3.9.3 - no changes required.
+  * Remove config.log, in the clean target (via override dh_auto_clean).
+
+ -- Sven Hoexter <hoexter@debian.org>  Fri, 09 Mar 2012 21:19:25 +0100
+
+exfat-utils (0.9.6-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Sven Hoexter <hoexter@debian.org>  Sat, 14 Jan 2012 18:21:18 +0100
+
+exfat-utils (0.9.5-1) unstable; urgency=low
+
+  * Initial release. (Closes: #625611)
+
+ -- Sven Hoexter <hoexter@debian.org>  Mon, 02 Jan 2012 12:59:11 +0100
+
--- exfat-utils-0.9.7.orig/debian/control
+++ exfat-utils-0.9.7/debian/control
@@ -0,0 +1,22 @@
+Source: exfat-utils
+Section: otherosfs
+Priority: optional
+Maintainer: Sven Hoexter <hoexter@debian.org>
+Build-Depends: debhelper (>= 9), scons, quilt
+Standards-Version: 3.9.3
+Homepage: http://code.google.com/p/exfat/
+Vcs-Git: git://git.sven.stormbind.net/git/sven/exfat-utils.git
+Vcs-Browser: http://git.sven.stormbind.net/?p=sven/exfat-utils.git
+
+Package: exfat-utils
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Recommends: exfat-fuse
+Description: utilities to create, check, label and dump exFAT filesystem
+ Utilities to manage extended file allocation table filesystem.
+ This package provides tools to create, check and label the
+ filesystem. It contains
+  - dumpexfat to dump properties of the filesystem
+  - exfatfsck / fsck.exfat to report errors found on a exFAT filesystem
+  - exfatlabel to label a exFAT filesystem
+  - mkexfatfs / mkfs.exfat to create a exFAT filesystem.
--- exfat-utils-0.9.7.orig/debian/rules
+++ exfat-utils-0.9.7/debian/rules
@@ -0,0 +1,19 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+export CCFLAGS=${CFLAGS}
+
+%:
+	dh $@ --with quilt
+
+override_dh_auto_build:
+	scons
+
+override_dh_auto_clean:
+	scons -c
+	rm -f config.log
--- exfat-utils-0.9.7.orig/debian/patches/honor-cppflags
+++ exfat-utils-0.9.7/debian/patches/honor-cppflags
@@ -0,0 +1,13 @@
+Applied upstream in r284.
+http://code.google.com/p/exfat/source/detail?r=284
+--- a/SConstruct
++++ b/SConstruct
+@@ -41,6 +41,8 @@ if not conf.env['CCFLAGS']:
+ 		conf.env.Replace(CCFLAGS = '-Wall -O2 -ggdb')
+ 	elif conf.env['CC'] == 'clang':
+ 		conf.env.Replace(CCFLAGS = '-Wall -O2 -g')
++if 'CPPFLAGS' in os.environ:
++   conf.env.Replace(CPPFLAGS = os.environ['CPPFLAGS'])
+ conf.env.Append(CPPDEFINES = {'FUSE_USE_VERSION': 26})
+ conf.env.Append(CPPDEFINES = {'_FILE_OFFSET_BITS' : 64})
+ conf.env.Append(CPPPATH = ['libexfat'])
--- exfat-utils-0.9.7.orig/debian/patches/series
+++ exfat-utils-0.9.7/debian/patches/series
@@ -0,0 +1,2 @@
+honor-cppflags
+utf16-fix
--- exfat-utils-0.9.7.orig/debian/patches/utf16-fix
+++ exfat-utils-0.9.7/debian/patches/utf16-fix
@@ -0,0 +1,22 @@
+Applied upstream in r283.
+http://code.google.com/p/exfat/source/detail?r=283
+Closes Debian bug #672898.
+Thanks to Vladimir Serbinenko <phcoder@gmail.com>.
+--- a/libexfat/utf.c
++++ b/libexfat/utf.c
+@@ -89,6 +89,7 @@ static const le16_t* utf16_to_wchar(cons
+ 			return NULL;
+ 		*wc = ((wchar_t) (le16_to_cpu(input[0]) & 0x3ff) << 10);
+ 		*wc |= (le16_to_cpu(input[1]) & 0x3ff);
++		*wc += 0x10000;
+ 		return input + 2;
+ 	}
+ 	else
+@@ -186,6 +187,7 @@ static le16_t* wchar_to_utf16(le16_t* ou
+ 	}
+ 	if (outsize < 2)
+ 		return NULL;
++	wc -= 0x10000;
+ 	output[0] = cpu_to_le16(0xd800 | ((wc >> 10) & 0x3ff));
+ 	output[1] = cpu_to_le16(0xdc00 | (wc & 0x3ff));
+ 	return output + 2;
--- exfat-utils-0.9.7.orig/debian/source/format
+++ exfat-utils-0.9.7/debian/source/format
@@ -0,0 +1 @@
+1.0
