rules revision a1f82ef4cc7089aab9f2d0be772bd431162a9f00
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# Copyright (C) 2006-2012 Oracle Corporation
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# This file is part of VirtualBox Open Source Edition (OSE), as
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# available from http://www.virtualbox.org. This file is free software;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# you can redistribute it and/or modify it under the terms of the GNU
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# General Public License (GPL) as published by the Free Software
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# Foundation, in version 2 as it comes in the "COPYING" file of the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#export DH_VERBOSE=1
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# possible overrides:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# OSE=1 force VBOX_OSE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# NOPARALLEL=1 compile with -j1
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# LINUX=<dir> compile vboxdrv against Linux found in <dir>
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# VERBOSE=1 verbose build
eb1d736b1c19f6abeee90c921a9320b67fedd016afshin salek ardakani - Sun Microsystems - Irvine United States# DEBUG=1 debug build
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# NOSUBVER=1 disable generation of the sub-version field (which is
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# either the subversion rev [if available] or the build date)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# NODOCS=1 don't build docs, use precompiled UserManual.pdf and
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# NOMODS=1 don't build any module
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# NOQT=1 don't build the Qt GUI
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# EFI=1 include the EFI binary from prebuild
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# HEADLESS=1 build the headless version
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# VNC=1 build VNC code
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# NOWEBSVC=1 don't build the webservice API, default for OSE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# STAGEDISO=<path> don't build the VBoxAdditions, use the precompiled .iso
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# PKGDIR=<path> where to store the final package(s)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# BLEEDING_EDGE=xyz
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwose := $(if $(OSE),1,$(if $(wildcard $(vboxroot)/src/VBox/RDP/server),,1))
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw $(error STAGEDISO='$(STAGEDISO)/VBoxGuestAdditions.iso' not found)
7b59d02d2a384be9a08087b14defadd214b3c1ddjbdebrel := $(if $(shell which lsb_release),_$(shell lsb_release -si)_$(shell lsb_release -sc),unknown)
7b59d02d2a384be9a08087b14defadd214b3c1ddjb# shipping Linux kernel modules with bleeding-edge releases doesn't make sense
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbinstmod := $(if $(filter _Ubuntu_lucid _Ubuntu_maverick _Ubuntu_natty _Ubuntu_oneiric _Debian_sid,$(debrel)),,1)
7b59d02d2a384be9a08087b14defadd214b3c1ddjb# Location of custom built Qt libraries (see below)
fe1c642d06e14b412cd83ae2179303186ab08972Bill Krier $(if $(filter _Ubuntu_hardy _Debian_lenny,$(debrel)),--with-qt4-dir=$(qtstdc6)) \
fe1c642d06e14b412cd83ae2179303186ab08972Bill Krier $(if $(ose),--ose,) $(if $(LINUX),--with-linux=$(LINUX),) \
rm -f debian/vboxballoonctrl-service.init debian/vboxautostart-service.init debian/vboxweb-service.init
dh_clean -k
rmdir $$i; \
sed \
install -D -g 0 -o 0 -m 644 $(vboxroot)/src/VBox/Installer/linux/debian/VBox.sh $(prefix)/usr/bin/VBox
if [ -f $$d/vboxdrv.ko -a -f $$d/vboxnetflt.ko -a -f $$d/vboxnetadp.ko -a -f $$d/vboxpci.ko ]; then \
install -D -g 0 -o 0 -m 0644 \
install -D -g 0 -o 0 -m 0644 \
install -D -g 0 -o 0 -m 0644 \
install -D -g 0 -o 0 -m 0644 \
dh_link \
sed \
cp $(vboxroot)/src/VBox/Installer/linux/vboxballoonctrl-service.sh debian/vboxballoonctrl-service.init
-e '/#include installer-common.sh/ {' \
dh_strip --keep-debug --exclude=libQtCoreVBox.so.4 --exclude=libQtGuiVBox.so.4 --exclude=libQtNetworkVBox.so.4 --exclude=libQtOpenGLVBox.so.4 --exclude=libqtaccessiblewidgets.so
for f in \
dh_gencontrol -- \