rules revision 46888b0c9f72cc9089f1a92b0476a1e8d637efce
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#!/usr/bin/make -f
1fdd2470b625a58b57d0b155e6caf8c4fc0afe8aAutomatic Updater#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Copyright (C) 2006-2012 Oracle Corporation
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# This file is part of VirtualBox Open Source Edition (OSE), as
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# available from http://www.virtualbox.org. This file is free software;
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# you can redistribute it and/or modify it under the terms of the GNU
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# General Public License (GPL) as published by the Free Software
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Foundation, in version 2 as it comes in the "COPYING" file of the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#export DH_VERBOSE=1
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsexport DH_COMPAT=4
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# possible overrides:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# OSE=1 force VBOX_OSE
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# NOPARALLEL=1 compile with -j1
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# LINUX=<dir> compile vboxdrv against Linux found in <dir>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# VERBOSE=1 verbose build
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews# DEBUG=1 debug build
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# NOSUBVER=1 disable generation of the sub-version field (which is
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# either the subversion rev [if available] or the build date)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# NODOCS=1 don't build docs, use precompiled UserManual.pdf and
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# VirtualBox.chm from $HOME
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# NOMODS=1 don't build any module
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# NOQT=1 don't build the Qt GUI
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# EFI=1 include the EFI binary from prebuild
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# HEADLESS=1 build the headless version
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# VNC=1 build VNC code
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# NOWEBSVC=1 don't build the webservice API, default for OSE
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# STAGEDISO=<path> don't build the VBoxAdditions, use the precompiled .iso
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# PKGDIR=<path> where to store the final package(s)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# BLEEDING_EDGE=xyz
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewspackage := virtualbox
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsverpkg := virtualbox-ose
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewscurrent := $(shell pwd)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsvboxroot := $(shell pwd)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewspkgdir := $(if $(PKGDIR),$(PKGDIR),$(shell cd ..; pwd))
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsbuilddir := $(vboxroot)/out/debian/builddir
cedb0bd0c1e3c461b7e479a16d3adfd5b150f1f4Mark Andrewsmoddir := $(vboxroot)/out/debian/modules
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsprefix := $(current)/debian/$(verpkg)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsarch := $(shell dpkg --print-architecture)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsverfile := $(builddir)/version-generated.mk
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsose := $(if $(OSE),1,$(if $(wildcard $(vboxroot)/src/VBox/RDP/server),,1))
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsNOMODS ?= $(ose)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsNOQT ?= $(HEADLESS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsNOWEBSVC ?= $(ose)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsNOWINE := $(if $(NODOCS),$(if $(STAGEDISO),1,),)$(ose)
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsifneq ($(wildcard $(verfile)),)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude $(verfile)
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrewsver := $(VBOX_VERSION_STRING)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsarchdir := $(prefix)/opt/VirtualBox-$(ver)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsendif
922312472e2e05ebc64993d465999c5351b83036Automatic Updater
922312472e2e05ebc64993d465999c5351b83036Automatic Updaterifneq ($(STAGEDISO),)
922312472e2e05ebc64993d465999c5351b83036Automatic Updater ifeq ($(wildcard $(STAGEDISO)/VBoxGuestAdditions.iso),)
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont $(error STAGEDISO='$(STAGEDISO)/VBoxGuestAdditions.iso' not found)
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont endif
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontendif
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsdebrel := $(if $(shell which lsb_release),_$(shell lsb_release -si)_$(shell lsb_release -sc),unknown)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
2cbb4ab75757fbb656997a82c14ca07db37d481aAutomatic Updater# shipping Linux kernel modules with bleeding-edge releases doesn't make sense
2cbb4ab75757fbb656997a82c14ca07db37d481aAutomatic Updaterinstmod := $(if $(filter _Ubuntu_lucid _Ubuntu_maverick _Ubuntu_natty _Ubuntu_oneiric _Debian_sid,$(debrel)),,1)
2cbb4ab75757fbb656997a82c14ca07db37d481aAutomatic Updater
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews# Location of custom built Qt libraries (see below)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsqtstdc6 := /home/vbox/Qt-4.7.4-stdc++6-$(arch)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrewscfg_flags := $(if $(NOQT),--disable-qt,) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(if $(filter _Debian_squeeze,$(debrel)),--build-libvpx,) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(if $(ose),--ose,) $(if $(LINUX),--with-linux=$(LINUX),) \
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews $(if $(HEADLESS),--build-headless,) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(if $(DEBUG),--build-debug,) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(if $(NOWINE),,--setup-wine) \
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews $(if $(NOWEBSVC),,$(if $(ose),--enable-webservice,)) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(if $(VNC),--enable-vnc,) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews --disable-extpack
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updaterbld_flags := AUTOCFG=$(current)/debian/AutoConfig.kmk \
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater LOCALCFG=$(current)/debian/LocalConfig.kmk \
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews PATH_OUT=$(builddir) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews VBOX_WITHOUT_EXTPACK_PUEL_PACKING=1 \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews VBOX_WITHOUT_EXTPACK_VNC_PACKING=1 \
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews VBOX_DO_STRIP= \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews VBOX_WITH_MULTIVERSION_PYTHON= \
9b469e3c59015b1a4899c9d8395168126fe094fdAutomatic Updater VBOX_PATH_PACKAGE_DOCS="\"/usr/share/doc/$(verpkg)\"" \
9b469e3c59015b1a4899c9d8395168126fe094fdAutomatic Updater $(if $(ose),,VBOX_WITH_DOCS_CHM=1) \
9b469e3c59015b1a4899c9d8395168126fe094fdAutomatic Updater $(if $(svnrev),VBOX_SVN_REV=$(svnrev),) \
9b469e3c59015b1a4899c9d8395168126fe094fdAutomatic Updater $(if $(NODOCS),VBOX_WITH_DOCS= ,) \
9b469e3c59015b1a4899c9d8395168126fe094fdAutomatic Updater $(if $(VERBOSE),--print-directory KBUILD_VERBOSE=2,--no-print-directory) \
9b469e3c59015b1a4899c9d8395168126fe094fdAutomatic Updater $(if $(STAGEDISO),VBOX_WITHOUT_ADDITIONS=1,) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(if $(BLEEDING_EDGE),VBOX_BLEEDING_EDGE=$(BLEEDING_EDGE),)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsconfigure: debian/configure-stamp
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsdebian/configure-stamp:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews dh_testdir
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews cd $(vboxroot) && ./configure --odir=$(current)/debian $(cfg_flags)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews touch debian/configure-stamp
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsbuild: debian/configure-stamp debian/build-stamp
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsdebian/build-stamp $(verfile):
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews dh_testdir
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews . debian/env.sh && kmk -C $(vboxroot) $(bld_flags) $(if $(NOPARALLEL),-j1,) all
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(if $(NODOCS),cp $(vboxroot)/prebuild/UserManual*.pdf $(builddir)/bin,)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(if $(NODOCS),cp $(vboxroot)/prebuild/VirtualBox*.chm $(builddir)/bin,)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(if $(EFI),cp $(vboxroot)/prebuild/VBoxEFI32.fd $(builddir)/bin,)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(if $(EFI),cp $(vboxroot)/prebuild/VBoxEFI64.fd $(builddir)/bin,)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews mkdir -p $(builddir)/bin/additions
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(if $(STAGEDISO),cp $(STAGEDISO)/VBoxGuestAdditions.iso $(builddir)/bin/additions,)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews . debian/env.sh && kmk -C $(vboxroot) $(bld_flags) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews VBOX_NO_LINUX_RUN_INSTALLER=1 \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews VBOX_LNX_ADD_ARCHIVE.x86=$(builddir)/bin/additions/VBoxGuestAdditions-x86.tar.bz2 \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews VBOX_LNX_ADD_ARCHIVE.amd64=$(builddir)/bin/additions/VBoxGuestAdditions-amd64.tar.bz2 \
VBOX_PATH_ADDITIONS.linux.x86=$(builddir)/bin/additions \
VBOX_PATH_ADDITIONS.linux.amd64=$(builddir)/bin/additions \
packing
touch debian/build-stamp
# Build modules for every kernel we find in /lib/modules/*
modules: debian/build-stamp debian/modules-stamp
debian/modules-stamp: debian/build-stamp
rm -rf $(moddir)
mkdir $(moddir)
make -C $(builddir)/bin/src/vboxdrv clean
for d in $(wildcard /lib/modules/*); do \
if [ -L $$d/build ]; then \
make -C $(builddir)/bin/src/vboxdrv KERN_DIR=$$d/build MODULE_DIR=$$d clean && \
make -j4 -C $(builddir)/bin/src/vboxdrv KBUILD_VERBOSE= KERN_DIR=$$d/build MODULE_DIR=$$d all \
$(if $(instmod),&& install -D -m 0644 -g 0 -o 0 \
$(builddir)/bin/src/vboxdrv/vboxdrv.ko $(moddir)/$$(basename $$d)/vboxdrv.ko); \
make -C $(builddir)/bin/src/vboxnetflt KERN_DIR=$$d/build MODULE_DIR=$$d clean && \
(cp $(builddir)/bin/src/vboxdrv/Module.symvers $(builddir)/bin/src/vboxnetflt || true) && \
make -j4 -C $(builddir)/bin/src/vboxnetflt KBUILD_VERBOSE= KERN_DIR=$$d/build MODULE_DIR=$$d all \
$(if $(instmod),&& install -D -m 0644 -g 0 -o 0 \
$(builddir)/bin/src/vboxnetflt/vboxnetflt.ko $(moddir)/$$(basename $$d)/vboxnetflt.ko); \
make -C $(builddir)/bin/src/vboxnetadp KERN_DIR=$$d/build MODULE_DIR=$$d clean && \
(cp $(builddir)/bin/src/vboxdrv/Module.symvers $(builddir)/bin/src/vboxnetadp || true) && \
make -j4 -C $(builddir)/bin/src/vboxnetadp KBUILD_VERBOSE= KERN_DIR=$$d/build MODULE_DIR=$$d all \
$(if $(instmod),&& install -D -m 0644 -g 0 -o 0 \
$(builddir)/bin/src/vboxnetadp/vboxnetadp.ko $(moddir)/$$(basename $$d)/vboxnetadp.ko); \
make -C $(builddir)/bin/src/vboxpci KERN_DIR=$$d/build MODULE_DIR=$$d clean && \
(cp $(builddir)/bin/src/vboxdrv/Module.symvers $(builddir)/bin/src/vboxpci || true) && \
make -j4 -C $(builddir)/bin/src/vboxpci KBUILD_VERBOSE= KERN_DIR=$$d/build MODULE_DIR=$$d all \
$(if $(instmod),&& install -D -m 0644 -g 0 -o 0 \
$(builddir)/bin/src/vboxpci/vboxpci.ko $(moddir)/$$(basename $$d)/vboxpci.ko); \
fi; \
done
make -C $(builddir)/bin/src/vboxdrv clean
make -C $(builddir)/bin/src/vboxnetflt clean
make -C $(builddir)/bin/src/vboxnetadp clean
make -C $(builddir)/bin/src/vboxpci clean
touch debian/modules-stamp
clean:
dh_testdir
dh_testroot
rm -f debian/preinst debian/postinst debian/prerm
rm -f debian/$(package).init debian/vboxdrv.init
rm -f debian/vboxballoonctrl-service.init debian/vboxautostart-service.init debian/vboxweb-service.init
rm -f debian/AutoConfig.kmk debian/configure.log debian/env.sh
rm -f debian/modules-stamp debian/build-stamp debian/configure-stamp
rm -f debian/virtualbox-*.substvars debian/virtualbox*.debhelper
rm -f debian/$(verpkg).mime
rm -rf $(builddir) $(moddir)
rm -rf debian/wine.*
dh_clean
ifeq ($(VBOX_VERSION_MAJOR),)
binary binary-arch binary-indep: build $(verfile)
$(MAKE) -f debian/rules binary
else
# Build architecture-dependent files here.
binary binary-arch binary-indep: build $(if $(NOMODS),,modules)
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
tar -xjC $(prefix)/opt -f $(builddir)/bin/VirtualBox.tar.bz2
$(if $(NOQT),,mv $(archdir)/virtualbox.xml debian/$(verpkg).sharedmimeinfo)
$(archdir)/scripts/install.sh --package $(package) --root $(prefix) \
--prefix /usr $(if $(NOQT),--no-qt) $(if $(ose),--ose) \
$(if $(HEADLESS),--headless) $(if $(NOWEBSVC),--no-web-service) \
--install-folder /lib/$(package) --no-helpers
install -d -g 0 -o 0 $(prefix)/usr/share/doc/$(verpkg)
install -d -g 0 -o 0 $(prefix)/usr/share/lintian/overrides
sed \
-e 's|%VERPKG%|$(verpkg)|g' \
debian/lintian-override.in > \
$(prefix)/usr/share/lintian/overrides/$(verpkg)
$(if $(NOMODS),,for d in $(moddir)/*; do \
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 \
$$d/vboxdrv.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxdrv.ko; \
install -D -g 0 -o 0 -m 0644 \
$$d/vboxnetflt.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxnetflt.ko; \
install -D -g 0 -o 0 -m 0644 \
$$d/vboxnetadp.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxnetadp.ko; \
install -D -g 0 -o 0 -m 0644 \
$$d/vboxpci.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxpci.ko; \
fi \
done)
ifeq ($(ose),)
dh_installdocs \
$(archdir)/UserManual*.pdf $(archdir)/VirtualBox*.chm \
$(addprefix $(archdir)/, LICENSE)
rm $(addprefix $(archdir)/,UserManual*.pdf VirtualBox*.chm \
LICENSE)
else
dh_installdocs \
$(archdir)/UserManual*.pdf
rm $(addprefix $(archdir)/,UserManual*.pdf)
endif
mv $(archdir) $(prefix)/usr/lib/$(package)
ln -s ../VBoxVMM.so $(prefix)/usr/lib/$(package)/components/VBoxVMM.so
rmdir $(prefix)/opt
dh_desktop
$(if $(NOMODS),,dh_installmodules)
sed \
-e 's|%NOLSB%||g' \
-e 's|%DEBIAN%|yes|g' \
-e 's|%PACKAGE%|virtualbox|g' \
-e "s|%VERSION%|$(VBOX_VERSION_STRING)|g" \
-e "s|%GROUP%|$(if $(VBOX_WITHOUT_HARDENING),vboxusers,root)|g" \
$(vboxroot)/src/VBox/Installer/linux/vboxdrv.sh.in > debian/vboxdrv.init
dh_installinit --name=vboxdrv --noscripts
cp $(vboxroot)/src/VBox/Installer/linux/vboxballoonctrl-service.sh debian/vboxballoonctrl-service.init
dh_installinit --name=vboxballoonctrl-service --noscripts
cp $(vboxroot)/src/VBox/Installer/linux/vboxautostart-service.sh debian/vboxautostart-service.init
dh_installinit --name=vboxautostart-service --noscripts
cp $(vboxroot)/src/VBox/Installer/linux/vboxweb-service.sh debian/vboxweb-service.init
dh_installinit --name=vboxweb-service --noscripts
sed -e 's|%VER%|$(ver)|g' \
debian/preinst.in > debian/preinst
sed -e 's|%VER%|$(ver)|g' \
debian/prerm.in > debian/prerm
sed -e 's|%VER%|$(ver)|g' \
-e '/#include installer-common.sh/ {' \
-e "r $(vboxroot)/src/VBox/Installer/linux/installer-common.sh" \
-e 'd' \
-e '}' \
debian/postinst.in > debian/postinst
dh_installdebconf
dh_installchangelogs
dh_installmenu
dh_installmime
dh_link
ifeq ($(DEBUG),)
dh_strip --keep-debug --exclude=libQtCoreVBox.so.4 --exclude=libQtGuiVBox.so.4 --exclude=libQtNetworkVBox.so.4 --exclude=libQtOpenGLVBox.so.4 --exclude=libqtaccessiblewidgets.so
endif
mkdir -p $(current)/debian/$(verpkg)-dbg/usr/lib
ifeq ($(DEBUG),)
mv $(current)/debian/$(verpkg)/usr/lib/debug $(current)/debian/$(verpkg)-dbg/usr/lib
endif
$(if $(filter _Ubuntu_hardy _Ubuntu_lucid,$(debrel)),dh_pycentral,dh_python2)
dh_compress -X.pdf -X.chm -X LICENSE -X.py
dh_fixperms
dh_makeshlibs
dh_installdeb
dh_perl
LD_LIBRARY_PATH=$(prefix)/usr/lib/virtualbox dh_shlibdeps
dh_gencontrol -- \
-Valsa=$(if $(HEADLESS),,libasound2) \
-Vpulse=$(if $(HEADLESS),,libpulse0) \
-Vsdlttf=$(if $(HEADLESS),,libsdl-ttf2.0-0) \
-Vdkms=$(if $(filter _Debian_lenny,$(debrel)),,dkms)
dh_md5sums
dh_builddeb --destdir $(pkgdir) -- -Zxz
endif
.PHONY: binary modules binary-arch binary-indep clean checkroot