rules revision c7267e77a1f8b99136cc3dd57f7c381103edc4e5
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# Copyright (C) 2006-2008 Sun Microsystems, Inc.
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington# This file is part of VirtualBox Open Source Edition (OSE), as
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington# available from http://www.virtualbox.org. This file is free software;
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington# you can redistribute it and/or modify it under the terms of the GNU
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington# General Public License as published by the Free Software Foundation,
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# distribution. VirtualBox OSE is distributed in the hope that it will
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# be useful, but WITHOUT ANY WARRANTY of any kind.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#export DH_VERBOSE=1
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington# possible overrides:
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews# OSE=1 force VBOX_OSE
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington# NOPARALLEL=1 compile with -j1
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington# LINUX=<dir> compile vboxdrv against Linux found in <dir>
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington# VERBOSE=1 verbose build
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington# DEBUG=1 debug build
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein# NOSUBVER=1 disable generation of the sub-version field (which is
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein# either the subversion rev [if available] or the build date)
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington# NODOCS=1 don't build docs, use precompiled UserManual.pdf and
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington# NOMODS=1 don't build any module
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington# NOQT=1 don't build the Qt GUI
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington# HEADLESS=1 build the headless version
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington# STAGEDISO=<path> don't build the VBoxAdditions, use the precompiled .iso
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington ifeq ($(wildcard $(STAGEDISO)/VBoxGuestAdditions.iso),)
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington $(error STAGEDISO='$(STAGEDISO)/VBoxGuestAdditions.iso' not found)
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington# Hack: Xandros is actually Debian/sarge ... :(
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellingtonifneq ($(wildcard /etc/xandros-desktop-version),)
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington debrel := $(if $(shell which lsb_release),_$(shell lsb_release -si)_$(shell lsb_release -sc),unknown)
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellingtondebcfgs := VBOX_PATH_PACKAGE_DOCS="\"/usr/share/doc/$(verpkg)\""
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington# Ubuntu dapper: gcc-4.0 does not work with recompiler, use gcc-3.4 instead
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington# Ubuntu gutsy: gcc-4.1 does not work for the webservices, use gcc-4.2 instead
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews cd $(vboxroot) && ./configure --odir=$(current)/debian $(if \
3dfc806ddf433d0569340d9c4ccc5af8ec41a27bBrian Wellington $(ose),--ose,) $(if $(LINUX),--with-linux=$(LINUX),) $(if \
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington $(filter _Ubuntu_dapper,$(debrel)),--with-gcc=gcc-3.4 --with-g++=g++-3.4,) $(if \
$(debcfgs) \
$(debcfgs) \
dh_clean -k
sed \
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 \
dh_strip --keep-debug --exclude=libVBoxQtCore.so.4 --exclude=libVBoxQtGui.so.4 --exclude=libVBoxQtNetwork.so.4 --exclude=libqtaccessiblewidgets.so
for f in \
dh_gencontrol -- \