diff options
author | Ritesh Raj Sarraf <rrs@researchut.com> | 2010-10-01 18:26:29 +0530 |
---|---|---|
committer | Ritesh Raj Sarraf <rrs@researchut.com> | 2010-10-01 18:26:29 +0530 |
commit | 08c5245e2f202e06742f21a6c870cc5533306e2b (patch) | |
tree | b9e0330b61f6875323001da934ad4292dd0557af /debian | |
parent | b65b58efac353be744b79fd3e7504d078d593a2f (diff) |
Initial dkms-ification
Diffstat (limited to 'debian')
-rw-r--r-- | debian/control | 16 | ||||
-rw-r--r-- | debian/dkms.conf.in | 54 | ||||
-rw-r--r-- | debian/sysprof-dkms.postinst | 24 | ||||
-rw-r--r-- | debian/sysprof-dkms.prerm | 16 |
4 files changed, 109 insertions, 1 deletions
diff --git a/debian/control b/debian/control index f3d821a..7612db8 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Vcs-Browser: http://git.debian.org/?p=collab-maint/sysprof.git Package: sysprof Architecture: i386 amd64 Depends: ${shlibs:Depends}, ${misc:Depends} -Recommends: sysprof-module-source +Recommends: sysprof-module-source || sysprof-module-dkms 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 @@ -40,3 +40,17 @@ Description: Source for the sysprof module . You need a Linux kernel version 2.6.11 or newer on an i386 or amd64 processor. + +Package: sysprof-module-dkms +Architecture: all +Depends: debhelper (>= 4.1.0), build-essential, make, dkms (>= 1.95), bzip2, ${misc:Depends} +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 dkms source for the sysprof's kernel module. + . + You need a Linux kernel version 2.6.11 or newer on an i386 or amd64 + processor. diff --git a/debian/dkms.conf.in b/debian/dkms.conf.in new file mode 100644 index 0000000..b0d8798 --- /dev/null +++ b/debian/dkms.conf.in @@ -0,0 +1,54 @@ +PACKAGE_NAME="sysprof" +PACKAGE_VERSION="__VERSION__" +MAKE[0]="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build" +CLEAN="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build clean" +AUTOINSTALL=yes +BUILT_MODULE_NAME[0]="sysprof_module" +BUILT_MODULE_LOCATION[0]="kernel/" +DEST_MODULE_LOCATION[0]="/kernel/lib/" + + + +# +# Patches newest - oldest, distro spec at bottom +# + +PATCH[0]="compat-2.6.32.patch" +PATCH_MATCH[0]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32)" + +PATCH[1]="compat-2.6.31.patch" +PATCH_MATCH[1]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)" + +PATCH[2]="compat-2.6.30.patch" +PATCH_MATCH[2]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30)" + +PATCH[3]="compat-2.6.29.patch" +PATCH_MATCH[3]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29)" + +PATCH[4]="compat-2.6.28.patch" +PATCH_MATCH[4]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28)" + +PATCH[5]="compat-2.6.25-2.6.27.patch" +PATCH_MATCH[5]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27)" + +PATCH[6]="compat-2.6.24.patch" +PATCH_MATCH[6]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24)" + +PATCH[7]="compat-2.6.23.patch" +PATCH_MATCH[7]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23)" + +PATCH[8]="compat-2.6.22.patch" +PATCH_MATCH[8]="2\.6\.(9|14|15|16|17|18|19|20|21|22)" + +PATCH[9]="compat-2.6.19-2.6.21.patch" +PATCH_MATCH[9]="2\.6\.(9|14|15|16|17|18|19|20|21)" + +PATCH[10]="compat-2.6.14-2.6.18.patch" +PATCH_MATCH[10]="2\.6\.(9|14|15|16|17|18)" + +PATCH[11]="compat-sles10sp2.patch" +PATCH_MATCH[11]="2\.6\.16\.60-.*" + +PATCH[12]="compat-rhel4.patch" +PATCH_MATCH[12]="2\.6\.9-.*\.(el|plus\.c4)" + diff --git a/debian/sysprof-dkms.postinst b/debian/sysprof-dkms.postinst new file mode 100644 index 0000000..b4709c4 --- /dev/null +++ b/debian/sysprof-dkms.postinst @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +package=sysprof-dkms +name=sysprof + +version=`dpkg-query -W -f='${Version}' "$package" \ + |rev|cut -d- -f2-|rev|cut -d':' -f2|tr -d "\n"` + +isadded=`dkms status -m "$name" -v "$version"` + +if [ "x${isadded}" = "x" ] ; then + dkms add -m "$name" -v "$version" +fi + +if [ "$1" = 'configure' ] ; then + dkms build -m "$name" -v "$version" && dkms install -m "$name" -v "$version" || true +fi + +#DEBHELPER# + +exit 0 + diff --git a/debian/sysprof-dkms.prerm b/debian/sysprof-dkms.prerm new file mode 100644 index 0000000..854b506 --- /dev/null +++ b/debian/sysprof-dkms.prerm @@ -0,0 +1,16 @@ +#!/bin/sh + +set -e + +package=sysprof-dkms +name=sysprof + +version=`dpkg-query -W -f='${Version}' "$package" \ + |rev|cut -d- -f2-|rev|cut -d':' -f2|tr -d "\n"` + +dkms remove -m "$name" -v "$version" --all || true + +#DEBHELPER# + +exit 0 + |