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