rules revision 46e6cceda24bf6c589e4cb151afefe4fffecca7b
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync#!/usr/bin/make -f
9eb499828dd875d229531b50d05f016b8a1f1dd9vboxsync#export DH_VERBOSE=1
365b40dec2ed01d9983d29e276e7431c5a4a9c18vboxsyncexport DH_COMPAT=4
9eb499828dd875d229531b50d05f016b8a1f1dd9vboxsync
9eb499828dd875d229531b50d05f016b8a1f1dd9vboxsync# possible overrides:
9eb499828dd875d229531b50d05f016b8a1f1dd9vboxsync# OSE=1 force VBOX_OSE
9eb499828dd875d229531b50d05f016b8a1f1dd9vboxsync# NOPARALLEL=1 compile with -j1 (-j2 is default)
9eb499828dd875d229531b50d05f016b8a1f1dd9vboxsync# LINUX=<dir> compile vboxdrv against Linux found in <dir>
9eb499828dd875d229531b50d05f016b8a1f1dd9vboxsync# VERBOSE=1 verbose build
9eb499828dd875d229531b50d05f016b8a1f1dd9vboxsync# DEBUG=1 debug build
9eb499828dd875d229531b50d05f016b8a1f1dd9vboxsync# NOSUBVER=1 disable generation of the sub-version field (which is
9eb499828dd875d229531b50d05f016b8a1f1dd9vboxsync# either the subversion rev [if available] or the build date)
9eb499828dd875d229531b50d05f016b8a1f1dd9vboxsync# NODOCS=1 don't build docs, use precompiled UserManual.pdf and
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync# VirtualBox.chm from $HOME
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync# 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
7529922bd11d7d1c38fbdc7bad6aec83eb2ec0advboxsyncpackage := 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
8eb4989e815c8f374b965265ccf184d6ce17d9e8vboxsyncose := 1
bffb24521128f5183aafbef6542e7dacf20b5132vboxsyncNOMODS ?= $(ose)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncifneq ($(wildcard $(verfile)),)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncinclude $(verfile)
da6747c2419b9cea8b5e2c576a30a5de999a8ab3vboxsyncver := $(VBOX_VERSION_STRING)
da6747c2419b9cea8b5e2c576a30a5de999a8ab3vboxsyncarchdir := $(prefix)/opt/VirtualBox-$(ver)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncendif
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncifneq ($(STAGEDISO),)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncifeq ($(wildcard $(STAGEDISO)/VBoxGuestAdditions.iso),)
da6747c2419b9cea8b5e2c576a30a5de999a8ab3vboxsync$(error STAGEDISO='$(STAGEDISO)/VBoxGuestAdditions.iso' not found)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncendif
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncendif
46e6cceda24bf6c589e4cb151afefe4fffecca7bvboxsync
8eb4989e815c8f374b965265ccf184d6ce17d9e8vboxsync# Hack: Xandros is actually Debian/sarge ... :(
bffb24521128f5183aafbef6542e7dacf20b5132vboxsyncifneq ($(wildcard /etc/xandros-desktop-version),)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncdebrel := _xandros4.1
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncelse
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncifneq ($(wildcard /etc/univention),)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncdebrel := _ucs1.3
20b950300ed7ebcdf78f414c3d98b20d010ff74fvboxsyncelse
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncdebrel := $(if $(shell which lsb_release),_$(shell lsb_release -si)_$(shell lsb_release -sc),)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncendif
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncendif
7529922bd11d7d1c38fbdc7bad6aec83eb2ec0advboxsync
7529922bd11d7d1c38fbdc7bad6aec83eb2ec0advboxsyncdebdocs := VBOX_PATH_PACKAGE_DOCS="\"/usr/share/doc/virtualbox\""
7529922bd11d7d1c38fbdc7bad6aec83eb2ec0advboxsync
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
7529922bd11d7d1c38fbdc7bad6aec83eb2ec0advboxsync 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 \
7529922bd11d7d1c38fbdc7bad6aec83eb2ec0advboxsync $(filter _xandros4.1,$(debrel)),--build-xalan,) $(if \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(filter _xandros4.1 _ucs1.3,$(debrel)),--disable-sdl-ttf,) $(if \
7529922bd11d7d1c38fbdc7bad6aec83eb2ec0advboxsync $(HEADLESS),--build-headless,) $(if $(DEBUG),--build-debug,)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync touch debian/configure-stamp
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncbuild: debian/configure-stamp debian/build-stamp
da6747c2419b9cea8b5e2c576a30a5de999a8ab3vboxsyncdebian/build-stamp $(verfile):
0a724db1030736c131a45392c0ebb6bb25362917vboxsync dh_testdir
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync . debian/env.sh && kmk -C $(vboxroot) $(if \
13c94cb9d95cf4865646e86b944c09e1af2fe48cvboxsync $(VERBOSE),--print-directory,--no-print-directory) $(if \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(NOPARALLEL),-j1,-j2) $(if \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(VERBOSE),KBUILD_VERBOSE=2,) $(if \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(NODOCS),VBOX_WITH_DOCS=,)\
37a84692e27b34ed2141b208bf3ab7f9f90bb422vboxsync $(if $(STAGEDISO),\
bffb24521128f5183aafbef6542e7dacf20b5132vboxsync VBOX_WITH_LINUX_ADDITIONS= VBOX_WITH_WIN32_ADDITIONS=,) \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync AUTOCFG=$(current)/debian/AutoConfig.kmk \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync LOCALCFG=$(current)/debian/LocalConfig.kmk \
13c94cb9d95cf4865646e86b944c09e1af2fe48cvboxsync PATH_OUT=$(current)/debian/builddir \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync VBOX_DO_STRIP= VBOX_DO_STRIP_MODULES= \
ad34209dccf31d54e2277d732a90ce6ea4374362vboxsync $(debdocs) \
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 \
7529922bd11d7d1c38fbdc7bad6aec83eb2ec0advboxsync $(VERBOSE),KBUILD_VERBOSE=2,) $(if \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(STAGEDISO),\
7529922bd11d7d1c38fbdc7bad6aec83eb2ec0advboxsync VBOX_WITH_LINUX_ADDITIONS= VBOX_WITH_WIN32_ADDITIONS=,) \
27efd9329f6a90f7cacf840031e5305f98975960vboxsync AUTOCFG=$(current)/debian/AutoConfig.kmk \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync LOCALCFG=$(current)/debian/LocalConfig.kmk \
ad34209dccf31d54e2277d732a90ce6ea4374362vboxsync PATH_OUT=$(current)/debian/builddir \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync VBOX_DO_STRIP= VBOX_DO_STRIP_MODULES= \
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync $(debdocs) \
da6747c2419b9cea8b5e2c576a30a5de999a8ab3vboxsync 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: debian/build-stamp
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync rm -rf $(moddir)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync mkdir $(moddir)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync make -C $(builddir)/bin/src clean
27efd9329f6a90f7cacf840031e5305f98975960vboxsync for d in $(wildcard /lib/modules/*); do \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync make -C $(builddir)/bin/src KERN_DIR=$$d/build MODULE_DIR=$$d clean all && \
ad34209dccf31d54e2277d732a90ce6ea4374362vboxsync install -D -m 0644 -g 0 -o 0 \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(builddir)/bin/src/vboxdrv.ko $(moddir)/$$(basename $$d)/vboxdrv.ko; \
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync done
27efd9329f6a90f7cacf840031e5305f98975960vboxsync make -C $(builddir)/bin/src clean
da6747c2419b9cea8b5e2c576a30a5de999a8ab3vboxsync touch debian/modules-stamp
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsyncclean:
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_testdir
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_testroot
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync rm -f debian/$(package).init debian/vboxdrv.init debian/vboxnet.init
20b950300ed7ebcdf78f414c3d98b20d010ff74fvboxsync rm -f debian/AutoConfig.kmk debian/configure.log debian/env.sh
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync rm -f debian/modules-stamp debian/build-stamp debian/configure-stamp
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync rm -rf $(builddir) $(moddir)
7529922bd11d7d1c38fbdc7bad6aec83eb2ec0advboxsync dh_clean
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync
27efd9329f6a90f7cacf840031e5305f98975960vboxsyncifeq ($(VBOX_VERSION_MAJOR),)
7529922bd11d7d1c38fbdc7bad6aec83eb2ec0advboxsyncbinary binary-arch binary-indep: build $(verfile)
a0a9f39e8864357c2e1e61106958411240f5bf6bvboxsync $(MAKE) -f debian/rules binary
a0a9f39e8864357c2e1e61106958411240f5bf6bvboxsyncelse
a0a9f39e8864357c2e1e61106958411240f5bf6bvboxsync# Build architecture-dependent files here.
a0a9f39e8864357c2e1e61106958411240f5bf6bvboxsyncbinary binary-arch binary-indep: build $(if $(NOMODS),,modules)
a0a9f39e8864357c2e1e61106958411240f5bf6bvboxsync dh_testdir
a0a9f39e8864357c2e1e61106958411240f5bf6bvboxsync dh_testroot
27efd9329f6a90f7cacf840031e5305f98975960vboxsync dh_clean -k
7529922bd11d7d1c38fbdc7bad6aec83eb2ec0advboxsync dh_installdirs
27efd9329f6a90f7cacf840031e5305f98975960vboxsync tar -xjC $(prefix)/opt -f $(builddir)/bin/VirtualBox.tar.bz2
27efd9329f6a90f7cacf840031e5305f98975960vboxsync install -d -g 0 -o 0 $(prefix)/usr/share/applications
7529922bd11d7d1c38fbdc7bad6aec83eb2ec0advboxsync install -d -g 0 -o 0 $(prefix)/usr/lib
a0a9f39e8864357c2e1e61106958411240f5bf6bvboxsync install -d -g 0 -o 0 $(prefix)/usr/bin
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync install -d -g 0 -o 0 $(prefix)/usr/lib/$(package)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync install -d -g 0 -o 0 $(prefix)/usr/share/$(package)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync install -d -g 0 -o 0 $(prefix)/usr/share/doc/$(package)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(if $(HEADLESS),,mv $(archdir)/VirtualBox.desktop \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(prefix)/usr/share/applications/VirtualBox.desktop)
03e380b03da26ad4a2309190f35ba86843d3d824vboxsync install -d -g 0 -o 0 $(prefix)/usr/share/pixmaps
c38d5dda76cee141ae524ccce2c513178be1b87cvboxsync install -D -g 0 -o 0 -m 644 debian/lintian-override \
69f57565f5243a46f1df060b63d0fd830de3be04vboxsync $(prefix)/usr/share/lintian/overrides/$(package)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync mv $(archdir)/VBox.png \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(prefix)/usr/share/pixmaps/VBox.png
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync mv $(archdir)/*.gc $(prefix)/usr/lib/$(package)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync mv $(archdir)/*.r0 $(prefix)/usr/lib/$(package)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(if $(filter amd64,$(arch)),\
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync mv $(archdir)/VBoxREM2.rel $(prefix)/usr/lib/$(package),)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync mv $(archdir)/VBoxXPCOMIPCD $(prefix)/usr/lib/$(package)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync mv $(archdir)/components $(prefix)/usr/lib/$(package)/components
8eb4989e815c8f374b965265ccf184d6ce17d9e8vboxsync mv $(archdir)/*.so $(prefix)/usr/lib
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync mv $(archdir)/sdk $(prefix)/usr/share/$(package)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $(if $(HEADLESS),,mv $(archdir)/nls $(prefix)/usr/share/$(package))
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync mv $(archdir)/src $(prefix)/usr/share/$(package)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync rm $(archdir)/VBox.sh
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync install -D -g 0 -o 0 -m 644 debian/VBox.sh $(prefix)/usr/bin/VBox
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync mv $(archdir)/VBoxSysInfo.sh $(prefix)/usr/share/$(package)
4726db8b47db329039ce8f8e13ecd2c1f696fa60vboxsync mv $(archdir)/VBoxAddIF.sh $(prefix)/usr/bin/VBoxTAP
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync for i in VBoxManage VBoxSVC tstVMM $(if $(HEADLESS),,VBoxSDL) \
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync $(if $(HEADLESS),,VirtualBox) $(if $(ose),,VBoxVRDP); do \
bbfc28b1a00ce00001b2ead074d47254bec3e5cfvboxsync mv $(archdir)/$$i $(prefix)/usr/lib/$(package); done
da6747c2419b9cea8b5e2c576a30a5de999a8ab3vboxsync mv $(archdir)/VBoxTunctl $(prefix)/usr/bin
bffb24521128f5183aafbef6542e7dacf20b5132vboxsync $(if $(NOMODS),,for d in $(moddir)/*; do \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync install -D -g 0 -o 0 -m 0644 \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync $$d/vboxdrv.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxdrv.ko; done)
097b3079a919c94052ca642306232b856949c755vboxsyncifeq ($(ose),)
097b3079a919c94052ca642306232b856949c755vboxsync $(if $(HEADLESS),,mv $(archdir)/kchmviewer $(prefix)/usr/lib/$(package))
097b3079a919c94052ca642306232b856949c755vboxsync dh_installdocs $(addprefix $(archdir)/,\
097b3079a919c94052ca642306232b856949c755vboxsync UserManual.pdf VirtualBox.chm LICENSE)
097b3079a919c94052ca642306232b856949c755vboxsync rm $(addprefix $(archdir)/,UserManual.pdf VirtualBox.chm LICENSE)
20b950300ed7ebcdf78f414c3d98b20d010ff74fvboxsync for i in rdesktop-vrdp.tar.gz additions/VBoxGuestAdditions.iso; do \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync mv $(archdir)/$$i $(prefix)/usr/share/$(package); done
20b950300ed7ebcdf78f414c3d98b20d010ff74fvboxsync rmdir $(archdir)/additions
20b950300ed7ebcdf78f414c3d98b20d010ff74fvboxsyncelse
6e2490fe643cb292ee8e37f9e1d7171e9315129cvboxsync dh_installdocs
20b950300ed7ebcdf78f414c3d98b20d010ff74fvboxsyncendif
20b950300ed7ebcdf78f414c3d98b20d010ff74fvboxsync rmdir $(archdir)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync rmdir $(prefix)/opt
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync dh_link \
bffb24521128f5183aafbef6542e7dacf20b5132vboxsync $(if $(HEADLESS),,usr/bin/VBox usr/bin/VirtualBox) \
20b950300ed7ebcdf78f414c3d98b20d010ff74fvboxsync usr/bin/VBox usr/bin/VBoxManage \
20b950300ed7ebcdf78f414c3d98b20d010ff74fvboxsync $(if $(HEADLESS),,usr/bin/VBox usr/bin/VBoxSDL) \
9d473abea9a9b6597b2b20bedc950ba33a2e73a5vboxsync $(if $(ose),,usr/bin/VBox usr/bin/VBoxVRDP) \
7e958a4329e4f9d83f597e26c72121969091e87bvboxsync usr/bin/VBoxTAP usr/bin/VBoxAddIF \
f3f687b00a9f7c98dc0b81899090bc5f659ae7bdvboxsync usr/bin/VBoxTAP usr/bin/VBoxDeleteIF
13c94cb9d95cf4865646e86b944c09e1af2fe48cvboxsync dh_desktop
20b950300ed7ebcdf78f414c3d98b20d010ff74fvboxsync dh_installmenu
13c94cb9d95cf4865646e86b944c09e1af2fe48cvboxsync $(if $(NOMODS),,dh_installmodules)
13c94cb9d95cf4865646e86b944c09e1af2fe48cvboxsync sed -e 's|%NOLSB%|$(if $(filter _Debian_sarge ucs1.3,$(debrel)),yes,)|g;' \
20b950300ed7ebcdf78f414c3d98b20d010ff74fvboxsync debian/vboxdrv.init.tmpl > debian/vboxdrv.init
8eb4989e815c8f374b965265ccf184d6ce17d9e8vboxsync sed -e 's|%NOLSB%|$(if $(filter _Debian_sarge,$(debrel)),yes,)|g;' \
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync debian/vboxnet.init.tmpl > debian/vboxnet.init
a0a9f39e8864357c2e1e61106958411240f5bf6bvboxsync dh_installinit --name=vboxdrv
a0a9f39e8864357c2e1e61106958411240f5bf6bvboxsync dh_installinit --name=vboxnet
7529922bd11d7d1c38fbdc7bad6aec83eb2ec0advboxsync if [ "$(debrel)" = "_Ubuntu_dapper" -o "$(debrel)" = "_Debian_sarge" ]; then \
a0a9f39e8864357c2e1e61106958411240f5bf6bvboxsync cat debian/postrm.dapper > debian/postrm; fi
8eb4989e815c8f374b965265ccf184d6ce17d9e8vboxsync dh_installdebconf
bffb24521128f5183aafbef6542e7dacf20b5132vboxsync dh_installchangelogs
7529922bd11d7d1c38fbdc7bad6aec83eb2ec0advboxsync dh_link
a0a9f39e8864357c2e1e61106958411240f5bf6bvboxsync dh_strip --keep-debug
a0a9f39e8864357c2e1e61106958411240f5bf6bvboxsync # manually strip our R0/GC modules, dh_strip cannot handle them
7529922bd11d7d1c38fbdc7bad6aec83eb2ec0advboxsync for f in \
8eb4989e815c8f374b965265ccf184d6ce17d9e8vboxsync $(prefix)/usr/lib/$(package)/*.r0 $(prefix)/usr/lib/$(package)/*.gc; do \
20b950300ed7ebcdf78f414c3d98b20d010ff74fvboxsync objcopy --only-keep-debug \
20b950300ed7ebcdf78f414c3d98b20d010ff74fvboxsync $$f \
7529922bd11d7d1c38fbdc7bad6aec83eb2ec0advboxsync $(prefix)/usr/lib/debug/usr/lib/$(package)/`basename $$f`; \
ad34209dccf31d54e2277d732a90ce6ea4374362vboxsync strip -S --remove-section=.comment $$f; \
ad34209dccf31d54e2277d732a90ce6ea4374362vboxsync objcopy --add-gnu-debuglink=$(prefix)/usr/lib/debug/usr/lib/$(package)/`basename $$f` $$f; \
8eb4989e815c8f374b965265ccf184d6ce17d9e8vboxsync done
20b950300ed7ebcdf78f414c3d98b20d010ff74fvboxsync mkdir -p $(current)/debian/$(package)-dbg/usr/lib
9d473abea9a9b6597b2b20bedc950ba33a2e73a5vboxsync mv $(current)/debian/$(package)/usr/lib/debug $(current)/debian/$(package)-dbg/usr/lib
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_compress -X.pdf -X.chm -X LICENSE
bffb24521128f5183aafbef6542e7dacf20b5132vboxsync dh_fixperms
a0a9f39e8864357c2e1e61106958411240f5bf6bvboxsync dh_makeshlibs
a0a9f39e8864357c2e1e61106958411240f5bf6bvboxsync dh_installdeb
a0a9f39e8864357c2e1e61106958411240f5bf6bvboxsync dh_perl
a0a9f39e8864357c2e1e61106958411240f5bf6bvboxsync dh_shlibdeps
5c7a628b8077efd9a3049538f6e7f470d8afb9b3vboxsync dh_gencontrol -- \
a0a9f39e8864357c2e1e61106958411240f5bf6bvboxsync -Valsa=$(if $(HEADLESS),,libasound2) \
a0a9f39e8864357c2e1e61106958411240f5bf6bvboxsync -Vsdlttf=$(if $(HEADLESS),,libsdl-ttf2.0-0)
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_md5sums
6be66de4257f4f564e35f7b8ee57a282e3cf3e96vboxsync dh_builddeb
8eb4989e815c8f374b965265ccf184d6ce17d9e8vboxsyncendif
7529922bd11d7d1c38fbdc7bad6aec83eb2ec0advboxsync
7529922bd11d7d1c38fbdc7bad6aec83eb2ec0advboxsync.PHONY: binary modules binary-arch binary-indep clean checkroot
7529922bd11d7d1c38fbdc7bad6aec83eb2ec0advboxsync