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