rules revision a48f6e21f8737ef47d30d716171ae2bcb10c3382
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# Copyright (C) 2006-2012 Oracle Corporation
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# available from http://www.virtualbox.org. This file is free software;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# you can redistribute it and/or modify it under the terms of the GNU
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# General Public License (GPL) as published by the Free Software
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# NOTE: if you make changes to this file, please check if the updates should
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# be also applied to the publicly visible debian/rules file.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#export DH_VERBOSE=1
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# possible overrides:
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# OSE=1 force VBOX_OSE
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# NOPARALLEL=1 compile with -j1
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# LINUX=<dir> compile vboxdrv against Linux found in <dir>
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# VERBOSE=1 verbose build
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# DEBUG=1 debug build
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# NOSUBVER=1 disable generation of the sub-version field (which is
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# either the subversion rev [if available] or the build date)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# NODOCS=1 don't build docs, use precompiled UserManual.pdf and
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# NOMODS=1 don't build any module
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# NOQT=1 don't build the Qt GUI
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# EFI=1 include the EFI binary from prebuild
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# VERSUFFIX=<suffix> set a particular package version suffix (e.g. _customer)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# HEADLESS=1 build the headless version
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# VNC=1 build VNC code
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# NOWEBSVC=1 don't build the webservice API, default for OSE
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# STAGEDISO=<path> don't build the VBoxAdditions, use the precompiled .iso
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# PKGDIR=<path> where to store the final package(s)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# BLEEDING_EDGE=xyz
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncpkgdir := $(if $(PKGDIR),$(PKGDIR),$(shell cd ../../../../..; pwd))
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncose := $(if $(OSE),1,$(if $(wildcard $(vboxroot)/src/VBox/RDP/server),,1))
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncNOWINE := $(if $(NODOCS),$(if $(STAGEDISO),1,),)$(ose)
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncsvnver := $(if $(NOSUBVER),,$(if $(svn_revision),-$(svn_revision),$(shell if \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync svn info|sed -e "s/^Revision: \(.*\)/-\1/;t;d"; else \
debver :=$(subst _ALPHA,~alpha,$(subst _BETA,~beta,$(subst _RC,~rc,$(subst _OSE,~ose,$(ver)))))$(svnver)$(if \
debrel := $(if $(shell which lsb_release),_$(shell lsb_release -si)_$(shell lsb_release -sc),unknown)
instmod := $(if $(filter _Ubuntu_lucid _Ubuntu_maverick _Ubuntu_natty _Ubuntu_oneiric _Debian_sid,$(debrel)),,1)
rm -f debian/vboxballoonctrl-service.init debian/vboxautostart-service.init debian/vboxweb-service.init
dh_clean -k
sed \
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 \
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 \
# for some reason, the Qt libraries couldn't be found on newer releases (e.g. Ubuntu hardy)
dh_gencontrol -- \