diff --git a/debian/control b/debian/control
index 24b4076..8b72b52 100644
--- a/debian/control
+++ b/debian/control
@@ -22,3 +22,13 @@ Description: Interface for toggling the power on nVidia Optimus video cards
  "real" Optimus and "legacy" Optimus laptops (at least, that is what the
  author Lekensteyn calls those).
 
+Package: bbswitch-source
+Architecture: linux-any
+Depends: ${misc:Depends}
+Recommends: module-assistant
+Suggests: bumblebee
+Description: Interface for toggling the power on nVidia Optimus video cards
+ bbswitch is a kernel module which automatically detects the required ACPI
+ calls for two kinds of Optimus laptops. It has been verified to work with
+ "real" Optimus and "legacy" Optimus laptops (at least, that is what the
+ author Lekensteyn calls those).
diff --git a/debian/control.modules.in b/debian/control.modules.in
new file mode 100644
index 0000000..82338b0
--- /dev/null
+++ b/debian/control.modules.in
@@ -0,0 +1,19 @@
+Source: bbswitch
+Section: kernel
+Priority: optional
+Maintainer: Debian NVIDIA Maintainers <pkg-nvidia-devel@lists.alioth.debian.org>
+Build-Depends: debhelper (>= 9)
+Standards-Version: 3.9.4
+
+Package: bbswitch-modules-_KVERS_
+Architecture: all
+Depends: linux-image-_KVERS_
+Provides: bbswitch-modules
+Suggests: bumblebee
+Description: Interface for toggling the power on nVidia Optimus video cards
+ bbswitch is a kernel module which automatically detects the required ACPI
+ calls for two kinds of Optimus laptops. It has been verified to work with
+ "real" Optimus and "legacy" Optimus laptops (at least, that is what the
+ author Lekensteyn calls those).
+ .
+ This package contains the compiled Linux kernel modules for _KVERS_
diff --git a/debian/rules b/debian/rules
index 20628b1..59124cf 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,7 +4,6 @@
 #export DH_VERBOSE=1
 
 name = bbswitch
-pkgname = $(name)-dkms
 # Parse the package version from the changelog, "borrowed" from acpi_call
 version := $(shell dpkg-parsechangelog | grep '^Version:' | cut -d' ' -f2 |\
  rev | cut -d- -f2- | rev | cut -d':' -f2)
@@ -19,12 +18,22 @@ override_dh_auto_clean:
 override_dh_auto_build:
 
 override_dh_dkms:
-	dh_dkms -p$(pkgname) -V $(version)
+	dh_dkms -p$(name)-dkms -V $(version)
 
 override_dh_auto_install:
-	dh_installdirs -p$(pkgname) usr/src/$(name)-$(version)
-	dh_install -p$(pkgname) Makefile usr/src/$(name)-$(version)
-	dh_install -p$(pkgname) bbswitch.c usr/src/$(name)-$(version)
+	dh_installdirs -p$(name)-dkms usr/src/$(name)-$(version)
+	dh_install -p$(name)-dkms Makefile usr/src/$(name)-$(version)
+	dh_install -p$(name)-dkms bbswitch.c usr/src/$(name)-$(version)
+	#
+	dh_installdirs -p$(name)-source usr/src/modules/$(name)/debian
+	dh_install -p$(name)-source Makefile usr/src/modules/$(name)
+	dh_install -p$(name)-source bbswitch.c usr/src/modules/$(name)
+	# Copy Debian files
+	install -D -m 0755 debian/rules.modules debian/$(name)-source/usr/src/modules/$(name)/debian/rules
+	for file in changelog compat control control.modules.in copyright; do \
+		install -m 644 debian/$$file debian/$(name)-source/usr/src/modules/$(name)/debian/; \
+	done
+	cd debian/$(name)-source/usr/src && tar cfj $(name).tar.bz2 modules && rm -rf modules
 
 override_dh_installchangelogs:
 	dh_installchangelogs NEWS
diff --git a/debian/rules.modules b/debian/rules.modules
new file mode 100644
index 0000000..38152f4
--- /dev/null
+++ b/debian/rules.modules
@@ -0,0 +1,30 @@
+#!/usr/bin/make -f
+
+# module-assistant stuff
+PACKAGE = bbswitch-modules
+MA_DIR ?= /usr/share/modass
+-include $(MA_DIR)/include/generic.make
+-include $(MA_DIR)/include/common-rules.make
+
+kdist_clean: prep-deb-files
+	dh_clean
+	$(MAKE) clean KBUILD=$(KSRC) KVERS=$(KVERS)
+
+kdist_config: prep-deb-files
+
+binary-modules: kdist_config
+	dh_testdir
+	dh_testroot
+	dh_prep
+	# Build and install the module
+	make -C $(KSRC) M=$(CURDIR)
+	install -D -m 0644 bbswitch.ko debian/$(PACKAGE)-$(KVERS)/lib/modules/$(KVERS)/kernel/drivers/acpi/bbswitch.ko
+	dh_installdocs
+	dh_installchangelogs
+	dh_installmodules
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_gencontrol -- -v$(VERSION)
+	dh_md5sums
+	dh_builddeb --destdir=$(DEB_DESTDIR)
