rules revision b723b174d7132ab6bbff3abcd83c92530065f7da
99be02f9e15a3ca61b6a7c207cc7eb68dbd04817vboxsync# Copyright (C) 2006-2010 Oracle Corporation
99be02f9e15a3ca61b6a7c207cc7eb68dbd04817vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
99be02f9e15a3ca61b6a7c207cc7eb68dbd04817vboxsync# available from http://www.virtualbox.org. This file is free software;
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync# you can redistribute it and/or modify it under the terms of the GNU
2f0d866e126dd288169fed591c259c1c6b4016e5vboxsync# General Public License as published by the Free Software Foundation,
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync# distribution. VirtualBox OSE is distributed in the hope that it will
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync# be useful, but WITHOUT ANY WARRANTY of any kind.
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync# NOTE: if you make changes to this file, please check if the updates should
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync# be also applied to the publicly visible debian/rules file.
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync#export DH_VERBOSE=1
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync# possible overrides:
c1b76913eb226361b0f57efd4dc45072db194218vboxsync# OSE=1 force VBOX_OSE
2f0d866e126dd288169fed591c259c1c6b4016e5vboxsync# NOPARALLEL=1 compile with -j1
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync# LINUX=<dir> compile vboxdrv against Linux found in <dir>
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync# VERBOSE=1 verbose build
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync# DEBUG=1 debug build
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync# NOSUBVER=1 disable generation of the sub-version field (which is
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync# either the subversion rev [if available] or the build date)
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync# NODOCS=1 don't build docs, use precompiled UserManual.pdf and
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync# NOMODS=1 don't build any module
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync# NOQT=1 don't build the Qt GUI
715e49c31b15c23c17a9ce3be42a75e7c48d4b78vboxsync# EFI include the EFI binary from prebuild
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync# VERSUFFIX=<suffix> set a particular package version suffix (e.g. _customer)
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync# HEADLESS=1 build the headless version
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync# NOWEBSVC=1 don't build the webservice API, default for OSE
dbc4cb7b07245195230a32d42f56d7edf888fcadvboxsync# STAGEDISO=<path> don't build the VBoxAdditions, use the precompiled .iso
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync# BLEEDING_EDGE=xyz
bd9e09b620b86e5e947ad66a3b6a4d9bf4dfe581vboxsyncose := $(if $(OSE),1,$(if $(wildcard $(vboxroot)/src/VBox/RDP/server),,1))
19a258565a4d24e5a0af62f626943ac9b898d957vboxsyncsvnver := $(if $(NOSUBVER),,$(if $(svn_revision),-$(svn_revision),$(shell if \
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync svn info|sed -e "s/^Revision: \(.*\)/-\1/;t;d"; else \
19a258565a4d24e5a0af62f626943ac9b898d957vboxsyncdebver :=$(subst _ALPHA,~alpha,$(subst _BETA,~beta,$(ver)))$(svnver)$(if \
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync $(BLEEDING_EDGE),-$(BLEEDING_EDGE),)$(VERSUFFIX)$(if \
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync ifeq ($(wildcard $(STAGEDISO)/VBoxGuestAdditions.iso),)
19a258565a4d24e5a0af62f626943ac9b898d957vboxsync $(error STAGEDISO='$(STAGEDISO)/VBoxGuestAdditions.iso' not found)
19a258565a4d24e5a0af62f626943ac9b898d957vboxsyncdebrel := $(if $(shell which lsb_release),_$(shell lsb_release -si)_$(shell lsb_release -sc),unknown)
e43535ace2499e7f8ef8822186047979bd58d464vboxsync# shipping Linux kernel modules with bleeding-edge releases doesn't make sense
19a258565a4d24e5a0af62f626943ac9b898d957vboxsyncinstmod := $(if $(filter _Ubuntu_lucid _Debian_sid,$(debrel)),,1)
dh_clean -k
rmdir $$i; \
sed \
if [ -f $$d/vboxdrv.ko -a -f $$d/vboxnetflt.ko -a -f $$d/vboxnetadp.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 \
dh_link \
sed \
sed \
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 \
# for some reason, the Qt libraries couldn't be found on newer releases (e.g. Ubuntu hardy)
dh_gencontrol -- \