[3848] | 1 | #!/usr/bin/make -f
|
---|
[82441] | 2 | # $Id: rules 96407 2022-08-22 17:43:14Z vboxsync $
|
---|
| 3 | ## @file
|
---|
| 4 | # VirtualBox rules.
|
---|
[6316] | 5 | #
|
---|
[82441] | 6 |
|
---|
[6316] | 7 | #
|
---|
[96407] | 8 | # Copyright (C) 2006-2022 Oracle and/or its affiliates.
|
---|
[82441] | 9 | #
|
---|
[96407] | 10 | # This file is part of VirtualBox base platform packages, as
|
---|
| 11 | # available from https://www.virtualbox.org.
|
---|
[6316] | 12 | #
|
---|
[96407] | 13 | # This program is free software; you can redistribute it and/or
|
---|
| 14 | # modify it under the terms of the GNU General Public License
|
---|
| 15 | # as published by the Free Software Foundation, in version 3 of the
|
---|
| 16 | # License.
|
---|
| 17 | #
|
---|
| 18 | # This program is distributed in the hope that it will be useful, but
|
---|
| 19 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
| 21 | # General Public License for more details.
|
---|
| 22 | #
|
---|
| 23 | # You should have received a copy of the GNU General Public License
|
---|
| 24 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
| 25 | #
|
---|
| 26 | # SPDX-License-Identifier: GPL-3.0-only
|
---|
| 27 | #
|
---|
[6316] | 28 |
|
---|
[3848] | 29 | #export DH_VERBOSE=1
|
---|
| 30 |
|
---|
| 31 | # possible overrides:
|
---|
| 32 | # OSE=1 force VBOX_OSE
|
---|
[14379] | 33 | # NOPARALLEL=1 compile with -j1
|
---|
[3848] | 34 | # LINUX=<dir> compile vboxdrv against Linux found in <dir>
|
---|
| 35 | # VERBOSE=1 verbose build
|
---|
| 36 | # DEBUG=1 debug build
|
---|
| 37 | # NOSUBVER=1 disable generation of the sub-version field (which is
|
---|
| 38 | # either the subversion rev [if available] or the build date)
|
---|
[90354] | 39 | # NODOCS=1 don't build docs, use precompiled UserManual*.pdf and
|
---|
| 40 | # maybe UserManual*.qch and UserManual*.qhc from $(vboxroot)/prebuild
|
---|
[3869] | 41 | # NOMODS=1 don't build any module
|
---|
[14552] | 42 | # NOQT=1 don't build the Qt GUI
|
---|
[84968] | 43 | # NOSDL=1 don't build VBoxSDL
|
---|
[40390] | 44 | # EFI=1 include the EFI binary from prebuild
|
---|
[3848] | 45 | # HEADLESS=1 build the headless version
|
---|
[40390] | 46 | # VNC=1 build VNC code
|
---|
[90354] | 47 | # NOWEBSVC=1 don't build the webservice API
|
---|
[3848] | 48 | # STAGEDISO=<path> don't build the VBoxAdditions, use the precompiled .iso
|
---|
[40390] | 49 | # PKGDIR=<path> where to store the final package(s)
|
---|
[90354] | 50 | # svn_revision=xxx do not depend on subversion being available, but use this
|
---|
| 51 | # hard-coded revision number instead
|
---|
[84968] | 52 | #
|
---|
[90354] | 53 | # NODOCS will be set if UserManual*.pdf, UserManual*.qch and UserManual*.qhc are
|
---|
| 54 | # placed in $(vboxroot)/prebuild.
|
---|
[84968] | 55 | # STAGEDISO will be set if VBoxGuestAdditions.iso is placed there.
|
---|
| 56 | #
|
---|
[90354] | 57 | # Wine will not be required if STAGEDISO is set.
|
---|
[3848] | 58 |
|
---|
[13540] | 59 | package := virtualbox
|
---|
| 60 | verpkg := virtualbox-ose
|
---|
[90354] | 61 | vboxroot := $(shell while ! test -r configure && ! test "$$PWD" = "/"; do cd ..; done; pwd)
|
---|
| 62 | debroot := $(vboxroot)
|
---|
| 63 | instlin := $(vboxroot)/src/VBox/Installer/linux
|
---|
| 64 | pkgdir := $(if $(PKGDIR),$(PKGDIR),$(shell cd $(vboxroot)/..; pwd))
|
---|
[92590] | 65 | outdir := $(if $(PATH_OUT_BASE),$(PATH_OUT_BASE),$(vboxroot)/out)
|
---|
[90354] | 66 | bldbase := $(outdir)/debian
|
---|
[90080] | 67 | builddir := $(bldbase)/builddir
|
---|
| 68 | moddir := $(bldbase)/modules
|
---|
[90354] | 69 | prefix := $(bldbase)/$(verpkg)
|
---|
[3848] | 70 | arch := $(shell dpkg --print-architecture)
|
---|
| 71 | verfile := $(builddir)/version-generated.mk
|
---|
[32014] | 72 | ose := $(if $(OSE),1,$(if $(wildcard $(vboxroot)/src/VBox/RDP/server),,1))
|
---|
[84968] | 73 |
|
---|
[3869] | 74 | NOMODS ?= $(ose)
|
---|
[14552] | 75 | NOQT ?= $(HEADLESS)
|
---|
[84968] | 76 | NOSDL ?= $(HEADLESS)
|
---|
[90354] | 77 | NOWEBSVC ?=
|
---|
| 78 | EFI ?= $(if $(wildcard $(vboxroot)/prebuild/VBoxEFI32.fd $(vboxroot)/prebuild/VBoxEFI64.fd),1,)
|
---|
[90357] | 79 | NODOCS ?= $(if $(wildcard $(addprefix $(vboxroot)/prebuild/,UserManual*.pdf UserManual*.qch UserManual*.qhc)),1,)
|
---|
[84968] | 80 | STAGEDISO ?= $(if $(wildcard $(vboxroot)/prebuild/VBoxGuestAdditions.iso),$(vboxroot)/prebuild,)
|
---|
[90354] | 81 | NOWINE := $(if $(STAGEDISO),1,$(ose))
|
---|
| 82 | PYTHON := $(firstword $(shell which python3) $(shell which python))
|
---|
[3848] | 83 |
|
---|
[90354] | 84 | DEBPKGFILES := changelog compat control dirs postinst postrm preinst prerm rules templates
|
---|
[3848] | 85 |
|
---|
| 86 | ifneq ($(STAGEDISO),)
|
---|
[14379] | 87 | ifeq ($(wildcard $(STAGEDISO)/VBoxGuestAdditions.iso),)
|
---|
| 88 | $(error STAGEDISO='$(STAGEDISO)/VBoxGuestAdditions.iso' not found)
|
---|
| 89 | endif
|
---|
[3848] | 90 | endif
|
---|
| 91 |
|
---|
[90354] | 92 | # Replicate debian package buildfiles to $(bldbase)
|
---|
| 93 | ifneq ($(shell pwd),$(outdir))
|
---|
| 94 | cmd := $(filter-out all Makefile,$(MAKECMDGOALS))
|
---|
| 95 | all:
|
---|
| 96 | mkdir -p $(bldbase)
|
---|
| 97 | ln -sf $(addprefix $(debroot)/debian/,$(DEBPKGFILES)) $(bldbase)
|
---|
[91699] | 98 | +$(MAKE) -C $(outdir) vboxroot=$(vboxroot) -f debian/rules $(cmd)
|
---|
[3848] | 99 |
|
---|
[90354] | 100 | Makefile:
|
---|
| 101 |
|
---|
| 102 | $(cmd): all
|
---|
| 103 |
|
---|
| 104 | .PHONY: all $(MAKECMDGOALS)
|
---|
| 105 |
|
---|
| 106 | else
|
---|
| 107 | ifneq ($(wildcard $(verfile)),)
|
---|
| 108 | include $(verfile)
|
---|
| 109 | ver := $(VBOX_VERSION_STRING)
|
---|
| 110 | archdir := $(prefix)/opt/VirtualBox-$(ver)
|
---|
| 111 | endif
|
---|
| 112 |
|
---|
[23106] | 113 | cfg_flags := $(if $(NOQT),--disable-qt,) \
|
---|
[90354] | 114 | $(if $(NOSDL),--disable-vboxsdl,) \
|
---|
| 115 | $(if $(ose),--ose,) $(if $(LINUX),--with-linux=$(LINUX),) \
|
---|
| 116 | $(if $(HEADLESS),--build-headless,) \
|
---|
| 117 | $(if $(DEBUG),--build-debug,) \
|
---|
| 118 | $(if $(NOWINE),,--setup-wine) \
|
---|
| 119 | $(if $(VNC),--enable-vnc,) \
|
---|
| 120 | $(if $(PATH_OUT_BASE),--out-base-dir=$(PATH_OUT_BASE),) \
|
---|
| 121 | --disable-extpack
|
---|
[23106] | 122 |
|
---|
[92590] | 123 | bld_flags := LOCALCFG=$(debroot)/debian/LocalConfig.kmk \
|
---|
[90354] | 124 | PATH_OUT=$(builddir) \
|
---|
| 125 | VBOX_WITHOUT_EXTPACK_PUEL_PACKING=1 \
|
---|
| 126 | VBOX_WITHOUT_EXTPACK_VNC_PACKING=1 \
|
---|
| 127 | VBOX_WITH_VMSVGA3D=1 \
|
---|
| 128 | VBOX_DO_STRIP= \
|
---|
| 129 | VBOX_PATH_PACKAGE_DOCS="\"/usr/share/doc/$(verpkg)\"" \
|
---|
[90359] | 130 | $(if $(svn_revision),VBOX_SVN_REV=$(svn_revision),) \
|
---|
| 131 | $(if $(NODOCS),VBOX_WITH_DOCS=,) \
|
---|
[90354] | 132 | $(if $(VERBOSE),--print-directory KBUILD_VERBOSE=2,--no-print-directory) \
|
---|
| 133 | $(if $(STAGEDISO),VBOX_WITHOUT_ADDITIONS=1,)
|
---|
[23106] | 134 |
|
---|
[90354] | 135 | configure: $(bldbase)/configure-stamp
|
---|
| 136 | $(bldbase)/configure-stamp:
|
---|
[3848] | 137 | dh_testdir
|
---|
[90354] | 138 | mkdir -p $(bldbase)
|
---|
[90118] | 139 | cd $(vboxroot) && ./configure --odir=$(bldbase) $(cfg_flags)
|
---|
[90354] | 140 | touch $@
|
---|
[3848] | 141 |
|
---|
[90354] | 142 | build: $(bldbase)/configure-stamp $(bldbase)/build-stamp
|
---|
| 143 | $(bldbase)/build-stamp $(verfile): $(bldbase)/configure-stamp
|
---|
[3848] | 144 | dh_testdir
|
---|
[90354] | 145 | . $(bldbase)/env.sh && kmk -C $(vboxroot) $(bld_flags) $(if $(NOPARALLEL),-j1,) all
|
---|
| 146 | # Files from prebuild go to (builddir)/bin to be used during the
|
---|
| 147 | # packing stage, overriding what the build did/would produce.
|
---|
[90357] | 148 | $(if $(NODOCS),cp $(addprefix $(vboxroot)/prebuild/,UserManual*.pdf UserManual*.qch UserManual*.qhc) $(builddir)/bin,)
|
---|
[40390] | 149 | $(if $(EFI),cp $(vboxroot)/prebuild/VBoxEFI32.fd $(builddir)/bin,)
|
---|
| 150 | $(if $(EFI),cp $(vboxroot)/prebuild/VBoxEFI64.fd $(builddir)/bin,)
|
---|
[3848] | 151 | mkdir -p $(builddir)/bin/additions
|
---|
| 152 | $(if $(STAGEDISO),cp $(STAGEDISO)/VBoxGuestAdditions.iso $(builddir)/bin/additions,)
|
---|
[90354] | 153 | . $(bldbase)/env.sh && kmk -C $(vboxroot) $(bld_flags) \
|
---|
[23106] | 154 | VBOX_NO_LINUX_RUN_INSTALLER=1 \
|
---|
[44993] | 155 | VBOX_LNX_ADD_ARCHIVE.x86=$(builddir)/bin/additions/VBoxGuestAdditions-x86.tar.bz2 \
|
---|
| 156 | VBOX_LNX_ADD_ARCHIVE.amd64=$(builddir)/bin/additions/VBoxGuestAdditions-amd64.tar.bz2 \
|
---|
[32044] | 157 | VBOX_PATH_ADDITIONS.linux.x86=$(builddir)/bin/additions \
|
---|
| 158 | VBOX_PATH_ADDITIONS.linux.amd64=$(builddir)/bin/additions \
|
---|
[3848] | 159 | packing
|
---|
[90354] | 160 | touch $(bldbase)/build-stamp
|
---|
[3848] | 161 |
|
---|
| 162 | # Build modules for every kernel we find in /lib/modules/*
|
---|
[90354] | 163 | $(bldbase)/modules-stamp: $(bldbase)/build-stamp
|
---|
[3848] | 164 | rm -rf $(moddir)
|
---|
| 165 | mkdir $(moddir)
|
---|
| 166 | for d in $(wildcard /lib/modules/*); do \
|
---|
[10349] | 167 | if [ -L $$d/build ]; then \
|
---|
[91847] | 168 | make -C $(builddir)/bin/src/vboxdrv KERN_VER=$$(basename $$d) clean && \
|
---|
| 169 | make -C $(builddir)/bin/src/vboxdrv KBUILD_VERBOSE= KERN_VER=$$(basename $$d) all; \
|
---|
| 170 | make -C $(builddir)/bin/src/vboxnetflt KERN_VER=$$(basename $$d) clean && \
|
---|
| 171 | (cp $(builddir)/bin/src/vboxdrv/Module.symvers $(builddir)/bin/src/vboxnetflt || true) && \
|
---|
| 172 | make -C $(builddir)/bin/src/vboxnetflt KBUILD_VERBOSE= KERN_VER=$$(basename $$d) KBUILD_EXTRA_SYMBOLS=$(builddir)/bin/src/vboxnetflt/Module.symvers all; \
|
---|
| 173 | make -C $(builddir)/bin/src/vboxnetadp KERN_VER=$$(basename $$d) clean && \
|
---|
| 174 | (cp $(builddir)/bin/src/vboxdrv/Module.symvers $(builddir)/bin/src/vboxnetadp || true) && \
|
---|
| 175 | make -C $(builddir)/bin/src/vboxnetadp KBUILD_VERBOSE= KERN_VER=$$(basename $$d) KBUILD_EXTRA_SYMBOLS=$(builddir)/bin/src/vboxnetadp/Module.symvers all; \
|
---|
| 176 | [ -d $(builddir)/bin/src/vboxpci ] && make -C $(builddir)/bin/src/vboxpci KERN_VER=$$(basename $$d) clean && \
|
---|
| 177 | (cp $(builddir)/bin/src/vboxdrv/Module.symvers $(builddir)/bin/src/vboxpci || true) && \
|
---|
| 178 | make -C $(builddir)/bin/src/vboxpci KBUILD_VERBOSE= KERN_VER=$$(basename $$d) KBUILD_EXTRA_SYMBOLS=$(builddir)/bin/src/vboxpci/Module.symvers all; \
|
---|
| 179 | true; \
|
---|
[10349] | 180 | fi; \
|
---|
| 181 | done
|
---|
[90354] | 182 | touch $@
|
---|
[3848] | 183 |
|
---|
| 184 | clean:
|
---|
| 185 | dh_testdir
|
---|
| 186 | dh_testroot
|
---|
| 187 | dh_clean
|
---|
[90354] | 188 | rm -rf $(archdir)
|
---|
| 189 | rm -rf $(builddir)
|
---|
| 190 | rm -rf $(moddir)
|
---|
| 191 | rm -rf $(bldbase)/wine.*
|
---|
| 192 | rm -rf $(bldbase)/VirtualBox-*
|
---|
| 193 | rm -f $(bldbase)/VirtualBox.tar $(bldbase)/VirtualBox.tar.bz2
|
---|
| 194 | rm -f $(bldbase)/virtualbox-*.substvars $(bldbase)/virtualbox*.debhelper
|
---|
| 195 | rm -f $(bldbase)/$(verpkg).mime $(bldbase)/$(verpkg).sharedmimeinfo
|
---|
| 196 | rm -f $(bldbase)/modules-stamp $(bldbase)/build-stamp $(bldbase)/configure-stamp
|
---|
| 197 | rm -f $(bldbase)/AutoConfig.kmk $(bldbase)/configure.log $(bldbase)/env.sh
|
---|
| 198 | rm -f $(addprefix $(bldbase)/,$(DEBPKGFILES))
|
---|
| 199 | if [ -d $(bldbase) ]; then rmdir $(bldbase); fi
|
---|
[3848] | 200 |
|
---|
[90354] | 201 | ifeq ($(VBOX_VERSION_MAJOR),)
|
---|
| 202 | binary: build $(verfile)
|
---|
| 203 | +$(MAKE) -f debian/rules binary
|
---|
| 204 |
|
---|
| 205 | else
|
---|
[3848] | 206 | # Build architecture-dependent files here.
|
---|
[90354] | 207 | binary: build $(if $(NOMODS),,$(bldbase)/modules-stamp)
|
---|
[3848] | 208 | dh_testdir
|
---|
| 209 | dh_testroot
|
---|
[90354] | 210 | dh_prep
|
---|
[3848] | 211 | dh_installdirs
|
---|
[56856] | 212 | tar -xC $(prefix)/opt -f $(builddir)/bin/VirtualBox.tar
|
---|
[82441] | 213 | install -d -g 0 -o 0 $(prefix)/usr/share/applications
|
---|
| 214 | install -d -g 0 -o 0 $(prefix)/usr/lib
|
---|
| 215 | install -d -g 0 -o 0 $(prefix)/usr/bin
|
---|
| 216 | install -d -g 0 -o 0 $(prefix)/usr/share/$(package)
|
---|
[92273] | 217 | mv $(archdir)/UnattendedTemplates $(prefix)/usr/share/$(package)/
|
---|
[82441] | 218 | install -d -g 0 -o 0 $(prefix)/usr/share/doc/$(verpkg)
|
---|
| 219 | $(if $(NOQT),,mv $(archdir)/virtualbox.desktop \
|
---|
| 220 | $(prefix)/usr/share/applications/virtualbox.desktop)
|
---|
[91857] | 221 | $(if $(NOQT),,mv $(archdir)/virtualboxvm.desktop \
|
---|
| 222 | $(prefix)/usr/share/applications/virtualboxvm.desktop)
|
---|
[82441] | 223 | install -d -g 0 -o 0 $(prefix)/usr/share/pixmaps
|
---|
| 224 | $(if $(NOQT),,install -d -g 0 -o 0 $(prefix)/usr/share/icons/hicolor)
|
---|
| 225 | $(if $(NOQT),,cp $(archdir)/icons/128x128/virtualbox.png \
|
---|
| 226 | $(prefix)/usr/share/pixmaps/virtualbox.png)
|
---|
| 227 | $(if $(NOQT),,mv $(archdir)/nls $(prefix)/usr/share/$(package))
|
---|
| 228 | $(if $(NOQT),,cd $(archdir)/icons; for i in *; do \
|
---|
| 229 | for j in $$i/virtualbox.*; do \
|
---|
[91847] | 230 | if [ -f $$j ]; then \
|
---|
| 231 | if [ ! -d $(prefix)/usr/share/icons/hicolor/$$i/apps ]; then \
|
---|
| 232 | install -d -g 0 -o 0 $(prefix)/usr/share/icons/hicolor/$$i/apps; \
|
---|
| 233 | fi; \
|
---|
| 234 | mv $$j $(prefix)/usr/share/icons/hicolor/$$i/apps; \
|
---|
| 235 | fi; \
|
---|
[82441] | 236 | done; \
|
---|
| 237 | install -d -g 0 -o 0 $(prefix)/usr/share/icons/hicolor/$$i/mimetypes; \
|
---|
| 238 | mv $$i/* $(prefix)/usr/share/icons/hicolor/$$i/mimetypes || true; \
|
---|
| 239 | rmdir $$i; \
|
---|
| 240 | done)
|
---|
| 241 | $(if $(NOQT),,rmdir $(archdir)/icons)
|
---|
[90354] | 242 | $(if $(NOQT),,mv $(archdir)/virtualbox.xml $(bldbase)/$(verpkg).sharedmimeinfo)
|
---|
[15569] | 243 | install -d -g 0 -o 0 $(prefix)/usr/share/lintian/overrides
|
---|
| 244 | sed \
|
---|
| 245 | -e 's|%VERPKG%|$(verpkg)|g' \
|
---|
[90354] | 246 | $(vboxroot)/debian/lintian-override.in > \
|
---|
[15569] | 247 | $(prefix)/usr/share/lintian/overrides/$(verpkg)
|
---|
[82441] | 248 | mv $(archdir)/VBox.png \
|
---|
| 249 | $(prefix)/usr/share/pixmaps/VBox.png
|
---|
| 250 | mv $(archdir)/src $(prefix)/usr/share/$(package)
|
---|
| 251 | rm $(archdir)/VBox.sh
|
---|
[90354] | 252 | install -D -g 0 -o 0 -m 644 $(instlin)/VBox.sh $(prefix)/usr/bin/VBox
|
---|
[82441] | 253 | mv $(archdir)/VBoxSysInfo.sh $(prefix)/usr/share/$(package)
|
---|
| 254 | if [ -r $(archdir)/VBoxDTrace ]; then \
|
---|
| 255 | mv $(archdir)/VBoxDTrace $(prefix)/usr/bin; \
|
---|
| 256 | fi
|
---|
| 257 | mv $(archdir)/VBoxTunctl $(prefix)/usr/bin
|
---|
[3869] | 258 | $(if $(NOMODS),,for d in $(moddir)/*; do \
|
---|
[82441] | 259 | if [ -f $$d/vboxdrv.ko -a -f $$d/vboxnetflt.ko -a -f $$d/vboxnetadp.ko ]; then \
|
---|
[91847] | 260 | install -D -g 0 -o 0 -m 0644 \
|
---|
[23991] | 261 | $$d/vboxdrv.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxdrv.ko; \
|
---|
[91847] | 262 | install -D -g 0 -o 0 -m 0644 \
|
---|
[23991] | 263 | $$d/vboxnetflt.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxnetflt.ko; \
|
---|
[91847] | 264 | install -D -g 0 -o 0 -m 0644 \
|
---|
[23991] | 265 | $$d/vboxnetadp.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxnetadp.ko; \
|
---|
[91847] | 266 | if [ -f $$d/vboxpci.ko ]; then \
|
---|
| 267 | install -D -g 0 -o 0 -m 0644 \
|
---|
| 268 | $$d/vboxpci.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxpci.ko; \
|
---|
| 269 | fi \
|
---|
[23991] | 270 | fi \
|
---|
[14436] | 271 | done)
|
---|
[90354] | 272 | dh_installdocs $(addprefix $(archdir)/,UserManual*.pdf LICENSE)
|
---|
| 273 | mv $(addprefix $(archdir)/,$(if $(HEADLESS),,rdesktop-vrdp.tar.gz) additions/VBoxGuestAdditions.iso) $(prefix)/usr/share/$(package)
|
---|
[82441] | 274 | $(if $(HEADLESS),,mv $(archdir)/rdesktop-vrdp $(prefix)/usr/bin)
|
---|
| 275 | $(if $(HEADLESS),,mv $(archdir)/rdesktop-vrdp-keymaps $(prefix)/usr/share/$(package))
|
---|
[44969] | 276 | mv $(archdir) $(prefix)/usr/lib/$(package)
|
---|
[82441] | 277 | if [ -f $(prefix)/usr/lib/$(package)/libQt5CoreVBox.so.5 ]; then \
|
---|
[90361] | 278 | $(vboxroot)/tools/linux.$(chrarch)/bin/chrpath \
|
---|
[91847] | 279 | --keepgoing --replace /usr/lib/$(package) \
|
---|
| 280 | $(prefix)/usr/lib/$(package)/*.so.5 \
|
---|
| 281 | $(prefix)/usr/lib/$(package)/plugins/platforms/*.so; \
|
---|
| 282 | $(prefix)/usr/lib/$(package)/plugins/platformthemes/*.so; \
|
---|
| 283 | $(prefix)/usr/lib/$(package)/plugins/sqldrivers/*.so; \
|
---|
| 284 | $(prefix)/usr/lib/$(package)/plugins/styles/*.so; \
|
---|
| 285 | $(prefix)/usr/lib/$(package)/plugins/xcbglintegrations/*.so; \
|
---|
[82441] | 286 | echo "[Paths]" > $(prefix)/usr/lib/$(package)/qt.conf; \
|
---|
| 287 | echo "Plugins = /usr/lib/$(package)/plugins" >> $(prefix)/usr/lib/$(package)/qt.conf; \
|
---|
| 288 | fi
|
---|
| 289 | export VBOX_INSTALL_PATH=/usr/lib/$(package) && \
|
---|
| 290 | cd $(builddir)/bin/sdk/installer && \
|
---|
| 291 | $(PYTHON) ./vboxapisetup.py install --root $(prefix)
|
---|
| 292 | rm -rf $(prefix)/usr/lib/$(package)/sdk/installer
|
---|
[47931] | 293 | ln -s ../VBoxVMM.so $(prefix)/usr/lib/$(package)/components/VBoxVMM.so
|
---|
[3862] | 294 | rmdir $(prefix)/opt
|
---|
[82441] | 295 | dh_link \
|
---|
| 296 | $(if $(NOQT),,usr/bin/VBox usr/bin/VirtualBox) \
|
---|
| 297 | $(if $(NOQT),,usr/bin/VBox usr/bin/virtualbox) \
|
---|
| 298 | $(if $(NOQT),,usr/bin/VBox usr/bin/VirtualBoxVM) \
|
---|
| 299 | $(if $(NOQT),,usr/bin/VBox usr/bin/virtualboxvm) \
|
---|
| 300 | usr/bin/VBox usr/bin/VBoxManage \
|
---|
| 301 | usr/bin/VBox usr/bin/vboxmanage \
|
---|
[84968] | 302 | $(if $(NOSDL),,usr/bin/VBox usr/bin/VBoxSDL) \
|
---|
| 303 | $(if $(NOSDL),,usr/bin/VBox usr/bin/vboxsdl) \
|
---|
[82441] | 304 | usr/bin/VBox usr/bin/VBoxHeadless \
|
---|
| 305 | usr/bin/VBox usr/bin/vboxheadless \
|
---|
| 306 | usr/bin/VBox usr/bin/VBoxBugReport \
|
---|
| 307 | usr/bin/VBox usr/bin/vboxbugreport \
|
---|
| 308 | usr/bin/VBox usr/bin/VBoxBalloonCtrl \
|
---|
| 309 | usr/bin/VBox usr/bin/vboxballoonctrl \
|
---|
| 310 | usr/bin/VBox usr/bin/VBoxAutostart \
|
---|
| 311 | usr/bin/VBox usr/bin/vboxautostart \
|
---|
| 312 | $(if $(NOWEBSVC),,usr/bin/VBox usr/bin/vboxwebsrv) \
|
---|
| 313 | $(if $(NOVBOXIMG),,usr/lib/virtualbox/vbox-img usr/bin/vbox-img) \
|
---|
| 314 | $(if $(NOVBOXIMGMOUNT),,usr/lib/virtualbox/vboximg-mount usr/bin/vboximg-mount) \
|
---|
| 315 | usr/share/virtualbox/src/vboxhost usr/src/vboxhost-$(ver)
|
---|
[3869] | 316 | $(if $(NOMODS),,dh_installmodules)
|
---|
[3848] | 317 | dh_installdebconf
|
---|
| 318 | dh_installchangelogs
|
---|
[32045] | 319 | dh_installmenu
|
---|
[34603] | 320 | dh_installmime
|
---|
[3848] | 321 | dh_link
|
---|
[90354] | 322 | ifeq ($(DEBUG),)
|
---|
[60575] | 323 | dh_strip --keep-debug \
|
---|
| 324 | $(addprefix --exclude=lib,$(addsuffix VBox.so.5,\
|
---|
[90354] | 325 | Qt5Core Qt5Gui Qt5Widgets Qt5PrintSupport Qt5OpenGL Qt5DBus Qt5XcbQpa Qt5X11Extras))
|
---|
| 326 | endif
|
---|
| 327 | mkdir -p $(bldbase)/$(verpkg)-dbg/usr/lib/$(package)
|
---|
| 328 | mv $(prefix)/usr/lib/$(package)/*.debug $(bldbase)/$(verpkg)-dbg/usr/lib/$(package)
|
---|
| 329 | ifeq ($(DEBUG),)
|
---|
| 330 | mv $(prefix)/usr/lib/debug $(bldbase)/$(verpkg)-dbg/usr/lib
|
---|
| 331 | endif
|
---|
| 332 | $(firstword $(shell which dh_python3) $(shell which dh_python2))
|
---|
| 333 | dh_compress -X.pdf -X.qch -X.qhc -X LICENSE -X.py
|
---|
[3848] | 334 | dh_fixperms
|
---|
| 335 | dh_makeshlibs
|
---|
| 336 | dh_installdeb
|
---|
| 337 | dh_perl
|
---|
[90414] | 338 | # For some reason, the Qt libraries couldn't be found on newer releases (e.g. Ubuntu hardy).
|
---|
| 339 | # Python is deliberately not listed as a dependency (see also comment in the "control" file.
|
---|
| 340 | # It is expected that dh_gencontrol shows a warning "substitution variable ${python:Versions}
|
---|
| 341 | # used, but is not defined" because of this.
|
---|
[82441] | 342 | LD_LIBRARY_PATH=$(prefix)/usr/lib/virtualbox dh_shlibdeps --exclude=VBoxPython
|
---|
[5255] | 343 | dh_gencontrol -- \
|
---|
| 344 | -Valsa=$(if $(HEADLESS),,libasound2) \
|
---|
[6205] | 345 | -Vpulse=$(if $(HEADLESS),,libpulse0) \
|
---|
[63946] | 346 | -Vsdlttf=$(if $(HEADLESS),,libsdl-ttf2.0-0)
|
---|
[3848] | 347 | dh_md5sums
|
---|
[43316] | 348 | dh_builddeb --destdir $(pkgdir) -- -Zxz
|
---|
[90354] | 349 | endif
|
---|
| 350 |
|
---|
| 351 | .PHONY: binary configure build clean
|
---|
[3848] | 352 | endif
|
---|