source: pkg/boss/main/virtualbox-ose/trunk/debian/virtualbox-ose-source.files/rules @ 4744

Revision 4744, 2.2 KB checked in by alanbach-guest, 6 years ago (diff)
  • Added virtualbox-ose 2.0 to BOSS
Line 
1#!/usr/bin/make -f
2
3include /usr/share/dpatch/dpatch.make
4
5# some default definitions, important!
6#
7# Name of the source package
8psource:=virtualbox-ose-source
9gsource:=virtualbox-ose-guest-source
10
11# The short upstream name, used for the module source directory
12sname:=virtualbox-ose
13uname:=virtualbox-ose-guest-utils
14
15### KERNEL SETUP
16### Setup the stuff needed for making kernel module packages
17### taken from /usr/share/kernel-package/sample.module.rules
18
19# prefix of the target package name
20PACKAGE := virtualbox-ose-modules
21# modifieable for experiments or debugging m-a
22MA_DIR ?= /usr/share/modass
23# load generic variable handling
24-include $(MA_DIR)/include/generic.make
25# load default rules, including kdist, kdist_image, ...
26-include $(MA_DIR)/include/common-rules.make
27
28# module assistant calculates all needed things for us and sets
29# following variables:
30# KSRC (kernel source directory), KVERS (kernel version string), KDREV
31# (revision of the Debian kernel-image package), CC (the correct
32# compiler), VERSION (the final package version string), PKGNAME (full
33# package name with KVERS included), DEB_DESTDIR (path to store DEBs)
34
35# The kdist_configure target is called by make-kpkg modules_config and
36# by kdist* rules by dependency. It should configure the module so it is
37# ready for compilation (mostly useful for calling configure).
38# prep-deb-files from module-assistant creates the neccessary debian/ files
39kdist_configure: prep-deb-files
40
41# the kdist_clean target is called by make-kpkg modules_clean and from
42# kdist* rules. It is responsible for cleaning up any changes that have
43# been made by the other kdist_commands (except for the .deb files created)
44kdist_clean: clean
45        $(MAKE) $(MFLAGS) -f debian/rules clean
46#
47### end  KERNEL SETUP
48
49MAKE:=kmk
50
51binary-modules: prep-deb-files
52        dh_testroot
53        dh_clean -k
54        # Build the module
55        $(MAKE) -C $(KSRC) M=$(CURDIR)
56        # Install the module
57        dh_install vboxdrv.ko /lib/modules/$(KVERS)/misc/
58        dh_installdocs
59        dh_installchangelogs
60        dh_compress
61        dh_fixperms
62        dh_installmodules
63        dh_installdeb
64        dh_gencontrol -- -v$(VERSION)
65        dh_md5sums
66        dh_builddeb --destdir=$(DEB_DESTDIR)
67        dh_clean -k
68
69.PHONY: build clean binary-arch binary-indep binary install binary-modules kdist kdist_configure kdist_image kdist_clean
Note: See TracBrowser for help on using the repository browser.