rules revision b1212d1cdc6c9396aa851ef0a5388edce69806ad
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# Copyright (C) 2006-2012 Oracle Corporation
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# This file is part of VirtualBox Open Source Edition (OSE), as
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# available from http://www.virtualbox.org. This file is free software;
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# you can redistribute it and/or modify it under the terms of the GNU
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# General Public License (GPL) as published by the Free Software
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# Foundation, in version 2 as it comes in the "COPYING" file of the
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# NOTE: if you make changes to this file, please check if the updates should
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# be also applied to the publicly visible debian/rules file.
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb#export DH_VERBOSE=1
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# possible overrides:
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# OSE=1 force VBOX_OSE
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# NOPARALLEL=1 compile with -j1
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# LINUX=<dir> compile vboxdrv against Linux found in <dir>
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# VERBOSE=1 verbose build
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# DEBUG=1 debug build
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# NOSUBVER=1 disable generation of the sub-version field (which is
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# either the subversion rev [if available] or the build date)
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# NODOCS=1 don't build docs, use precompiled UserManual.pdf and
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# NOMODS=1 don't build any module
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# NOQT=1 don't build the Qt GUI
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# EFI=1 include the EFI binary from prebuild
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# VERSUFFIX=<suffix> set a particular package version suffix (e.g. _customer)
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# HEADLESS=1 build the headless version
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# VNC=1 build VNC code
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# NOWEBSVC=1 don't build the webservice API, default for OSE
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# STAGEDISO=<path> don't build the VBoxAdditions, use the precompiled .iso
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# PKGDIR=<path> where to store the final package(s)
10db1377dafab8ba3feedef26db9c5d8539a5cd1gtb# BLEEDING_EDGE=xyz
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 -- \