rules revision f2ca52afeb0baed982c05e9d8591e0e4c7539dbd
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Copyright (C) 2006-2011 Oracle Corporation
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# This file is part of VirtualBox Open Source Edition (OSE), as
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# available from http://www.virtualbox.org. This file is free software;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# you can redistribute it and/or modify it under the terms of the GNU
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# General Public License as published by the Free Software Foundation,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# distribution. VirtualBox OSE is distributed in the hope that it will
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# be useful, but WITHOUT ANY WARRANTY of any kind.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#export DH_VERBOSE=1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# possible overrides:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# OSE=1 force VBOX_OSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# NOPARALLEL=1 compile with -j1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# LINUX=<dir> compile vboxdrv against Linux found in <dir>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# VERBOSE=1 verbose build
3270659f55e0928d6edec3d26217cc29398a8149Srikanth, Ramana# DEBUG=1 debug build
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# NOSUBVER=1 disable generation of the sub-version field (which is
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# either the subversion rev [if available] or the build date)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# NODOCS=1 don't build docs, use precompiled UserManual.pdf and
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# NOMODS=1 don't build any module
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# NOQT=1 don't build the Qt GUI
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# HEADLESS=1 build the headless version
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# NOWEBSVC=1 don't build the webservice API, default for OSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# STAGEDISO=<path> don't build the VBoxAdditions, use the precompiled .iso
5c5f137104b2d56181283389fa902220f2023809Richard Lowe# BLEEDING_EDGE=xyz
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteose := $(if $(OSE),1,$(if $(wildcard $(vboxroot)/src/VBox/RDP/server),,1))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteNOWINE := $(if $(NODOCS),$(if $(STAGEDISO),1,),)$(ose)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ifeq ($(wildcard $(STAGEDISO)/VBoxGuestAdditions.iso),)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(error STAGEDISO='$(STAGEDISO)/VBoxGuestAdditions.iso' not found)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortedebrel := $(if $(shell which lsb_release),_$(shell lsb_release -si)_$(shell lsb_release -sc),unknown)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# shipping Linux kernel modules with bleeding-edge releases doesn't make sense
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinstmod := $(if $(filter _Ubuntu_lucid _Ubuntu_maverick _Ubuntu_natty _Debian_sid,$(debrel)),,1)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Location of custom built Qt libraries (see below)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(if $(ose),--ose,) $(if $(LINUX),--with-linux=$(LINUX),) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(if $(filter _Debian_etch,$(debrel)),$(if $(ose),,--build-libcurl),) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(if $(filter _Debian_etch _Ubuntu_hardy,$(debrel)),--with-qt4-dir=$(qtstdc6)) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortebld_flags := AUTOCFG=$(current)/debian/AutoConfig.kmk \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte VBOX_PATH_PACKAGE_DOCS="\"/usr/share/doc/$(verpkg)\"" \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(if $(VERBOSE),--print-directory KBUILD_VERBOSE=2,--no-print-directory) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(if $(BLEEDING_EDGE),VBOX_BLEEDING_EDGE=$(BLEEDING_EDGE),) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(if $(filter _Debian_etch _Ubuntu_hardy,$(debrel)),,VBOX_WITH_SYSFS_BY_DEFAULT=1)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte cd $(vboxroot) && ./configure --odir=$(current)/debian $(cfg_flags)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte . debian/env.sh && kmk -C $(vboxroot) $(bld_flags) $(if $(NOPARALLEL),-j1,) all
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(if $(NODOCS),cp $(vboxroot)/prebuild/UserManual*.pdf $(builddir)/bin,)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(if $(NODOCS),cp $(vboxroot)/prebuild/VirtualBox*.chm $(builddir)/bin,)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(if $(STAGEDISO),cp $(STAGEDISO)/VBoxGuestAdditions.iso $(builddir)/bin/additions,)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte . debian/env.sh && kmk -C $(vboxroot) $(bld_flags) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte VBOX_LNX_ADD_ARCHIVE.x86=$(builddir)/bin/additions/VBoxGuestAdditions-x86-r$(svnrev).tar.bz2 \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte VBOX_LNX_ADD_ARCHIVE.amd64=$(builddir)/bin/additions/VBoxGuestAdditions-amd64-r$(svnrev).tar.bz2 \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte VBOX_PATH_ADDITIONS.linux.x86=$(builddir)/bin/additions \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte VBOX_PATH_ADDITIONS.linux.amd64=$(builddir)/bin/additions \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Build modules for every kernel we find in /lib/modules/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte make -C $(builddir)/bin/src/vboxdrv KERN_DIR=$$d/build MODULE_DIR=$$d clean && \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte make -j4 -C $(builddir)/bin/src/vboxdrv KBUILD_VERBOSE= KERN_DIR=$$d/build MODULE_DIR=$$d all \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(if $(instmod),&& install -D -m 0644 -g 0 -o 0 \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(builddir)/bin/src/vboxdrv/vboxdrv.ko $(moddir)/$$(basename $$d)/vboxdrv.ko); \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte make -C $(builddir)/bin/src/vboxnetflt KERN_DIR=$$d/build MODULE_DIR=$$d clean && \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (cp $(builddir)/bin/src/vboxdrv/Module.symvers $(builddir)/bin/src/vboxnetflt || true) && \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte make -j4 -C $(builddir)/bin/src/vboxnetflt KBUILD_VERBOSE= KERN_DIR=$$d/build MODULE_DIR=$$d all \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(if $(instmod),&& install -D -m 0644 -g 0 -o 0 \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(builddir)/bin/src/vboxnetflt/vboxnetflt.ko $(moddir)/$$(basename $$d)/vboxnetflt.ko); \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte make -C $(builddir)/bin/src/vboxnetadp KERN_DIR=$$d/build MODULE_DIR=$$d clean && \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (cp $(builddir)/bin/src/vboxdrv/Module.symvers $(builddir)/bin/src/vboxnetadp || true) && \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte make -j4 -C $(builddir)/bin/src/vboxnetadp KBUILD_VERBOSE= KERN_DIR=$$d/build MODULE_DIR=$$d all \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(if $(instmod),&& install -D -m 0644 -g 0 -o 0 \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(builddir)/bin/src/vboxnetadp/vboxnetadp.ko $(moddir)/$$(basename $$d)/vboxnetadp.ko); \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte rm -f debian/preinst debian/postinst debian/prerm
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte rm -f debian/vboxballoonctrl-service.init debian/vboxweb-service.init
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte rm -f debian/AutoConfig.kmk debian/configure.log debian/env.sh
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte rm -f debian/modules-stamp debian/build-stamp debian/configure-stamp
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte rm -f debian/virtualbox-*.substvars debian/virtualbox*.debhelper
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Build architecture-dependent files here.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortebinary binary-arch binary-indep: build $(if $(NOMODS),,modules)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte tar -xjC $(prefix)/opt -f $(builddir)/bin/VirtualBox.tar.bz2
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte install -d -g 0 -o 0 $(prefix)/usr/share/applications
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte install -d -g 0 -o 0 $(prefix)/usr/lib/$(package)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte install -d -g 0 -o 0 $(prefix)/usr/share/$(package)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte install -d -g 0 -o 0 $(prefix)/usr/share/doc/$(verpkg)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(prefix)/usr/share/applications/virtualbox.desktop)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte install -d -g 0 -o 0 $(prefix)/usr/share/icons/hicolor
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte install -d -g 0 -o 0 $(prefix)/usr/share/icons/hicolor/$$i/apps; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mv $$i/virtualbox.png $(prefix)/usr/share/icons/hicolor/$$i/apps; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte install -d -g 0 -o 0 $(prefix)/usr/share/icons/hicolor/$$i/mimetypes; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mv $$i/* $(prefix)/usr/share/icons/hicolor/$$i/mimetypes || true; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte install -d -g 0 -o 0 $(prefix)/usr/lib/$(package)/ExtensionPacks
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mv $(archdir)/virtualbox.xml debian/$(verpkg).sharedmimeinfo
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte install -d -g 0 -o 0 $(prefix)/usr/share/lintian/overrides
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -e 's|%VERPKG%|$(verpkg)|g' \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mv $(archdir)/VBoxEFI32.fd $(prefix)/usr/lib/$(package)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mv $(archdir)/VBoxEFI64.fd $(prefix)/usr/lib/$(package)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mv $(archdir)/*.rel $(prefix)/usr/lib/$(package) || true
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mv $(archdir)/VBoxNetDHCP $(prefix)/usr/lib/$(package)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mv $(archdir)/VBoxNetAdpCtl $(prefix)/usr/lib/$(package)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mv $(archdir)/VBoxXPCOMIPCD $(prefix)/usr/lib/$(package)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mv $(archdir)/components $(prefix)/usr/lib/$(package)/components
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mv $(archdir)/*.so.4 $(prefix)/usr/lib/$(package) || true
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(if $(NOQT),,mv $(archdir)/VBoxTestOGL $(prefix)/usr/lib/$(package))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(if $(NOQT),,mv $(archdir)/nls $(prefix)/usr/share/$(package))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte export VBOX_INSTALL_PATH=/usr/lib/$(package) && \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte python ./vboxapisetup.py install --root $(prefix)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mv $(archdir)/vboxshell.py $(prefix)/usr/lib/$(package)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte install -D -g 0 -o 0 -m 644 $(vboxroot)/src/VBox/Installer/linux/debian/VBox.sh $(prefix)/usr/bin/VBox
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mv $(archdir)/VBoxSysInfo.sh $(prefix)/usr/share/$(package)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mv $(archdir)/VBoxCreateUSBNode.sh $(prefix)/usr/share/$(package)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for i in VBoxManage VBoxSVC $(if $(HEADLESS),,VBoxSDL) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mv $(archdir)/$$i $(prefix)/usr/lib/$(package); done
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if [ -f $$d/vboxdrv.ko -a -f $$d/vboxnetflt.ko -a -f $$d/vboxnetadp.ko ]; then \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte install -D -g 0 -o 0 -m 0644 \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $$d/vboxdrv.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxdrv.ko; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte install -D -g 0 -o 0 -m 0644 \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $$d/vboxnetflt.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxnetflt.ko; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte install -D -g 0 -o 0 -m 0644 \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $$d/vboxnetadp.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxnetadp.ko; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(if $(NOQT),,mv $(archdir)/kchmviewer $(prefix)/usr/lib/$(package))
3270659f55e0928d6edec3d26217cc29398a8149Srikanth, Ramana $(archdir)/UserManual*.pdf $(archdir)/VirtualBox*.chm \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte rm $(addprefix $(archdir)/,UserManual*.pdf VirtualBox*.chm \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for i in rdesktop-vrdp.tar.gz additions/VBoxGuestAdditions.iso; do \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mv $(archdir)/$$i $(prefix)/usr/share/$(package); done
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(if $(HEADLESS),,mv $(archdir)/rdesktop-vrdp $(prefix)/usr/bin)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(if $(HEADLESS),,mv $(archdir)/rdesktop-vrdp-keymaps $(prefix)/usr/share/$(package))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if [ -d $(archdir)/accessible ]; then mv $(archdir)/accessible $(prefix)/usr/lib/virtualbox; fi
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mv $(archdir)/$$i $(prefix)/usr/share/$(package); done
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(if $(HEADLESS),,usr/bin/VBox usr/bin/VBoxSDL) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(if $(HEADLESS),,usr/bin/VBox usr/bin/vboxsdl) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(if $(NOWEBSVC),,usr/bin/VBox usr/bin/vboxwebsrv) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte usr/share/virtualbox/src/vboxhost usr/src/vboxhost-$(ver)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -e 's|%NOLSB%||g' \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -e 's|%DEBIAN%|yes|g' \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -e 's|%PACKAGE%|virtualbox|g' \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -e "s|%GROUP%|$(if $(VBOX_WITHOUT_HARDENING),vboxusers,root)|g" \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(vboxroot)/src/VBox/Installer/linux/vboxdrv.sh.in > debian/vboxdrv.init
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -e 's|%NOLSB%||g' \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -e 's|%DEBIAN%|yes|g' \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -e 's|%PACKAGE%|virtualbox|g' \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(vboxroot)/src/VBox/Installer/linux/vboxballoonctrl-service.sh.in > debian/vboxballoonctrl-service.init
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte dh_installinit --name=vboxballoonctrl-service --noscripts
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -e 's|%NOLSB%||g' \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -e 's|%DEBIAN%|yes|g' \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -e 's|%PACKAGE%|virtualbox|g' \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(vboxroot)/src/VBox/Installer/linux/vboxweb-service.sh.in > debian/vboxweb-service.init
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte dh_installinit --name=vboxweb-service --noscripts
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte cat debian/preinst.in | sed -e 's|%VER%|$(ver)|g' > debian/preinst
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte cat debian/prerm.in | sed -e 's|%VER%|$(ver)|g' > debian/prerm
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte cat debian/postinst.in | sed -e 's|%VER%|$(ver)|g' > debian/postinst
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte dh_strip --keep-debug --exclude=libQtCoreVBox.so.4 --exclude=libQtGuiVBox.so.4 --exclude=libQtNetworkVBox.so.4 --exclude=libQtOpenGLVBox.so.4 --exclude=libqtaccessiblewidgets.so
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte # manually strip our R0/GC modules, dh_strip cannot handle them
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(prefix)/usr/lib/$(package)/*.r0 $(prefix)/usr/lib/$(package)/*.gc; do \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(prefix)/usr/lib/debug/usr/lib/$(package)/`basename $$f`; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte objcopy --add-gnu-debuglink=$(prefix)/usr/lib/debug/usr/lib/$(package)/`basename $$f` $$f; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mv $(current)/debian/$(verpkg)/usr/lib/debug $(current)/debian/$(verpkg)-dbg/usr/lib
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -Vdkms=$(if $(filter _Debian_etch _Debian_lenny,$(debrel)),,dkms)