--- ciso-1.0.0.orig/debian/changelog
+++ ciso-1.0.0/debian/changelog
@@ -0,0 +1,19 @@
+ciso (1.0.0-0ubuntu3) bionic; urgency=high
+
+  * No change rebuild to pick up -fPIE compiler default
+
+ -- Balint Reczey <rbalint@ubuntu.com>  Tue, 03 Apr 2018 12:16:59 +0000
+
+ciso (1.0.0-0ubuntu2) jaunty; urgency=low
+
+  * Resolution of memory allocation failure on amd64 which caused unusable
+    ciso files to be created (LP: #163308) 
+
+ -- Brian Murray <brian@ubuntu.com>  Tue, 02 Dec 2008 20:58:34 -0800
+
+ciso (1.0.0-0ubuntu1) feisty; urgency=low
+
+  * Initial release
+
+ -- Gaëtan Petit <tenshu@gmail.com>  Mon, 30 Oct 2006 22:07:57 +0100
+
--- ciso-1.0.0.orig/debian/ciso.1
+++ ciso-1.0.0/debian/ciso.1
@@ -0,0 +1,30 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36.
+.TH USAGE: "1" "January 2007" "Usage: ciso level infile outfile" "User Commands"
+.SH NAME
+Usage: \- manual page for Usage: ciso level infile outfile
+.SH SYNOPSIS
+.B ciso
+\fIlevel infile outfile\fR
+.SH DESCRIPTION
+.IP
+level: 1\-9 compress ISO to CSO (1=fast/large \- 9=small/slow
+.TP
+0
+decompress CSO to ISO
+.IP
+level: 1\-9 compress ISO to CSO (1=fast/large \- 9=small/slow
+.TP
+0
+decompress CSO to ISO
+.SH "SEE ALSO"
+The full documentation for
+.B Usage:
+is maintained as a Texinfo manual.  If the
+.B info
+and
+.B Usage:
+programs are properly installed at your site, the command
+.IP
+.B info Usage:
+.PP
+should give you access to the complete manual.
--- ciso-1.0.0.orig/debian/compat
+++ ciso-1.0.0/debian/compat
@@ -0,0 +1 @@
+5
--- ciso-1.0.0.orig/debian/control
+++ ciso-1.0.0/debian/control
@@ -0,0 +1,17 @@
+Source: ciso
+Section: utils
+Priority: optional
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Gaëtan Petit <tenshu@gmail.com>
+Build-Depends: debhelper (>= 5), zlib1g-dev, dpatch
+Standards-Version: 3.7.2
+
+Package: ciso
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Tool to convert Sony PSP iso to ciso
+ A simple tool to convert your Sony PSP isos
+ from your backuped games to cso files.
+ .
+ Originally coded by Booster.
+ Homepage: http://ciso.tenshu.fr/
--- ciso-1.0.0.orig/debian/copyright
+++ ciso-1.0.0/debian/copyright
@@ -0,0 +1,30 @@
+This package was debianized by Gaëtan Petit <tenshu@gmail.com> on
+Mon, 30 Oct 2006 22:07:57 +0100.
+
+It was downloaded from http://ciso.tenshu.fr/
+
+Upstream Author: Originally coded by Booster but for some reasons he his not reachable anymore, 
+this project is actually maintained by Gaëtan Petit <tenshu@gmail.com>.
+
+Copyright: 2006 Ciso project
+           http://ciso.tenshu.fr/
+
+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 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
+   Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+On Debian systems, the complete text of the GNU General Public License
+Version 2 can be found in `/usr/share/common-licenses/GPL' file.
+
--- ciso-1.0.0.orig/debian/patches/00list
+++ ciso-1.0.0/debian/patches/00list
@@ -0,0 +1 @@
+01_mem_alloc_failure_amd64.dpatch
--- ciso-1.0.0.orig/debian/patches/01_mem_alloc_failure_amd64.dpatch
+++ ciso-1.0.0/debian/patches/01_mem_alloc_failure_amd64.dpatch
@@ -0,0 +1,34 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_mem_alloc_failure_amd64.dpatch by Brian Murray <brian@ubuntu.com>
+##
+## Ubuntu: http://launchpad.net/bugs/163308
+## Description: Use standard integer types to avoid accidental 8 byte value
+## when 4 was intended (32bit vs 64bit long)
+
+@DPATCH@
+diff -urNad ciso-1.0.0-20081201~/ciso.c ciso-1.0.0-20081201/ciso.c
+--- ciso-1.0.0-20081201~/ciso.c	2008-12-01 16:16:21.000000000 -0800
++++ ciso-1.0.0-20081201/ciso.c	2008-12-01 16:53:07.000000000 -0800
+@@ -22,6 +22,7 @@
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include <zlib.h>               /* /usr(/local)/include/zlib.h */
+ #include <zconf.h>
+ 
+diff -urNad ciso-1.0.0-20081201~/ciso.h ciso-1.0.0-20081201/ciso.h
+--- ciso-1.0.0-20081201~/ciso.h	2008-12-01 16:16:21.000000000 -0800
++++ ciso-1.0.0-20081201/ciso.h	2008-12-01 16:52:35.000000000 -0800
+@@ -28,9 +28,9 @@
+ typedef struct ciso_header
+ {
+ 	unsigned char magic[4];			/* +00 : 'C','I','S','O'                 */
+-	unsigned long header_size;		/* +04 : header size (==0x18)            */
++	uint32_t header_size;		/* +04 : header size (==0x18)            */
+ 	unsigned long long total_bytes;	/* +08 : number of original data size    */
+-	unsigned long block_size;		/* +10 : number of compressed block size */
++	uint32_t block_size;		/* +10 : number of compressed block size */
+ 	unsigned char ver;				/* +14 : version 01                      */
+ 	unsigned char align;			/* +15 : align of index value            */
+ 	unsigned char rsv_06[2];		/* +16 : reserved                        */
--- ciso-1.0.0.orig/debian/rules
+++ ciso-1.0.0/debian/rules
@@ -0,0 +1,90 @@
+#!/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.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+include /usr/share/dpatch/dpatch.make
+
+configure: configure-stamp
+configure-stamp: patch
+	dh_testdir
+	# Add here commands to configure the package.
+
+	touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp 
+	dh_testdir
+
+	# Add here commands to compile the package.
+	$(MAKE)
+	#docbook-to-man debian/ciso.sgml > ciso.1
+
+	touch $@
+
+clean: clean-patched unpatch
+
+clean-patched:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+
+	# Add here commands to clean up after the build process.
+	-$(MAKE) clean
+
+	dh_clean 
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k 
+	dh_installdirs
+
+	mkdir -p $(CURDIR)/debian/ciso/usr/bin
+	# Add here commands to install the package into debian/ciso.
+	$(MAKE) install DESTDIR=$(CURDIR)/debian/ciso
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs 
+	dh_installdocs
+	dh_installexamples
+	dh_installman debian/ciso.1
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean clean-patched binary-indep binary-arch binary install configure