--- sysprof-1.0.12.orig/debian/sysprof-module-source.README.Debian
+++ sysprof-1.0.12/debian/sysprof-module-source.README.Debian
@@ -0,0 +1,23 @@
+Prerequisites
+-------------
+
+Sysprof needs a 2.6.11 or newer kernel with profiling enabled
+(CONFIG_PROFILING=y).
+
+
+How to compile the driver
+------------------------
+
+The easy way:
+
+type "m-a a-i sysprof-module" and wait. If something is missing (eg. the kernel
+headers), you will see instructions for the additional steps.
+
+Manual way:
+
+Install prerequisite packages: build-essential, hostap-source,
+kernel-headers-$VERSION, where $VERSION is the version of the kernel
+you want to build the driver for.
+
+
+-- Samuel Mimram <smimram@debian.org> Sun, 04 Dec 2005 13:54:11 +0100
--- sysprof-1.0.12.orig/debian/sysprof.desktop
+++ sysprof-1.0.12/debian/sysprof.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Version=1.0
+Name=Sysprof Profiler
+Comment=A system-wide linux profiler
+Exec=sysprof
+Icon=sysprof
+Type=Application
+Categories=Profiling;Development;
--- sysprof-1.0.12.orig/debian/sysprof.docs
+++ sysprof-1.0.12/debian/sysprof.docs
@@ -0,0 +1,2 @@
+README
+TODO
--- sysprof-1.0.12.orig/debian/compat
+++ sysprof-1.0.12/debian/compat
@@ -0,0 +1 @@
+4
--- sysprof-1.0.12.orig/debian/sysprof-module-source.docs
+++ sysprof-1.0.12/debian/sysprof-module-source.docs
@@ -0,0 +1,2 @@
+README
+TODO
--- sysprof-1.0.12.orig/debian/changelog
+++ sysprof-1.0.12/debian/changelog
@@ -0,0 +1,148 @@
+sysprof (1.0.12-1ubuntu0netbook1) netbook-jaunty; urgency=low
+
+  * Merge from Hardy netbook-common (original work by Steve Magoun)
+    - debian/control: add lpia to Architecture fields
+  * debian/changelog:
+    - Insert missing changelog entry for original netbook
+      revision.
+
+ -- Bruno Dilly <bruno.dilly@canonical.com>  Tue, 07 Jul 2009 13:03:29 -0300
+
+sysprof (1.0.12-1) unstable; urgency=low
+
+  * Orphan package
+  * New upstream release
+    + Fix compiling on amd64 with kernel >= 2.6.25 (Closes: #508265)
+  * Change sysprof-module-source to Architecture: all since the package
+    itself is not architecture-dependent
+
+ -- Ben Hutchings <ben@decadent.org.uk>  Sun, 14 Dec 2008 22:55:07 +0000
+
+sysprof (1.0.11-0.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * New upstream release.
+    + Don't use proc_root. (Closes: #484838).
+  * Remove encoding tag from desktop file.
+  * Fix copyright line in debian/copyright.
+  * Bump Standards Version to 3.8.0. (No changes needed).
+
+ -- Barry deFreese <bdefreese@debian.org>  Wed, 29 Oct 2008 13:57:20 -0400
+
+sysprof (1.0.10-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Samuel Mimram <smimram@debian.org>  Fri, 06 Jun 2008 00:53:57 +0200
+
+sysprof (1.0.9-2ubuntu0netbook1) netbook-common; urgency=low
+
+  * debian/control: Add lpia to Architecture fields
+
+ -- Steve Magoun <steve.magoun@canonical.com>  Thu, 09 Apr 2009 18:02:56 -0400
+
+sysprof (1.0.9-2) unstable; urgency=low
+
+  * Link statically with libbfd (thanks Michel Dänzer), closes: #439272.
+  * Better help message when module is not found (thanks Daniel Hahler),
+    closes: #462321.
+
+ -- Samuel Mimram <smimram@debian.org>  Fri, 25 Jan 2008 19:29:19 +0100
+
+sysprof (1.0.9-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Samuel Mimram <smimram@debian.org>  Thu, 15 Nov 2007 11:06:43 +0000
+
+sysprof (1.0.8-4) unstable; urgency=low
+
+  * Added a .desktop file, closes: #444132.
+
+ -- Samuel Mimram <smimram@debian.org>  Tue, 09 Oct 2007 11:24:47 +0000
+
+sysprof (1.0.8-3) unstable; urgency=low
+
+  * Rebuild against latest binutils, closes: #434361.
+
+ -- Samuel Mimram <smimram@debian.org>  Thu, 09 Aug 2007 10:41:01 +0200
+
+sysprof (1.0.8-2) unstable; urgency=low
+
+  * Don't build sysprof on ia64 since it is not supposed to be useable on this
+    arch, closes: #422573.
+
+ -- Samuel Mimram <smimram@debian.org>  Mon, 07 May 2007 10:11:07 +0200
+
+sysprof (1.0.8-1) unstable; urgency=low
+
+  * New upstream release. 
+
+ -- Samuel Mimram <smimram@debian.org>  Mon, 25 Dec 2006 23:17:31 +0000
+
+sysprof (1.0.7-1) unstable; urgency=low
+
+  * New upstream release.
+  * Let dh_installmodule take care of the modules, closes: #381769.
+  * Updated package_version.dpatch.
+
+ -- Samuel Mimram <smimram@debian.org>  Mon, 20 Nov 2006 10:14:50 +0000
+
+sysprof (1.0.3-2) unstable; urgency=low
+
+  * Build-depend on binutils-dev (>= 2.17-1), closes: #378413.
+
+ -- Samuel Mimram <smimram@debian.org>  Sun, 16 Jul 2006 10:15:09 +0000
+
+sysprof (1.0.3-1) unstable; urgency=low
+
+  * New upstream release.
+  * Does not crash anymore, closes: #370129.
+
+ -- Samuel Mimram <smimram@debian.org>  Sat, 10 Jun 2006 11:57:07 +0200
+
+sysprof (1.0.2-2) unstable; urgency=low
+
+  * Rebuild in order to avoid a SEGV, closes: #370129.
+  * Updated standards version to 3.7.2, no changes needed.
+
+ -- Samuel Mimram <smimram@debian.org>  Sun,  4 Jun 2006 16:49:53 +0200
+
+sysprof (1.0.2-1) unstable; urgency=low
+
+  * New upstream release.
+  * Added foreign_kernel.dpatch to avoid the need of a configure when building
+    the module.
+  * Removed x86_64.dpatch, integrated upstream.
+
+ -- Samuel Mimram <smimram@debian.org>  Fri,  3 Mar 2006 22:32:02 +0100
+
+sysprof (1.0.1-4) unstable; urgency=low
+
+  * Module should now be compilable for a kernel diffrent from the one
+    currently running, closes: #352305.
+
+ -- Samuel Mimram <smimram@debian.org>  Sun, 12 Feb 2006 17:29:32 +0100
+
+sysprof (1.0.1-3) unstable; urgency=low
+
+  * Using dpatch to handle patches.
+  * Added x86_64.dpatch to correct and int / long mismatch.
+  * Installing documentation in sysprof-module-source too.
+  * Added an icon for menu.
+
+ -- Samuel Mimram <smimram@debian.org>  Wed, 11 Jan 2006 19:08:08 +0100
+
+sysprof (1.0.1-2) unstable; urgency=low
+
+  * Supported archs are only i386, amd64 and ia64.
+  * Enhanced description.
+
+ -- Samuel Mimram <smimram@debian.org>  Sat, 31 Dec 2005 01:00:29 +0100
+
+sysprof (1.0.1-1) unstable; urgency=low
+
+  * Initial release, closes: #344906.
+
+ -- Samuel Mimram <smimram@debian.org>  Tue, 27 Dec 2005 14:12:01 +0100
+
--- sysprof-1.0.12.orig/debian/sysprof-module-source.dirs
+++ sysprof-1.0.12/debian/sysprof-module-source.dirs
@@ -0,0 +1 @@
+usr/src/modules/sysprof-module
--- sysprof-1.0.12.orig/debian/control
+++ sysprof-1.0.12/debian/control
@@ -0,0 +1,39 @@
+Source: sysprof
+Section: devel
+Priority: optional
+Maintainer: Debian QA Group <packages@qa.debian.org>
+Build-Depends: debhelper (>= 5.0.37), autotools-dev, automake1.9, binutils-dev (>= 2.17), bzip2, libgtk2.0-dev (>= 2.6.0), libglade2-dev, dpatch
+Standards-Version: 3.8.0
+
+Package: sysprof
+Architecture: i386 amd64 lpia
+Depends: ${shlibs:Depends}
+Recommends: sysprof-module-source
+Description: A system-wide Linux profiler
+ Sysprof is a sampling CPU profiler that uses a Linux kernel module to profile
+ the entire system, not just a single application. Sysprof handles shared
+ libraries and applications do not need to be recompiled. In fact they don't
+ even have to be restarted.
+ .
+ It has the following features:
+  - profiles all running processes, not just a single application
+  - has a simple graphical interface
+  - shows the time spent in each branch of the call tree
+  - profiles can be loaded and saved
+ .
+ You need the sysprof kernel module (provided in sysprof-module-source) to use
+ sysprof.
+
+Package: sysprof-module-source
+Architecture: all
+Depends: debhelper (>= 4.1.0), build-essential, module-assistant, bzip2
+Description: Source for the sysprof module
+ Sysprof is a sampling CPU profiler that uses a Linux kernel module to profile
+ the entire system, not just a single application. Sysprof handles shared
+ libraries and applications do not need to be recompiled. In fact they don't
+ even have to be restarted.
+ .
+ This package contains the source for the sysprof's kernel module.
+ .
+ You need a Linux kernel version 2.6.11 or newer on an i386 or amd64
+ processor.
--- sysprof-1.0.12.orig/debian/sysprof.xpm
+++ sysprof-1.0.12/debian/sysprof.xpm
@@ -0,0 +1,183 @@
+/* XPM */
+static char *sysprof[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 145 2",
+"   c #000000",
+".  c #0B0B0B",
+"X  c #100F0F",
+"o  c #131313",
+"O  c #111419",
+"+  c #191817",
+"@  c #1C1C1C",
+"#  c #141822",
+"$  c #191D28",
+"%  c #232323",
+"&  c #23262B",
+"*  c #2B2B2B",
+"=  c #333333",
+"-  c #3C3C3C",
+";  c #232F4F",
+":  c #263456",
+">  c #2B3652",
+",  c #303E63",
+"<  c #334163",
+"1  c #374874",
+"2  c #374B7F",
+"3  c #3F4D70",
+"4  c #40403F",
+"5  c #444444",
+"6  c #4C4C4C",
+"7  c #535353",
+"8  c #585857",
+"9  c #5A5A5A",
+"0  c #4D5569",
+"q  c #565F74",
+"w  c #60605F",
+"e  c #636363",
+"r  c #6D6D6C",
+"t  c #686B73",
+"y  c #757474",
+"u  c #7A7A7A",
+"i  c #374D85",
+"p  c #3E5695",
+"a  c #40568D",
+"s  c #475988",
+"d  c #4360AA",
+"f  c #4D6AB1",
+"g  c #566DAA",
+"h  c #506DB4",
+"j  c #516FBC",
+"k  c #666E84",
+"l  c #727A8F",
+"z  c #687CB3",
+"x  c #4C6CC2",
+"c  c #5374C7",
+"v  c #5877CF",
+"b  c #5D7DCD",
+"n  c #5678D6",
+"m  c #5F7ED2",
+"M  c #5C7DD9",
+"N  c #7D828E",
+"B  c #7D869E",
+"V  c #7D8EBC",
+"C  c #5E82E2",
+"Z  c #5F85EE",
+"A  c #5F84F2",
+"S  c #6484CE",
+"D  c #6A87D5",
+"F  c #6887DE",
+"G  c #6888DE",
+"H  c #798FC9",
+"J  c #6586E1",
+"K  c #698AE3",
+"L  c #6187FA",
+"P  c #6389F3",
+"I  c #698DF4",
+"U  c #7194E6",
+"Y  c #7194EB",
+"T  c #7698EA",
+"R  c #7495FE",
+"E  c #7698F7",
+"W  c #7699FD",
+"Q  c #7C9CFF",
+"!  c #858585",
+"~  c #8C8C8C",
+"^  c #8F9090",
+"/  c #939393",
+"(  c #9D9D9C",
+")  c #8A91A2",
+"_  c #8595BD",
+"`  c #8F98B1",
+"'  c #9797A1",
+"]  c #9C9FA5",
+"[  c #98A3BF",
+"{  c #A4A4A4",
+"}  c #A3A3AB",
+"|  c #ABABAB",
+" . c #ACACB5",
+".. c #ACAEBA",
+"X. c #AFB2BB",
+"o. c #B6B6B6",
+"O. c #B8B8B7",
+"+. c #8797C2",
+"@. c #829EFF",
+"#. c #9BA6C2",
+"$. c #83A3FE",
+"%. c #8BA4FF",
+"&. c #8AAAFD",
+"*. c #91A7FF",
+"=. c #96ACFF",
+"-. c #9AADFF",
+";. c #9EB2FF",
+":. c #9EBAFF",
+">. c #A6AECA",
+",. c #B1B8C8",
+"<. c #BEBFCB",
+"1. c #A5B5FF",
+"2. c #A3BCFE",
+"3. c #A9B7FF",
+"4. c #ABBCFF",
+"5. c #BCC0C9",
+"6. c #ACC4FF",
+"7. c #B3C7FF",
+"8. c #BBC5FF",
+"9. c #BDCBF4",
+"0. c #BCC9FF",
+"q. c #C2C2C2",
+"w. c #C0C2CD",
+"e. c #C8C7C7",
+"r. c #CBCCCD",
+"t. c #CACBDC",
+"y. c #C2CCFF",
+"u. c #C5D1FF",
+"i. c #CBD3FF",
+"p. c #CDD9FF",
+"a. c #DADAE5",
+"s. c #DDDDEA",
+"d. c #D0D5FF",
+"f. c #D5DCFE",
+"g. c #DADDFF",
+"h. c #DCE2FE",
+"j. c #E2E3F6",
+"k. c #E2E5FF",
+"l. c #E6E9FF",
+"z. c #E8E8F5",
+"x. c #EBEDFF",
+"c. c #EEF1FF",
+"v. c #F1F2FF",
+"b. c gray100",
+"n. c None",
+/* pixels */
+"n.n.n.n.n.n.n.n.n.n.n.n.n.n.n.n.n.n.              n.n.n.n.n.n.n.",
+"n.n.n.n.n.n.n.n.n.n.n.n.n.n.  n.  @ = - - * o       n.n.n.n.n.n.",
+"n.n.n.n.n.n.n.n.n.n.n.n.n.n.n.. - 7 8 7 7 8 6 %       n.n.n.n.n.",
+"n.n.n.n.n.n.n.n.n.n.n.n.n.n.  = 8 - + . . * 7 7 %       n.n.n.n.",
+"n.n.n.n.n.n.n.n.n.n.n.n.n.n.. 7 5 . 9 { ! 5 @ 7 6 .       n.n.n.",
+"n.n.n.n.n.n.n.n.n.n.n.n.n.n.@ 8 & + ~ q.! 5 % * 8 %       n.n.n.",
+"n.n.n.n.n.n.n.      n.n.n.n.o 8 * . y { r - @ @ 7 *       n.n.n.",
+"n.n.n.n.n.          n.o - 5 5 7 5 - e ~ 7 % . * 9 %       n.n.n.",
+"n.n.n.  n.e 5 +   . - 8 r u u r e 7 6 5 - = * 6 6 .       n.n.n.",
+"n.n.n.n.+ ~ ] 6 + - u / ^ t 5 = * * = - = * = 6 @         n.n.n.",
+"n.n.n.n.. 7 { ( 8 ~ { y * X X # # # + % * * % * % .       n.n.n.",
+"n.n.n.    . 6 u { | 6 . $ 1 f S b c d 3 5 - * + % *       n.n.n.",
+"n.n.n.n.    - ~ | 5 . < S &.2.6.6.2.&.I j q 9 = o % %       n.n.",
+"n.n.n.n.n.* u O.e o 1 T 6.9.>.h.f.d.0.2.W n k r % o * .     n.n.",
+"n.n.n.n.n.6 { / + > U 7.f.h...t.x.k.h.p.4.R n N 9 . @ %     n.n.",
+"n.n.n.n.@ y o.7 O f :.p.k.c.5.5.v.c.l.h.u.=.L z / * . @ .     n.",
+"n.n.n.n.= ! ( * ; T 0.h.x.v.s. .z.c.x.l.d.4.@.M } 7   % X     n.",
+"n.n.n.n.= / ~ + i Q u.h.v.v.v.} a.v.x.l.g.8.@.M ` k . @ o     n.",
+"n.n.n.n.4 / u o p &.i.k.x.v.v.<.' z.c.l.g.y.@.P _ / . @ X     n.",
+"n.n.n.n.5 ! y o p $.y.h.x.v.v...- <.x.l.g.y.@.I +.( . @ X     n.",
+"n.n.n.n.= u y o i W 7.h.l.x.x.s.' t.l.j.d.3.@.I #.~ . @ o     n.",
+"n.n.n.n.* r u @ : Z :.u.h.l.x.x.j.g.j.g.y.-.@.J 5.r   @ X     n.",
+"n.n.n.n.@ 7 u = # x Q 6.u.g.k.k.k.g.d.y.3.*.Q H r.- . %       n.",
+"n.n.n.n.  - e 6 . < Z Q 3.y.u.d.d.i.y.1.*.@.F ,.( . + @       n.",
+"n.n.n.n.  % 6 9 * o a P Q *.-.3.3.1.=.%.$.K #.e.= . & .     n.n.",
+"n.n.n.n.    - 7 5 % & s C R $.%.%.%.%.E D [ r.e   @ +       n.n.",
+"n.n.n.n.    + = 5 - * = 0 g b J K G D V X.o.7 . + @         n.n.",
+"n.n.n.n.n.    + = - * * - 8 t l B ) ] { u * . + % .       n.n.n.",
+"n.n.n.n.n.n.    + = = & @ % = 6 7 7 4 + . . % @ .         n.n.n.",
+"n.n.n.n.n.n.      . % * * % + o . . . + @ % o           n.n.n.n.",
+"n.n.n.n.n.n.n.        . + % * % % % % @ . .           n.n.n.n.n.",
+"n.n.n.n.n.n.n.n.n.                                n.n.n.n.n.n.n."
+};
--- sysprof-1.0.12.orig/debian/sysprof.1
+++ sysprof-1.0.12/debian/sysprof.1
@@ -0,0 +1,17 @@
+.TH SYSPROF 1 2005-12-27
+
+.SH NAME
+SYSPROF \- System-wide Linux Profiler
+
+.SH SYNOPSIS
+.B sysprof
+
+.SH DESCRIPTION
+.B sysprof is a sampling CPU profiler for Linux that uses a kernel module to profile the entire system, not just a single application. Sysprof handles shared libraries and applications do not need to be recompiled. In fact they don't even have to be restarted.
+
+.SH AUTHOR
+.B sysprof
+was written by Soren Sandmann <sandmann@redhat.com>.
+.PP
+This manual page was written by Samuel Mimram <smimram@debian.org>,
+for the Debian project (but may be used by others).
--- sysprof-1.0.12.orig/debian/control.modules.in
+++ sysprof-1.0.12/debian/control.modules.in
@@ -0,0 +1,24 @@
+Source: sysprof
+Section: devel
+Priority: optional
+Maintainer: Samuel Mimram <smimram@debian.org>
+Build-Depends: debhelper (>= 5.0.37), bzip2
+Standards-Version: 3.8.0
+
+Package: sysprof-module-_KVERS_
+Architecture: any
+Description: Sysprof module for Linux (kernel _KVERS_)
+ Sysprof is a sampling CPU profiler that uses a Linux kernel module to profile
+ the entire system, not just a single application. Sysprof handles shared
+ libraries and applications do not need to be recompiled. In fact they don't
+ even have to be restarted.
+ .
+ This package contains the kernel module compiled for linx _KVERS_ needed by
+ sysprof.
+ .
+ If you have compiled your own kernel, you will most likely need to build
+ your own sysprof-module. The sysprof-module-source package has been
+ provided for use with the Debian's module-assistant or kernel-package
+ utilities to produce a version of sysprof-module for your kernel.
+ .
+ You need a linux kernel version 2.6.11 or newer.
--- sysprof-1.0.12.orig/debian/copyright
+++ sysprof-1.0.12/debian/copyright
@@ -0,0 +1,25 @@
+This package was debianized by Samuel Mimram <smimram@debian.org> on
+Sat, 29 Oct 2005 14:22:59 +0200.
+
+It was downloaded from http://www.daimi.au.dk/~sandmann/sysprof/
+
+Copyright: Copyright (C) 2004-2008 Søren Sandmann <sandmann@redhat.com>
+
+License:
+
+   This package 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 package 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 package; if not, write to the 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 can be found in `/usr/share/common-licenses/GPL'.
--- sysprof-1.0.12.orig/debian/rules
+++ sysprof-1.0.12/debian/rules
@@ -0,0 +1,109 @@
+#!/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
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+export KSRC
+export KVERS
+export KDREV
+
+# We want to use dpatch
+include /usr/share/dpatch/dpatch.make
+
+DESTDIR = $(CURDIR)/debian/tmp
+SYSPROFDIR = $(CURDIR)/debian/sysprof
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
+  confflags += --build $(DEB_HOST_GNU_TYPE)
+else
+  confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+endif
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+config.status: configure
+	dh_testdir
+#	CFLAGS="$(CFLAGS) -Wl,-z,defs"
+	CFLAGS="$(CFLAGS)" ./configure $(confflags) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --disable-kernel-module
+
+build: patch-stamp build-stamp
+build-stamp:  config.status
+	dh_testdir
+	$(MAKE) all
+	touch build-stamp
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+	[ ! -f Makefile ] || $(MAKE) distclean
+	rm -f config.log
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	# Install sysprof.
+	make install DESTDIR=$(SYSPROFDIR)
+	cp debian/sysprof.xpm $(SYSPROFDIR)/usr/share/pixmaps
+	mkdir -p $(SYSPROFDIR)/usr/share/applications
+	cp debian/sysprof.desktop $(SYSPROFDIR)/usr/share/applications
+
+	# Install the sources of the kernel module.
+	install -D -m 0755 debian/rules.modules debian/tmp/modules/sysprof-module/debian/rules
+	for f in debian/*.modules.in debian/control debian/compat debian/copyright debian/changelog; do \
+		install -m 0644 $$f debian/tmp/modules/sysprof-module/debian/; \
+	done
+	cp module/* debian/tmp/modules/sysprof-module/
+	cd debian/tmp/; tar jcvf ../sysprof-module-source/usr/src/sysprof-module.tar.bz2 modules
+	rm -rf debian/tmp/modules
+
+# 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 ChangeLog
+	dh_installdocs
+	dh_installexamples
+	dh_install --sourcedir=debian/tmp --list-missing
+	dh_installmenu
+	dh_installman debian/sysprof.1
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	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
--- sysprof-1.0.12.orig/debian/svn-deblayout
+++ sysprof-1.0.12/debian/svn-deblayout
@@ -0,0 +1,3 @@
+origDir=../upstream
+origUrl=svn+ssh://smimram@cerium.pps.jussieu.fr/data/svn/debian/sysprof/trunk
+tagsUrl=svn+ssh://smimram@cerium.pps.jussieu.fr/data/svn/debian/sysprof/tags
--- sysprof-1.0.12.orig/debian/watch
+++ sysprof-1.0.12/debian/watch
@@ -0,0 +1,3 @@
+version=3
+
+http://www.daimi.au.dk/~sandmann/sysprof/ sysprof-(.*)\.tar\.gz
--- sysprof-1.0.12.orig/debian/sysprof.menu
+++ sysprof-1.0.12/debian/sysprof.menu
@@ -0,0 +1,4 @@
+?package(sysprof):command="/usr/bin/sysprof" \
+  needs="x11" \
+  section="Applications/Programming" title="Sysprof" \
+  icon="/usr/share/pixmaps/sysprof.xpm"
--- sysprof-1.0.12.orig/debian/rules.modules
+++ sysprof-1.0.12/debian/rules.modules
@@ -0,0 +1,50 @@
+#!/usr/bin/make -f
+
+PACKAGE := sysprof-module
+MA_DIR ?= /usr/share/modass
+-include $(MA_DIR)/include/generic.make
+-include $(MA_DIR)/include/common-rules.make
+
+BASEVERS := $(shell echo $(KVERS) | cut -d. -f-2)
+
+# kernel module filename extension
+ifeq ($(BASEVERS),2.6)
+        modextension := .ko
+else
+        modextension := .o
+endif
+
+.PHONY: kdist_config
+kdist_config: prep-deb-files
+
+.PHONY: binary_modules binary-modules
+binary-modules: binary_modules
+binary-modules: kdist_config
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+
+	# Build the module
+	$(MAKE) -C $(CURDIR) KVERS=$(KVERS) KDIR=$(KSRC)
+
+	# Install the module
+	dh_installdirs lib/modules/$(KVERS)/kernel/lib/
+	dh_install sysprof-module$(modextension) lib/modules/$(KVERS)/kernel/lib/
+	dh_installmodules
+
+	dh_installdocs
+	dh_installchangelogs
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_gencontrol -- -v$(VERSION)
+	dh_md5sums
+	dh_builddeb --destdir=$(DEB_DESTDIR)
+	dh_clean -k
+
+.PHONY: kdist_clean
+kdist_clean:
+	dh_testdir
+	dh_testroot
+	dh_clean
+	$(MAKE) -C $(CURDIR) clean
--- sysprof-1.0.12.orig/debian/patches/00list
+++ sysprof-1.0.12/debian/patches/00list
@@ -0,0 +1,4 @@
+foreign_kernel
+package_version
+static_libbfd
+better_help_for_missing_module
--- sysprof-1.0.12.orig/debian/patches/foreign_kernel.dpatch
+++ sysprof-1.0.12/debian/patches/foreign_kernel.dpatch
@@ -0,0 +1,29 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## foreign_kernel.dpatch by Samuel Mimram <smimram@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Use provided kernel version.
+
+@DPATCH@
+diff -urNad sysprof-1.0.1~/module/Makefile sysprof-1.0.1/module/Makefile
+--- sysprof-1.0.1~/module/Makefile	2005-12-19 21:49:27.000000000 +0100
++++ sysprof-1.0.1/module/Makefile	2006-02-12 17:34:15.000000000 +0100
+@@ -10,7 +10,8 @@
+ endif
+ 
+ MODULE    := sysprof-module
+-KDIR      := /lib/modules/$(shell uname -r)/build
++KVERS     := $(shell uname -r)
++KDIR      := /lib/modules/$(KVERS)/build
+ INCLUDE   := -isystem $(KDIR)/include
+ MODCFLAGS := -DMODULE -D__KERNEL__ -Wall ${INCLUDE}
+ 
+@@ -22,7 +23,7 @@
+ 	modprobe -r sysprof-module
+ 	modprobe sysprof-module
+ 
+-ifneq ($(shell (uname -r | grep 2.6) > /dev/null ; echo -n $$?),0)
++ifneq ($(shell ($(KVERS) | grep 2.6) > /dev/null ; echo -n $$?),0)
+ 	echo A 2.6 kernel is required; exit 1
+ endif
+ 
--- sysprof-1.0.12.orig/debian/patches/package_version.dpatch
+++ sysprof-1.0.12/debian/patches/package_version.dpatch
@@ -0,0 +1,28 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## package_version.dpatch by Samuel Mimram <smimram@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Define the package_version to avoid necessity for configure.
+
+@DPATCH@
+diff -urNad sysprof-1.0.7~/module/sysprof-module.c sysprof-1.0.7/module/sysprof-module.c
+--- sysprof-1.0.7~/module/sysprof-module.c	2006-11-20 10:12:04.000000000 +0000
++++ sysprof-1.0.7/module/sysprof-module.c	2006-11-20 10:14:07.000000000 +0000
+@@ -19,6 +19,8 @@
+  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+  */
+ 
++#define PACKAGE_VERSION "1.0.7-debian"
++
+ #ifdef CONFIG_SMP
+ # define __SMP__
+ #endif
+@@ -36,8 +38,6 @@
+ 
+ #include "sysprof-module.h"
+ 
+-#include "../config.h"
+-
+ #include <linux/version.h>
+ 
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
--- sysprof-1.0.12.orig/debian/patches/static_libbfd.dpatch
+++ sysprof-1.0.12/debian/patches/static_libbfd.dpatch
@@ -0,0 +1,31 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## static_libbfd.dpatch by Michel Dänzer <daenzer@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Link statically with libbfd.
+
+@DPATCH@
+diff -urNad sysprof-1.0.9~/configure sysprof-1.0.9/configure
+--- sysprof-1.0.9~/configure	2007-10-21 23:42:22.000000000 +0200
++++ sysprof-1.0.9/configure	2008-01-25 19:19:41.000000000 +0100
+@@ -3759,7 +3759,7 @@
+ { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bfd_bfd_get_error" >&5
+ $as_echo "$ac_cv_lib_bfd_bfd_get_error" >&6; }
+ if test "x$ac_cv_lib_bfd_bfd_get_error" = x""yes; then
+-  DEP_LIBS="$DEP_LIBS -lbfd -liberty"
++  DEP_LIBS="$DEP_LIBS /usr/lib/libbfd.a -liberty"
+ else
+   { { $as_echo "$as_me:$LINENO: error: libbfd is required to compile sysprof" >&5
+ $as_echo "$as_me: error: libbfd is required to compile sysprof" >&2;}
+diff -urNad sysprof-1.0.9~/configure.ac sysprof-1.0.9/configure.ac
+--- sysprof-1.0.9~/configure.ac	2007-10-21 23:42:16.000000000 +0200
++++ sysprof-1.0.9/configure.ac	2008-01-25 19:19:41.000000000 +0100
+@@ -90,7 +90,7 @@
+   AC_CHECK_LIB(iberty, cplus_demangle_opname, [],
+     AC_MSG_ERROR([libiberty is required to compile sysprof]), -ldl))
+ 
+-AC_CHECK_LIB(bfd, bfd_get_error, [DEP_LIBS="$DEP_LIBS -lbfd -liberty"],
++AC_CHECK_LIB(bfd, bfd_get_error, [DEP_LIBS="$DEP_LIBS /usr/lib/libbfd.a -liberty"],
+   AC_MSG_ERROR([libbfd is required to compile sysprof]),
+   -liberty)
+ 
--- sysprof-1.0.12.orig/debian/patches/better_help_for_missing_module.dpatch
+++ sysprof-1.0.12/debian/patches/better_help_for_missing_module.dpatch
@@ -0,0 +1,26 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## better_help_for_missing_module.dpatch by Daniel Hahler <ubuntu@thequod.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Better help in case the sysprof-module is not loaded. (LP: #30160)
+
+@DPATCH@
+diff -urNad sysprof-1.0.9~/sysprof.c sysprof-1.0.9/sysprof.c
+--- sysprof-1.0.9~/sysprof.c	2007-10-21 23:43:43.000000000 +0200
++++ sysprof-1.0.9/sysprof.c	2008-01-23 23:21:09.027183686 +0100
+@@ -560,7 +560,14 @@
+ 		       "\n"
+ 		       "       modprobe sysprof-module\n"
+ 		       "\n"
+-		       "as root.");
++		       "as root.\n"
++		       "\n"
++		       "You may need to build and install this module first:\n"
++		       "  1. Install the package sysprof-module-source\n"
++		       "  2. Execute \"m-a a-i sysprof-module\"\n"
++		       "  3. Load the module as described above\n"
++		       "  4. Restart sysprof\n"
++		       "See also /usr/share/doc/sysprof-module-source/README.Debian" );
+ 		
+ 		update_sensitivity (app);
+ 		return;
