summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorRitesh Raj Sarraf <rrs@researchut.com>2010-10-01 18:37:46 +0530
committerRitesh Raj Sarraf <rrs@researchut.com>2010-10-01 18:37:46 +0530
commitb52aad04b371763aa804a012055b3f2db4b5ebec (patch)
treeacc1f567cd19057cd70c0c233f7add37c1a9e3bc /debian
parent08c5245e2f202e06742f21a6c870cc5533306e2b (diff)
debian/rules dkms-ification
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/rules15
1 files changed, 15 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
index acc2555..366bf10 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,6 +2,11 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
+# DKMS package
+pdkms=sysprof-module-dkms
+
+DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
+
# This has to be exported to make some magic below work.
export DH_OPTIONS
export KSRC
@@ -53,6 +58,16 @@ override_dh_install:
install -m 0644 $$f debian/tmp/modules/sysprof-module/debian/; \
done
cp module/* debian/tmp/modules/sysprof-module/
+
+ # For DKMS
+ # Create the directories to install the source into
+ dh_installdirs -p$(pdkms) usr/src/$(PACKAGE)-$(DEB_UPSTREAM_VERSION)
+ dh_installdirs -p$(pdkms) usr/src/$(PACKAGE)-$(DEB_UPSTREAM_VERSION)/debian
+ install -D -m 0755 debian/rules.modules debian/$(pdkms)/tmp/modules/$(PACKAGE)-$(DEB_UPSTREAM_VERSION)/debian/rules
+ for f in debian/*.modules.in debian/control debian/compat debian/copyright debian/changelog; do \
+ install -m 0644 $$f debian/$(pdkms)/tmp/modules/$(PACKAGE)-$(DEB_UPSTREAM_VERSION)/debian/; \
+ done
+
cd debian/tmp/; tar jcvf ../sysprof-module-source/usr/src/sysprof-module.tar.bz2 modules; cd ../../
rm -rf debian/tmp/modules