rules revision e00d701bbdc8f27f25cc232d9e507622a731b390
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Copyright (C) 2006-2010 Oracle Corporation
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# This file is part of VirtualBox Open Source Edition (OSE), as
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# available from http://www.virtualbox.org. This file is free software;
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# you can redistribute it and/or modify it under the terms of the GNU
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# General Public License as published by the Free Software Foundation,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# distribution. VirtualBox OSE is distributed in the hope that it will
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# be useful, but WITHOUT ANY WARRANTY of any kind.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#export DH_VERBOSE=1
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# possible overrides:
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# OSE=1 force VBOX_OSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# NOPARALLEL=1 compile with -j1
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# LINUX=<dir> compile vboxdrv against Linux found in <dir>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# VERBOSE=1 verbose build
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# DEBUG=1 debug build
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# NOSUBVER=1 disable generation of the sub-version field (which is
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# either the subversion rev [if available] or the build date)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# NODOCS=1 don't build docs, use precompiled UserManual.pdf and
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# NOMODS=1 don't build any module
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# NOQT=1 don't build the Qt GUI
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# HEADLESS=1 build the headless version
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# NOWEBSVC=1 don't build the webservice API, default for OSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# STAGEDISO=<path> don't build the VBoxAdditions, use the precompiled .iso
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# BLEEDING_EDGE=xyz
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinose := $(if $(OSE),1,$(if $(wildcard $(vboxroot)/src/VBox/RDP/server),,1))
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin ifeq ($(wildcard $(STAGEDISO)/VBoxGuestAdditions.iso),)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(error STAGEDISO='$(STAGEDISO)/VBoxGuestAdditions.iso' not found)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chindebrel := $(if $(shell which lsb_release),_$(shell lsb_release -si)_$(shell lsb_release -sc),unknown)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# shipping Linux kernel modules with bleeding-edge releases doesn't make sense
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chininstmod := $(if $(filter _Ubuntu_lucid _Debian_sid,$(debrel)),,1)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Locations of custom built Qt libraries (see below)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(if $(ose),--ose,) $(if $(LINUX),--with-linux=$(LINUX),) \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(if $(filter _Debian_etch,$(debrel)),$(if $(ose),,--build-libcurl),) \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(if $(filter _Debian_etch _Ubuntu_hardy,$(debrel)),--with-qt4-dir=$(qtstdc6)) \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin VBOX_PATH_PACKAGE_DOCS="\"/usr/share/doc/$(verpkg)\"" \
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 \
dh_gencontrol -- \