summaryrefslogtreecommitdiffstats
path: root/debian/virtualbox-source.files/rules
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 14:19:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 14:19:25 +0000
commit744970696db3fad9c8735bcbe54c840e1e084d76 (patch)
tree479f3208f97fc415b7dc42c25ba734bb06dc8766 /debian/virtualbox-source.files/rules
parentAdding upstream version 6.1.22-dfsg. (diff)
downloadvirtualbox-744970696db3fad9c8735bcbe54c840e1e084d76.tar.xz
virtualbox-744970696db3fad9c8735bcbe54c840e1e084d76.zip
Adding debian version 6.1.22-dfsg-4.debian/6.1.22-dfsg-4debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/virtualbox-source.files/rules')
-rw-r--r--debian/virtualbox-source.files/rules77
1 files changed, 77 insertions, 0 deletions
diff --git a/debian/virtualbox-source.files/rules b/debian/virtualbox-source.files/rules
new file mode 100644
index 00000000..7a18aa90
--- /dev/null
+++ b/debian/virtualbox-source.files/rules
@@ -0,0 +1,77 @@
+#!/usr/bin/make -f
+
+# some default definitions, important!
+#
+# Name of the source package
+psource:=virtualbox-source
+gsource:=virtualbox-guest-source
+
+# The short upstream name, used for the module source directory
+sname:=virtualbox
+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-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 vboxdrv clean
+ $(MAKE) -C vboxnetflt clean
+ $(MAKE) -C vboxnetadp clean
+ dh_clean
+
+binary-modules: prep-deb-files
+ dh_testroot
+ dh_prep
+ # Build the module
+ $(MAKE) -C $(KSRC) M=$(CURDIR)
+ # Install the module
+ dh_install vboxdrv/vboxdrv.ko /lib/modules/$(KVERS)/misc/
+ dh_install vboxnetflt/vboxnetflt.ko /lib/modules/$(KVERS)/misc/
+ dh_install vboxnetadp/vboxnetadp.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_prep
+
+.PHONY: build clean binary-arch binary-indep binary install binary-modules kdist kdist_configure kdist_image kdist_clean