rules revision bbfc28b1a00ce00001b2ead074d47254bec3e5cf
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync#!/usr/bin/make -f
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync#export DH_VERBOSE=1
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncexport DH_COMPAT=4
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync# possible overrides:
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync# OSE=1 force VBOX_OSE
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync# NOPARALLEL=1 compile with -j1 (-j2 is default)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync# LINUX=<dir> compile vboxdrv against Linux found in <dir>
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync# VERBOSE=1 verbose build
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync# DEBUG=1 debug build
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync# NOSUBVER=1 disable generation of the sub-version field (which is
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync# either the subversion rev [if available] or the build date)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync# NODOCS=1 don't build docs, use precompiled UserManual.pdf and
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync# VirtualBox.chm from $HOME
8eb4989e815c8f374b965265ccf184d6ce17d9e8vboxsync# NOMODS=1 don't build any module
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync# HEADLESS=1 build the headless version
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync# STAGEDISO=<path> don't build the VBoxAdditions, use the precompiled .iso
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsyncpackage := virtualbox-ose
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsynccurrent := $(shell pwd)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncvboxroot := $(shell pwd)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncbuilddir := $(current)/debian/builddir
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncmoddir := $(current)/debian/modules
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncprefix := $(current)/debian/$(package)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncarch := $(shell dpkg --print-architecture)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncverfile := $(builddir)/version-generated.mk
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncose := $(if $(OSE),1,$(if $(wildcard $(vboxroot)/src/VBox/Devices/USB),,1))
8eb4989e815c8f374b965265ccf184d6ce17d9e8vboxsyncNOMODS ?= $(ose)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncifneq ($(wildcard $(verfile)),)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncinclude $(verfile)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncver := $(VBOX_VERSION_STRING)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncendif
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncifneq ($(STAGEDISO),)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncifeq ($(wildcard $(STAGEDISO)/VBoxGuestAdditions.iso),)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync$(error STAGEDISO='$(STAGEDISO)/VBoxGuestAdditions.iso' not found)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncendif
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncendif
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync# Hack: Xandros is actually Debian/sarge ... :(
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncifneq ($(wildcard /etc/xandros-desktop-version),)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncdebrel := _xandros4.1
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncelse
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncifneq ($(wildcard /etc/univention),)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncdebrel := _ucs1.3
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncelse
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncdebrel := $(if $(shell which lsb_release),_$(shell lsb_release -si)_$(shell lsb_release -sc),)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncendif
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncendif
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync# Ubuntu dapper: gcc-4.0 does not work with recompiler, use gcc-3.4 instead
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncconfigure: debian/configure-stamp
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncdebian/configure-stamp:
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_testdir
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync cd $(vboxroot) && ./configure --odir=$(current)/debian $(if \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(ose),--ose,) $(if $(LINUX),--with-linux=$(LINUX),) $(if \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(filter _Ubuntu_dapper,$(debrel)),--with-gcc=gcc-3.4 --with-g++=g++-3.4,) $(if \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(filter _xandros4.1,$(debrel)),--build-xalan,) $(if \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(filter _xandros4.1 _ucs1.3,$(debrel)),--disable-sdl-ttf,) $(if \
ad34209dccf31d54e2277d732a90ce6ea4374362vboxsync $(HEADLESS),--build-headless,) $(if $(DEBUG),--build-debug,)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync touch debian/configure-stamp
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncbuild: debian/configure-stamp debian/build-stamp
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncdebian/build-stamp $(verfile):
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_testdir
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync . debian/env.sh && kmk -C $(vboxroot) $(if \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(VERBOSE),--print-directory,--no-print-directory) $(if \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(NOPARALLEL),-j1,-j2) $(if \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(VERBOSE),KBUILD_VERBOSE=2,) $(if \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(NODOCS),VBOX_WITH_DOCS=,)\
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(if $(STAGEDISO),\
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync VBOX_WITH_LINUX_ADDITIONS= VBOX_WITH_WIN32_ADDITIONS=,) \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync AUTOCFG=$(current)/debian/AutoConfig.kmk \
ad34209dccf31d54e2277d732a90ce6ea4374362vboxsync LOCALCFG=$(current)/debian/LocalConfig.kmk \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync PATH_OUT=$(current)/debian/builddir \
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync VBOX_DO_STRIP= VBOX_DO_STRIP_MODULES= \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync all
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(if $(NODOCS),cp $(vboxroot)/prebuild/UserManual.pdf $(builddir)/bin,)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(if $(NODOCS),cp $(vboxroot)/prebuild/VirtualBox.chm $(builddir)/bin,)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync mkdir -p $(builddir)/bin/additions
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(if $(STAGEDISO),cp $(STAGEDISO)/VBoxGuestAdditions.iso $(builddir)/bin/additions,)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync . debian/env.sh && kmk -C $(vboxroot) $(if \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(VERBOSE),--print-directory,--no-print-directory) $(if \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(VERBOSE),KBUILD_VERBOSE=2,) $(if \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(STAGEDISO),\
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync VBOX_WITH_LINUX_ADDITIONS= VBOX_WITH_WIN32_ADDITIONS=,) \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync AUTOCFG=$(current)/debian/AutoConfig.kmk \
ad34209dccf31d54e2277d732a90ce6ea4374362vboxsync LOCALCFG=$(current)/debian/LocalConfig.kmk \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync PATH_OUT=$(current)/debian/builddir \
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync VBOX_DO_STRIP= VBOX_DO_STRIP_MODULES= \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync packing
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync touch debian/build-stamp
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync# Build modules for every kernel we find in /lib/modules/*
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncmodules: debian/build-stamp debian/modules-stamp
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncdebian/modules-stamp:
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync rm -rf $(moddir)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync mkdir $(moddir)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync make -C $(builddir)/bin/src clean
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync for d in $(wildcard /lib/modules/*); do \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync make -C $(builddir)/bin/src KERN_DIR=$$d/build MODULE_DIR=$$d clean all && \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync install -D -m 0644 -g 0 -o 0 \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(builddir)/bin/src/vboxdrv.ko $(moddir)/$$(basename $$d)/vboxdrv.ko; \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync done
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync make -C $(builddir)/bin/src clean
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync touch debian/modules-stamp
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncclean:
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_testdir
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_testroot
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync rm -f debian/$(package).init debian/vboxdrv.init
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync rm -f debian/AutoConfig.kmk debian/configure.log debian/env.sh
69f57565f5243a46f1df060b63d0fd830de3be04vboxsync rm -f debian/modules-stamp debian/build-stamp debian/configure-stamp
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync rm -rf $(builddir) $(moddir)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_clean
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncifeq ($(VBOX_VERSION_MAJOR),)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncbinary binary-arch binary-indep: build $(verfile)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(MAKE) -f debian/rules binary
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncelse
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync# Build architecture-dependent files here.
8eb4989e815c8f374b965265ccf184d6ce17d9e8vboxsyncbinary binary-arch binary-indep: build $(if $(NOMODS),,modules)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_testdir
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_testroot
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_clean -k
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_installdirs
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync tar -xjC $(prefix)/opt -f $(builddir)/bin/VirtualBox.tar.bz2
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync install -d -g 0 -o 0 $(prefix)/usr/share/applications
4726db8b47db329039ce8f8e13ecd2c1f696fa60vboxsync install -d -g 0 -o 0 $(prefix)/usr/lib
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync install -d -g 0 -o 0 $(prefix)/usr/bin
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync install -d -g 0 -o 0 $(prefix)/usr/lib/$(package)
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync install -d -g 0 -o 0 $(prefix)/usr/share/$(package)
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync install -d -g 0 -o 0 $(prefix)/usr/share/doc/$(package)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(if $(HEADLESS),,mv $(prefix)/opt/VirtualBox-$(ver)/VirtualBox.desktop \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(prefix)/usr/share/applications/VirtualBox.desktop)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync install -d -g 0 -o 0 $(prefix)/usr/share/pixmaps
9d473abea9a9b6597b2b20bedc950ba33a2e73a5vboxsync install -D -g 0 -o 0 -m 644 debian/lintian-override \
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync $(prefix)/usr/share/lintian/overrides/$(package)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync mv $(prefix)/opt/VirtualBox-$(ver)/VBox.png \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(prefix)/usr/share/pixmaps/VBox.png
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync mv $(prefix)/opt/VirtualBox-$(ver)/*.gc $(prefix)/usr/lib/$(package)
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync mv $(prefix)/opt/VirtualBox-$(ver)/*.r0 $(prefix)/usr/lib/$(package)
ad34209dccf31d54e2277d732a90ce6ea4374362vboxsync $(if $(filter amd64,$(arch)),\
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync mv $(prefix)/opt/VirtualBox-$(ver)/VBoxREM2.rel $(prefix)/usr/lib/$(package),)
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync mv $(prefix)/opt/VirtualBox-$(ver)/VBoxXPCOMIPCD $(prefix)/usr/lib/$(package)
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync mv $(prefix)/opt/VirtualBox-$(ver)/components $(prefix)/usr/lib/$(package)/components
4726db8b47db329039ce8f8e13ecd2c1f696fa60vboxsync mv $(prefix)/opt/VirtualBox-$(ver)/*.so $(prefix)/usr/lib
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync mv $(prefix)/opt/VirtualBox-$(ver)/sdk $(prefix)/usr/share/$(package)
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync $(if $(HEADLESS),,mv $(prefix)/opt/VirtualBox-$(ver)/nls $(prefix)/usr/share/$(package))
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync mv $(prefix)/opt/VirtualBox-$(ver)/src $(prefix)/usr/share/$(package)
9d473abea9a9b6597b2b20bedc950ba33a2e73a5vboxsync rm $(prefix)/opt/VirtualBox-$(ver)/VBox.sh
9d473abea9a9b6597b2b20bedc950ba33a2e73a5vboxsync install -D -g 0 -o 0 -m 644 debian/VBox.sh $(prefix)/usr/bin/VBox
9d473abea9a9b6597b2b20bedc950ba33a2e73a5vboxsync mv $(prefix)/opt/VirtualBox-$(ver)/VBoxAddIF.sh $(prefix)/usr/bin/VBoxTAP
dbfd74deae3cf437ea7b2ee06a74cc65a0901eacvboxsync for i in VBoxManage VBoxSVC tstVMM $(if $(HEADLESS),,VBoxSDL) \
9d473abea9a9b6597b2b20bedc950ba33a2e73a5vboxsync $(if $(HEADLESS),,VirtualBox) $(if $(ose),,VBoxVRDP); do \
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync mv $(prefix)/opt/VirtualBox-$(ver)/$$i $(prefix)/usr/lib/$(package); done
8eb4989e815c8f374b965265ccf184d6ce17d9e8vboxsync mv $(prefix)/opt/VirtualBox-$(ver)/VBoxTunctl $(prefix)/usr/bin
8eb4989e815c8f374b965265ccf184d6ce17d9e8vboxsync $(if $(NOMODS),,for d in $(moddir)/*; do \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync install -D -g 0 -o 0 -m 0644 \
17a9bf5bda28580b3163cf1e2fb8b13c356b5fb0vboxsync $$d/vboxdrv.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxdrv.ko; done)
8eb4989e815c8f374b965265ccf184d6ce17d9e8vboxsyncifeq ($(ose),)
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync $(if $(HEADLESS),,mv $(prefix)/opt/VirtualBox-$(ver)/kchmviewer $(prefix)/usr/lib/$(package))
ad34209dccf31d54e2277d732a90ce6ea4374362vboxsync dh_installdocs $(addprefix $(prefix)/opt/VirtualBox-$(ver)/,\
ad34209dccf31d54e2277d732a90ce6ea4374362vboxsync UserManual.pdf VirtualBox.chm LICENSE)
ad34209dccf31d54e2277d732a90ce6ea4374362vboxsync rm $(addprefix $(prefix)/opt/VirtualBox-$(ver)/,UserManual.pdf VirtualBox.chm LICENSE)
8eb4989e815c8f374b965265ccf184d6ce17d9e8vboxsync for i in rdesktop-vrdp.tar.gz additions/VBoxGuestAdditions.iso; do \
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync mv $(prefix)/opt/VirtualBox-$(ver)/$$i $(prefix)/usr/share/$(package); done
8eb4989e815c8f374b965265ccf184d6ce17d9e8vboxsync rmdir $(prefix)/opt/VirtualBox-$(ver)/additions
ad34209dccf31d54e2277d732a90ce6ea4374362vboxsyncelse
ad34209dccf31d54e2277d732a90ce6ea4374362vboxsync dh_installdocs
8eb4989e815c8f374b965265ccf184d6ce17d9e8vboxsyncendif
9d473abea9a9b6597b2b20bedc950ba33a2e73a5vboxsync rmdir $(prefix)/opt/VirtualBox-$(ver)
9d473abea9a9b6597b2b20bedc950ba33a2e73a5vboxsync rmdir $(prefix)/opt
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_link \
9d473abea9a9b6597b2b20bedc950ba33a2e73a5vboxsync $(if $(HEADLESS),,usr/bin/VBox usr/bin/VirtualBox) \
9d473abea9a9b6597b2b20bedc950ba33a2e73a5vboxsync usr/bin/VBox usr/bin/VBoxManage \
9d473abea9a9b6597b2b20bedc950ba33a2e73a5vboxsync $(if $(HEADLESS),,usr/bin/VBox usr/bin/VBoxSDL) \
9d473abea9a9b6597b2b20bedc950ba33a2e73a5vboxsync $(if $(ose),,usr/bin/VBox usr/bin/VBoxVRDP) \
9d473abea9a9b6597b2b20bedc950ba33a2e73a5vboxsync usr/bin/VBoxTAP usr/bin/VBoxAddIF \
9d473abea9a9b6597b2b20bedc950ba33a2e73a5vboxsync usr/bin/VBoxTAP usr/bin/VBoxDeleteIF
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_desktop
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_installmenu
8eb4989e815c8f374b965265ccf184d6ce17d9e8vboxsync $(if $(NOMODS),,dh_installmodules)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync sed -e 's|%NOLSB%|$(if $(filter _Debian_sarge ucs1.3,$(debrel)),yes,)|g;' \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync debian/vboxdrv.init.tmpl > debian/vboxdrv.init
0b1397fff8b368cf5c2f3d8f5b312ed00114977dvboxsync sed -e 's|%NOLSB%|$(if $(filter _Debian_sarge,$(debrel)),yes,)|g;' \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync debian/vboxnet.init.tmpl > debian/vboxnet.init
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_installinit --name=vboxdrv
0b1397fff8b368cf5c2f3d8f5b312ed00114977dvboxsync dh_installinit --name=vboxnet
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync if [ "$(debrel)" = "_Ubuntu_dapper" -o "$(debrel)" = "_Debian_sarge" ]; then \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync cat debian/postrm.dapper > debian/postrm; fi
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_installdebconf
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_installchangelogs
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_link
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync dh_strip --keep-debug
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync # manually strip our R0/GC modules, dh_strip cannot handle them
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync for f in \
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync $(prefix)/usr/lib/$(package)/*.r0 $(prefix)/usr/lib/$(package)/*.gc; do \
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync objcopy --only-keep-debug \
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync $$f \
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync $(prefix)/usr/lib/debug/usr/lib/$(package)/`basename $$f`; \
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync strip -S --remove-section=.comment $$f; \
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync objcopy --add-gnu-debuglink=$(prefix)/usr/lib/debug/usr/lib/$(package)/`basename $$f` $$f; \
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync done
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync mkdir -p $(current)/debian/$(package)-dbg/usr/lib
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync mv $(current)/debian/$(package)/usr/lib/debug $(current)/debian/$(package)-dbg/usr/lib
ad34209dccf31d54e2277d732a90ce6ea4374362vboxsync dh_compress -X.pdf -X.chm -X LICENSE
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_fixperms
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_makeshlibs
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_installdeb
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_perl
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_shlibdeps
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_gencontrol
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_md5sums
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_builddeb
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncendif
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync.PHONY: binary modules binary-arch binary-indep clean checkroot