diff --git a/.gitignore b/.gitignore
index 248c7a7712..89359677d1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -64,3 +64,12 @@ local.properties
# For vim
*.swp
tags
+
+# Other VCS
+.bzr/
+.bzrignore
+
+# Debian build
+debian/files
+debian/ppsspp.substvars
+debian/ppsspp/
diff --git a/assets/unix-icons/convert-to-png.sh b/assets/unix-icons/convert-to-png.sh
new file mode 100755
index 0000000000..4cd715380b
--- /dev/null
+++ b/assets/unix-icons/convert-to-png.sh
@@ -0,0 +1,104 @@
+# Copyright (C) 2014 Sergio Benjamim
+
+# 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, 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.
+
+# Very simple bash script to convert svg to png files, you can choose inkscape or imagemagick ('convert' command) and the path to icons export.
+# Only converts assets/unix-icons/icon-512.svg
+# Needs improvement, yeah, i know, it is not so good... at least it work :)
+
+
+#!/bin/bash
+
+# Parameters:
+# -s, --software inkscape | imagemagick --> "./convert-to-png.sh -s imagemagick" for example
+# -d, --directory directory path --> "./convert-to-png.sh -d /usr/share/icons/hicolor/" or "./convert-to-png.sh -d ../../debian/ppsspp/usr/share/icons/hicolor/" for example
+
+# Default options
+software_option="inkscape" # sometimes imagemagick does not convert very well, so inkscape is default
+path="icons" # i.e. assets/unix-icons/icons/
+
+echo -e
+
+while [ "$1" != "" ]; do
+ case $1 in
+ -s | --software ) shift
+ if [ "$1" == "inkscape" ] || [ "$1" == "imagemagick" ]; then
+ software_option=$1
+ echo -e "Using $1.\n"
+ else
+ software_option="inkscape"
+ echo -e "This parameter does not exist, inkscape or imagemagick are valids parameters. Using Inkscape.\n"
+ fi
+ ;;
+
+ -d | --directory ) shift
+ path=$1
+ path=${path%"/"}
+ ;;
+
+ * ) echo -e "Error with parameters.\n"
+ exit 1
+ ;;
+ esac
+ shift
+done
+
+
+# Creating assets/unix-icons/icons/ if user does not choose any directory
+if [ "$path" == "icons" ] && [ ! -d "$path" ]; then
+ mkdir icons/
+fi
+
+
+# Converting svg icons to png:
+
+# 16 pixel icon use other icon, resize does not fit well for small icons
+if [ "$software_option" == "inkscape" ]; then
+ if [ "$path" == "icons" ]; then
+ inkscape --export-area-page --file=icon-16.svg --export-png=$path/ppsspp_16.png
+ else
+ inkscape --export-area-page --file=icon-16.svg --export-png=$path/16x16/apps/ppsspp.png
+ fi
+elif [ "$software_option" == "imagemagick" ]; then
+ if [ "$path" == "icons" ]; then
+ convert icon-16.svg -transparent white $path/ppsspp_16.png
+ else
+ convert icon-16.svg -transparent white $path/16x16/apps/ppsspp.png
+ fi
+fi
+
+x="x"
+
+for size in 24 32 48 64 96 128 256 512
+do
+ if [ "$software_option" == "inkscape" ]; then
+ if [ "$path" == "icons" ]; then
+ inkscape --export-area-page --export-width=$size --export-height=$size --file=icon-512.svg --export-png=$path/ppsspp_$size.png
+ else
+ inkscape --export-area-page --export-width=$size --export-height=$size --file=icon-512.svg --export-png=$path/$size$x$size/apps/ppsspp.png
+ fi
+ elif [ "$software_option" == "imagemagick" ]; then
+ if [ "$path" == "icons" ]; then
+ convert icon-512.svg -resize $size -transparent white $path/ppsspp_$size.png
+ else
+ convert icon-512.svg -resize $size -transparent white $path/$size$x$size/apps/ppsspp.png
+ fi
+ fi
+done
+
+echo -e "\nIcons was exported to $path/ folder.\n"
+
+
+exit 0
diff --git a/assets/unix-icons/hicolor/128x128/apps/ppsspp.png b/assets/unix-icons/hicolor/128x128/apps/ppsspp.png
new file mode 100644
index 0000000000..a2e0385376
Binary files /dev/null and b/assets/unix-icons/hicolor/128x128/apps/ppsspp.png differ
diff --git a/assets/unix-icons/hicolor/16x16/apps/ppsspp.png b/assets/unix-icons/hicolor/16x16/apps/ppsspp.png
new file mode 100644
index 0000000000..e626f220a2
Binary files /dev/null and b/assets/unix-icons/hicolor/16x16/apps/ppsspp.png differ
diff --git a/assets/unix-icons/hicolor/24x24/apps/ppsspp.png b/assets/unix-icons/hicolor/24x24/apps/ppsspp.png
new file mode 100644
index 0000000000..77ced28ec8
Binary files /dev/null and b/assets/unix-icons/hicolor/24x24/apps/ppsspp.png differ
diff --git a/assets/unix-icons/hicolor/256x256/apps/ppsspp.png b/assets/unix-icons/hicolor/256x256/apps/ppsspp.png
new file mode 100644
index 0000000000..016626cdf5
Binary files /dev/null and b/assets/unix-icons/hicolor/256x256/apps/ppsspp.png differ
diff --git a/assets/unix-icons/hicolor/32x32/apps/ppsspp.png b/assets/unix-icons/hicolor/32x32/apps/ppsspp.png
new file mode 100644
index 0000000000..7160b2bd83
Binary files /dev/null and b/assets/unix-icons/hicolor/32x32/apps/ppsspp.png differ
diff --git a/assets/unix-icons/hicolor/48x48/apps/ppsspp.png b/assets/unix-icons/hicolor/48x48/apps/ppsspp.png
new file mode 100644
index 0000000000..037c440b60
Binary files /dev/null and b/assets/unix-icons/hicolor/48x48/apps/ppsspp.png differ
diff --git a/assets/unix-icons/hicolor/512x512/apps/ppsspp.png b/assets/unix-icons/hicolor/512x512/apps/ppsspp.png
new file mode 100644
index 0000000000..7a8299b073
Binary files /dev/null and b/assets/unix-icons/hicolor/512x512/apps/ppsspp.png differ
diff --git a/assets/unix-icons/hicolor/64x64/apps/ppsspp.png b/assets/unix-icons/hicolor/64x64/apps/ppsspp.png
new file mode 100644
index 0000000000..af835fe9a6
Binary files /dev/null and b/assets/unix-icons/hicolor/64x64/apps/ppsspp.png differ
diff --git a/assets/unix-icons/hicolor/96x96/apps/ppsspp.png b/assets/unix-icons/hicolor/96x96/apps/ppsspp.png
new file mode 100644
index 0000000000..bd595c03ad
Binary files /dev/null and b/assets/unix-icons/hicolor/96x96/apps/ppsspp.png differ
diff --git a/assets/unix-icons/icon-16.svg b/assets/unix-icons/icon-16.svg
new file mode 100644
index 0000000000..67526ab57b
--- /dev/null
+++ b/assets/unix-icons/icon-16.svg
@@ -0,0 +1,306 @@
+
+
+
+
diff --git a/assets/unix-icons/icon-512.svg b/assets/unix-icons/icon-512.svg
new file mode 100644
index 0000000000..97d037a832
--- /dev/null
+++ b/assets/unix-icons/icon-512.svg
@@ -0,0 +1,731 @@
+
+
+
+
diff --git a/assets/unix-icons/notes.txt b/assets/unix-icons/notes.txt
new file mode 100644
index 0000000000..eafa33c22f
--- /dev/null
+++ b/assets/unix-icons/notes.txt
@@ -0,0 +1 @@
+Needs to improve make install of ppsspp, does not delete hicolor folder until it. Debian package use it.
\ No newline at end of file
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000000..1511f786c9
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+ppsspp (0.9.8.git.20140717-0ubuntu4) trusty; urgency=medium
+
+ * Initial release. (Closes: #697821)
+
+ -- Sérgio Benjamim Tue, 15 Jul 2014 20:01:35 -0300
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000000..ec635144f6
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000000..fc6ea23698
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,26 @@
+Source: ppsspp
+Section: games
+Priority: extra
+Maintainer: Sergio Benjamim
+Build-Depends: debhelper (>= 9),
+ libsdl1.2-dev,
+ libglew-dev,
+ qt4-qmake,
+ libqt4-dev,
+ libqt4-opengl-dev
+Standards-Version: 3.9.5
+Homepage: http://www.ppsspp.org/
+Vcs-Git: git://github.com/hrydgard/ppsspp.git
+Vcs-Browser: https://github.com/hrydgard/ppsspp
+
+Package: ppsspp
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Sony PSP emulator
+ PPSSPP can run your PSP games on your PC in full HD resolution. It can even
+ upscale textures that would otherwise be too blurry as they were made for
+ the small screen of the original PSP.
+ .
+ All trademarks are property of their respective owners. The emulator is for
+ educational and development purposes only and it may not be used to play games
+ you do not legally own.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000000..ba3803e1d7
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,68 @@
+This package was debianized by Sergio Benjamim (sergio-br2) on
+Tue, 15 Jul 2014 17:06:00 -0300.
+
+It was downloaded from
+
+
+Upstream Author:
+
+ Henrik Rydgård
+
+
+License: BSD-compatible and GPL-2
+ PSPSDK BSD-compatible copyright notice (Some parts of the PSPSDK were used
+ in this emulator (defines, constants, headers))
+ .
+ Copyright (C) 2005 adresd
+ Copyright (C) 2005 Marcus R. Brown
+ Copyright (C) 2005 James Forshaw
+ Copyright (C) 2005 John Kelley
+ Copyright (C) 2005 Jesper Svennevid
+ All rights reserved.
+ .
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. The names of the authors may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ .
+ Copyright (C) 2014 Henrik Rydgård
+ All rights reserved.
+ .
+ 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 version 2 for more details.
+ .
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, A copy of the GPL 2.0 should have been included
+ with the program. If not, see http://www.gnu.org/licenses/
+
+
+The Debian packaging is:
+
+ Copyright (C) 2014 Sergio Benjamim (sergio-br2)
+
+and is licensed under the GPL version 2,
+see `/usr/share/common-licenses/GPL-2'.
diff --git a/debian/ppsspp.1 b/debian/ppsspp.1
new file mode 100644
index 0000000000..55c11a3868
--- /dev/null
+++ b/debian/ppsspp.1
@@ -0,0 +1,67 @@
+.TH "PPSSPP" "1" "July 2014" "PPSSPP" "User Commands"
+
+.SH "NAME"
+
+PPSSPP \- PSP emulator.
+
+.SH "SYNOPSIS"
+
+\FBppsspp\fR [FILE] [OPTIONS]...
+
+.SH "DESCRIPTION"
+
+\fBPPSSPP\fR is a PSP emulator written in C++. It translates PSP CPU instructions directly into optimized x86, x64 and ARM machine code, using JIT recompilers (dynarecs).
+It can thus run on quite low-spec hardware, including stronger ARM-based phones and tablets, as long as there's OpenGL ES 2.0 support.
+.PP
+It can run your PSP games in full HD resolution and it can even upscale textures that would otherwise be too blurry as they were made for the small screen of the original PSP.
+.PP
+See http://www.ppsspp.org/ for more information.
+
+
+.SH "EXAMPLE COMMANDLINES"
+
+.TP
+\fBLoad a game immediately:\fR
+ppsspp ~/path/to/the/game-legally-own.iso
+
+.TP
+\fBEnable debug logging and write log information into file test.txt:\fR
+ppsspp -d --log=test.txt
+
+.TP
+\fBLoad a game immediately and write log information into file test.txt:\fR
+ppsspp ~/path/to/the/game-legally-own.iso --log=test.txt
+
+.SH "GENERAL OPTIONS"
+
+.TP
+\fB[FILE]\fR
+Load file immediately (runs based on config / -s.)
+
+.TP
+\fB[-d]\fR
+Enable debug logging (non-Windows only, must be compiled in on Android/etc.)
+
+.TP
+\fB[-g]\fR
+Enable graphics logging.
+
+.TP
+\fB[-j]\fR
+Use the jit.
+
+.TP
+\fB[-i]\fR
+Use the interpreter.
+
+.TP
+\fB[--log=FILE]\fR
+Write log info to FILE.
+
+.TP
+\fB[--state=FILE]\fR
+Load savestate from FILE at game start.
+
+.TP
+\fB[--escape-exit]\fR
+Exit PPSSPP with ESC key.
diff --git a/debian/ppsspp.desktop b/debian/ppsspp.desktop
new file mode 100644
index 0000000000..e4627e974d
--- /dev/null
+++ b/debian/ppsspp.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=PPSSPP
+GenericName=PSP Emulator
+Comment=PlayStation Portable Simulator Suitable for Playing Portably (PPSSPP)
+Exec=ppsspp %f
+Icon=ppsspp
+Categories=Game
diff --git a/debian/ppsspp.dirs b/debian/ppsspp.dirs
new file mode 100644
index 0000000000..b555bc1919
--- /dev/null
+++ b/debian/ppsspp.dirs
@@ -0,0 +1,11 @@
+usr/games
+usr/share/applications/
+usr/share/icons/hicolor/16x16/apps/
+usr/share/icons/hicolor/24x24/apps/
+usr/share/icons/hicolor/32x32/apps/
+usr/share/icons/hicolor/48x48/apps/
+usr/share/icons/hicolor/64x64/apps/
+usr/share/icons/hicolor/96x96/apps/
+usr/share/icons/hicolor/128x128/apps/
+usr/share/icons/hicolor/256x256/apps/
+usr/share/icons/hicolor/512x512/apps/
diff --git a/debian/ppsspp.manpages b/debian/ppsspp.manpages
new file mode 100644
index 0000000000..74de29b319
--- /dev/null
+++ b/debian/ppsspp.manpages
@@ -0,0 +1 @@
+debian/ppsspp.1
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000000..33db94e56f
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,97 @@
+#!/usr/bin/make -f
+
+# Copyright (C) 2014 Sergio Benjamim
+
+# 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, 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.
+
+
+configure: configure-stamp
+
+configure-stamp:
+ dh_testdir
+ # Add here commands to configure the package.
+ mkdir -p build-qt/ && \
+ cd build-qt/ && \
+ qmake ../Qt/PPSSPPQt.pro
+
+build: build-arch build-indep
+
+build-arch: build-stamp
+
+build-indep: build-stamp
+
+build-stamp: configure-stamp
+ dh_testdir
+ # Add here commands to compile the package.
+ $(MAKE) -C build-qt/
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ # Add here commands to clean up after the build process.
+ #$(MAKE) -C debian/build-qt clean
+
+ dh_clean
+
+install:
+ dh_testdir
+ dh_testroot
+ dh_prep
+ dh_installdirs
+
+ # Add here commands to install the package into debian/retroarch.
+ #$(MAKE) -C build-qt DESTDIR=$(CURDIR)/debian/ppsspp PREFIX=/usr install # make install of ppsspp installs only icons... needs improvement by upstream
+ cp $(CURDIR)/build-qt/PPSSPPQt $(CURDIR)/debian/ppsspp/usr/games/ppsspp
+ cp $(CURDIR)/debian/ppsspp.desktop $(CURDIR)/debian/ppsspp/usr/share/applications/
+ cp -r $(CURDIR)/assets/unix-icons/hicolor/* $(CURDIR)/debian/ppsspp/usr/share/icons/hicolor/
+
+# Build architecture-independent files here.
+binary-indep: install
+
+# Build architecture-dependent files here.
+binary-arch: install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+# dh_install
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_python
+# dh_installinit
+# dh_installcron
+# dh_installinfo
+ dh_installman
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+# dh_perl
+# dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000000..163aaf8d82
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/source/options b/debian/source/options
new file mode 100644
index 0000000000..3318d085e5
--- /dev/null
+++ b/debian/source/options
@@ -0,0 +1,9 @@
+tar-ignore = ".git/*"
+
+tar-ignore = "build-qt/"
+
+tar-ignore = "build-qt/.obj/"
+
+tar-ignore = "Qt/languages/*.qm"
+
+tar-ignore = "pspautotests/demos/*"