--- btrfs-progs-0.19.orig/debian/compat
+++ btrfs-progs-0.19/debian/compat
@@ -0,0 +1,1 @@
+4
--- btrfs-progs-0.19.orig/debian/control
+++ btrfs-progs-0.19/debian/control
@@ -0,0 +1,13 @@
+Source: btrfs-progs
+Section: devel
+Priority: extra
+Maintainer: Yi Yang <yi.y.yang@intel.com>
+Build-Depends: debhelper (>= 4.0.0), uuid-dev, dpatch
+Standards-Version: 3.7.2
+
+Package: btrfs-tools
+Section: devel
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: The btrfs-progs package provides all the userpsace programs needed to create,
+ check, modify and correct any inconsistencies in the btrfs filesystem.
--- btrfs-progs-0.19.orig/debian/copyright
+++ btrfs-progs-0.19/debian/copyright
@@ -0,0 +1,69 @@
+This package was debianized by Yi Yang <yi.y.yang@intel.com> on
+Mon, 24 May 2010 10:01:08 +0800.
+
+It was downloaded from ftp://alpha.gnu.org/gnu/grub/
+
+Upstream Authors:
+
+   Erich Boleyn originally designed and implemented GRUB.
+
+   VaX#n8 (real name unknown) wrote shared_src/fsys_ext2fs.c.
+
+   Heiko Schroeder rewrote shared_src/stage1.S to be more readable.
+
+   The following authors assigned copyright on their work to the Free
+   Software Foundation:
+
+   Gordon Matzigkeit adopted GRUB into the GNU Project.  He fixed several
+   bugs, added symbolic link support to shared_src/fsys_ext2fs.c, and
+   began the implementation of /sbin/grub.
+
+   OKUJI Yoshinori contributed many bugfixes and new features, such as
+   working LBA support, /sbin/grub support for configuration files, the
+   script /sbin/grub-install, the utility /bin/mbchk, the new engine for
+   builtin commands, disk swapping support, keyboard configuration support,
+   network support, online help support, command-line history support,
+   hidden menu support, the new Linux loader, serial terminal support,
+   single-line editing support, the utility /sbin/grub-md5-crypt, the new
+   GRUB manual, and several new commands.
+
+   Peter Astrand added support for a color menu.
+
+   Pavel Roskin contributed many bugfixes and new features, such as FreeBSD
+   support for the grub shell, and configure process cleanups.
+
+   Klaus Reichl wrote stage2/fsys_minix.c.
+
+   Per Lundberg added graphics support to the Multiboot Specification.
+
+   Jochen Hoenicke rewrote stage2/fsys_fat.c and wrote
+   stage2/fsys_reiserfs.c and stage2/md5.c.
+
+   Christoph Plattner added support for Net Boot Image Proposal.
+
+   Stefan Ondrejicka added the commands "partnew" and "parttype".
+
+   Frank Mehnert added support for hercules console.
+
+
+Copyright:
+
+   Copyright (C) 1996  Erich Boleyn <erich@uruk.org>
+   Copyright (C) 1999-2000  Free Software Foundation, Inc.
+
+   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, version 2.
+
+   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 GNU systems, the complete text of the GNU General Public
+License can be found in `/usr/share/common-licenses/GPL-2'.
--- btrfs-progs-0.19.orig/debian/rules
+++ btrfs-progs-0.19/debian/rules
@@ -0,0 +1,67 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany
+# This file and all modifications and additions to the pristine package
+# are under the same license as the package itself.
+#
+# Please submit bugfixes or commens via http://bugs.opensuse.org
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+include /usr/share/dpatch/dpatch.make
+
+SHELL=/bin/bash
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: patch-stamp configure-stamp 
+	dh_testdir
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+	make clean
+	dh_clean 
+
+install:
+	dh_testdir
+	dh_testroot
+	dh_clean -k 
+	dh_installdirs
+	make version
+	make mandir=/usr/share/man bindir=/sbin DESTDIR=$(CURDIR)/debian/btrfs-progs install
+
+binary-arch: install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+	dh_installexamples
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary-indep: install
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
--- btrfs-progs-0.19.orig/debian/patches/00list
+++ btrfs-progs-0.19/debian/patches/00list
@@ -0,0 +1,1 @@
+Tizen-ignore-warning.patch
--- btrfs-progs-0.19.orig/debian/patches/Tizen-ignore-warning.patch
+++ btrfs-progs-0.19/debian/patches/Tizen-ignore-warning.patch
@@ -0,0 +1,37 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## Tizen-ignore-warning.patch
+##
+##
+
+@DPATCH@
+
+diff -uNr btrfs-progs-0.19/btrfsck.c btrfs-progs-0.19.new/btrfsck.c
+--- btrfs-progs-0.19/btrfsck.c	2009-06-12 00:56:15.000000000 +0800
++++ btrfs-progs-0.19.new/btrfsck.c	2011-11-14 10:37:30.178502789 +0800
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <fcntl.h>
++#include <sys/stat.h>
+ #include "kerncompat.h"
+ #include "ctree.h"
+ #include "disk-io.h"
+@@ -28,7 +29,6 @@
+ #include "transaction.h"
+ #include "list.h"
+ #include "version.h"
+-
+ static u64 bytes_used = 0;
+ static u64 total_csum_bytes = 0;
+ static u64 total_btree_bytes = 0;
+diff -uNr btrfs-progs-0.19/Makefile btrfs-progs-0.19.new/Makefile
+--- btrfs-progs-0.19/Makefile	2009-06-12 00:56:15.000000000 +0800
++++ btrfs-progs-0.19.new/Makefile	2011-11-14 10:27:13.750502695 +0800
+@@ -1,6 +1,6 @@
+ CC=gcc
+ AM_CFLAGS = -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
+-CFLAGS = -g -Werror -Os
++CFLAGS = -g -Os
+ objects = ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o \
+ 	  root-tree.o dir-item.o file-item.o inode-item.o \
+ 	  inode-map.o crc32c.o rbtree.o extent-cache.o extent_io.o \
--- btrfs-progs-0.19.orig/debian/changelog
+++ btrfs-progs-0.19/debian/changelog
@@ -0,0 +1,6 @@
+btrfs-progs (0.19) unstable; urgency=low
+
+  * First cut for debian-based distros
+    - debianied
+
+ -- Yi Yang <yi.y.yang@intel.com>  Mon, 24 May 2010 10:03:54 +0200
