summaryrefslogtreecommitdiffstats
path: root/debian/virtualbox-guest-source.files
diff options
context:
space:
mode:
Diffstat (limited to 'debian/virtualbox-guest-source.files')
-rw-r--r--debian/virtualbox-guest-source.files/Makefile3
-rw-r--r--debian/virtualbox-guest-source.files/control.modules.in27
-rw-r--r--debian/virtualbox-guest-source.files/rules70
-rw-r--r--debian/virtualbox-guest-source.files/udev2
4 files changed, 102 insertions, 0 deletions
diff --git a/debian/virtualbox-guest-source.files/Makefile b/debian/virtualbox-guest-source.files/Makefile
new file mode 100644
index 00000000..8434d74b
--- /dev/null
+++ b/debian/virtualbox-guest-source.files/Makefile
@@ -0,0 +1,3 @@
+.NOTPARALLEL:
+
+obj-m = vboxguest/ vboxsf/ vboxvideo/
diff --git a/debian/virtualbox-guest-source.files/control.modules.in b/debian/virtualbox-guest-source.files/control.modules.in
new file mode 100644
index 00000000..f00fdeb2
--- /dev/null
+++ b/debian/virtualbox-guest-source.files/control.modules.in
@@ -0,0 +1,27 @@
+Source: virtualbox
+Section: contrib/misc
+Priority: optional
+Maintainer: Debian Virtualbox Team <team+debian-virtualbox@tracker.debian.org>
+Uploaders: Ritesh Raj Sarraf <rrs@debian.org>,
+ Gianfranco Costamagna <locutusofborg@debian.org>
+Build-Depends: debhelper (>= 10), kbuild
+Standards-Version: 4.3.0
+Homepage: https://www.virtualbox.org
+Vcs-Browser: https://salsa.debian.org/pkg-virtualbox-team/virtualbox
+Vcs-Git: https://salsa.debian.org/pkg-virtualbox-team/virtualbox.git
+
+Package: virtualbox-guest-modules-_KVERS_
+Section: contrib/kernel
+Architecture: amd64 i386
+Depends: linux-modules-_KVERS_ | linux-image-_KVERS_
+Recommends: virtualbox-guest-utils
+Provides: virtualbox-guest-modules
+Description: VirtualBox guest addition modules for Linux (kernel _KVERS_)
+ This package contains the set of loadable kernel modules for VirtualBox Guest Additions.
+ .
+ This package contains the compiled kernel modules for _KVERS_
+ .
+ If you have compiled your own kernel, you will most likely need to build
+ your own virtualbox-guest-modules. The virtualbox-guest-source package has been
+ provided for use with the Debian's module-assistant or kernel-package
+ utilities to produce a version of virtualbox-guest-modules for your kernel.
diff --git a/debian/virtualbox-guest-source.files/rules b/debian/virtualbox-guest-source.files/rules
new file mode 100644
index 00000000..092a626e
--- /dev/null
+++ b/debian/virtualbox-guest-source.files/rules
@@ -0,0 +1,70 @@
+#!/usr/bin/make -f
+
+# The short upstream name, used for the module source directory
+uname:=virtualbox-guest-utils
+
+### KERNEL SETUP
+### Setup the stuff needed for making kernel module packages
+### taken from /usr/share/kernel-package/sample.module.rules
+
+# prefix of the target package name
+PACKAGE := virtualbox-guest-modules
+# modifieable for experiments or debugging m-a
+MA_DIR ?= /usr/share/modass
+# load generic variable handling
+-include $(MA_DIR)/include/generic.make
+# load default rules, including kdist, kdist_image, ...
+-include $(MA_DIR)/include/common-rules.make
+
+# module assistant calculates all needed things for us and sets
+# following variables:
+# KSRC (kernel source directory), KVERS (kernel version string), KDREV
+# (revision of the Debian kernel-image package), CC (the correct
+# compiler), VERSION (the final package version string), PKGNAME (full
+# package name with KVERS included), DEB_DESTDIR (path to store DEBs)
+
+# The kdist_configure target is called by make-kpkg modules_config and
+# by kdist* rules by dependency. It should configure the module so it is
+# ready for compilation (mostly useful for calling configure).
+# prep-deb-files from module-assistant creates the neccessary debian/ files
+kdist_configure: prep-deb-files
+
+# the kdist_clean target is called by make-kpkg modules_clean and from
+# kdist* rules. It is responsible for cleaning up any changes that have
+# been made by the other kdist_commands (except for the .deb files created)
+kdist_clean: clean
+ $(MAKE) $(MFLAGS) -f debian/rules clean
+#
+### end KERNEL SETUP
+
+#see bug #785161
+#MAKE:=kmk
+
+clean:
+ $(MAKE) -C vboxguest clean
+ $(MAKE) -C vboxsf clean
+ $(MAKE) -C vboxvideo clean
+ dh_clean
+
+binary-modules: prep-deb-files
+ dh_testroot
+ dh_clean -k
+ # Build the modules
+ $(MAKE) -C $(KSRC) M=$(CURDIR)
+ # Install the modules
+ dh_install vboxguest/vboxguest.ko /lib/modules/$(KVERS)/misc/
+ dh_install vboxsf/vboxsf.ko /lib/modules/$(KVERS)/misc/
+ dh_install vboxvideo/vboxvideo.ko /lib/modules/$(KVERS)/misc/
+ dh_installudev
+ dh_installdocs
+ dh_installchangelogs
+ dh_compress
+ dh_fixperms
+ dh_installmodules
+ dh_installdeb
+ dh_gencontrol -- -v$(VERSION)
+ dh_md5sums
+ dh_builddeb --destdir=$(DEB_DESTDIR)
+ dh_clean -k
+
+.PHONY: build clean binary-arch binary-indep binary install binary-modules kdist kdist_configure kdist_image kdist_clean
diff --git a/debian/virtualbox-guest-source.files/udev b/debian/virtualbox-guest-source.files/udev
new file mode 100644
index 00000000..629d0753
--- /dev/null
+++ b/debian/virtualbox-guest-source.files/udev
@@ -0,0 +1,2 @@
+KERNEL=="vboxguest", NAME="vboxguest", OWNER="root", MODE="0660"
+KERNEL=="vboxuser", NAME="vboxuser", OWNER="root", MODE="0666"