VirtualBox

source: vbox/trunk/src/VBox/Installer/darwin/Makefile.kmk@ 61213

Last change on this file since 61213 was 61213, checked in by vboxsync, 9 years ago

darwin: try to fix hardened builds

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 42.7 KB
Line 
1# $Id: Makefile.kmk 61213 2016-05-26 15:48:15Z vboxsync $
2## @file
3# Install misc stuff and create dist packages for Mac OS X.
4#
5
6#
7# Copyright (C) 2006-2015 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17
18SUB_DEPTH = ../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21
22#
23# Globals
24#
25VBOX_PATH_DI_SRC := $(PATH_SUB_CURRENT)
26VBOX_DI_OUT_DIR := $(PATH_TARGET)/Installer/darwin
27BLDDIRS += $(VBOX_DI_OUT_DIR)
28
29VBOX_DI_FN_DEP_BOTH = $(VBOX_PATH_DIST)/$1
30ifeq ($(KBUILD_TARGET_ARCH),x86)
31 VBOX_DI_FN_DEP_32 = $(VBOX_PATH_DIST)/$1
32 VBOX_DI_FN_DEP_64 =
33else
34 VBOX_DI_FN_DEP_64 = $(VBOX_PATH_DIST)/$1
35 VBOX_DI_FN_DEP_32 =
36endif
37VBOX_PATH_DIST_OTHER = $(error VBOX_PATH_DIST_OTHER used in a non-combined package deal)
38
39ifndef VBOX_WITH_QTGUI_V5
40 VBOX_QT_VERSION_MAJOR = 4
41 PATH_SDK_QT = $(PATH_SDK_QT4)
42else # VBOX_WITH_QTGUI_V5
43 VBOX_QT_VERSION_MAJOR = 5
44 PATH_SDK_QT = $(PATH_SDK_QT5)
45endif # VBOX_WITH_QTGUI_V5
46
47# Unset this to speed up things during makefile hacking.
48VBOX_DARWIN_INST_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT)
49
50# The location of the pkgbuild program.
51ifndef VBOX_PKGBUILD
52 VBOX_PKGBUILD := pkgbuild
53endif
54
55# The location of the productbuild program.
56ifndef VBOX_PRODUCTBUILD
57 VBOX_PRODUCTBUILD := productbuild
58endif
59
60# Where we do the packing (override this in LocalConfig.kmk if building on smbfs).
61ifndef VBOX_PATH_PACK_TMP
62 VBOX_PATH_PACK_TMP := $(VBOX_DI_OUT_DIR)
63endif
64
65# Shorthand for $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app
66VBOX_PATH_VBOX_APP_TMP := $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app
67
68
69#
70# Install the darwin docs/license.
71#
72INSTALLS += darwin-docs
73darwin-docs_INST = $(INST_DIST)
74darwin-docs_MODE = a+r,u+w
75darwin-docs_SOURCES = \
76 $(VBOX_BRAND_LICENSE_TXT)=>LICENSE
77
78
79#
80# The packing.
81#
82PACKING += $(VBOX_PATH_DIST)/VirtualBox-$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)-r$(VBOX_SVN_REV).dmg
83#OTHER_CLEAN = TODO
84
85
86include $(FILE_KBUILD_SUB_FOOTER)
87
88
89#
90# We're running commands as root here, take some care and assertion
91# a sane environment.
92#
93ifeq ($(strip $(VBOX_PATH_DIST)),)
94 $(error VBOX_PATH_DIST=$(VBOX_PATH_DIST))
95endif
96ifeq ($(strip $(VBOX_PATH_DIST)),/)
97 $(error VBOX_PATH_DIST=$(VBOX_PATH_DIST))
98endif
99ifeq ($(strip $(VBOX_PATH_PACK_TMP)),)
100 $(error VBOX_PATH_PACK_TMP=$(VBOX_PATH_PACK_TMP))
101endif
102ifeq ($(strip $(VBOX_PATH_PACK_TMP)),/)
103 $(error VBOX_PATH_PACK_TMP=$(VBOX_PATH_PACK_TMP))
104endif
105
106
107# Check for additional manuals
108VBOX_ADD_MANUALS := $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual_$(f).pdf)
109
110VBOX_ADD_MANUAL_de_DE := $(filter $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual_de_DE.pdf,$(VBOX_ADD_MANUALS))
111VBOX_ADD_MANUAL_fr_FR := $(filter $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual_fr_FR.pdf,$(VBOX_ADD_MANUALS))
112
113#
114# The disk image.
115#
116$(VBOX_PATH_DIST)/VirtualBox-$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)-r$(VBOX_SVN_REV).dmg: \
117 $(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox.pkg \
118 $(VBOX_BRAND_DARWIN_DISKIMAGE_BG) \
119 $(VBOX_BRAND_DARWIN_DISKIMAGE_DS_STORE) \
120 $$(wildcard $(VBOX_PATH_DI_SRC)/DiskImage/*) \
121 $(if $(VBOX_WITH_DOCS_PACKING), \
122 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual.pdf \
123 $(VBOX_ADD_MANUALS)) \
124 $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
125 $(call MSG_TOOL,hdiutil,,,$@)
126 @# Cleanup any previously failed attempts and various trash.
127 sudo rm -Rf $(VBOX_PATH_PACK_TMP)/DiskImage.tmp
128 $(MKDIR) -p $(VBOX_PATH_PACK_TMP)/DiskImage.tmp/
129 sudo mv $(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox.pkg $(VBOX_PATH_PACK_TMP)/DiskImage.tmp/
130 sudo rm -Rf \
131 $@ \
132 $(VBOX_PATH_PACK_TMP)/DiskImage/
133 sudo mv $(VBOX_PATH_PACK_TMP)/DiskImage.tmp $(VBOX_PATH_PACK_TMP)/DiskImage
134 @# Remove .dmg packages from old depend builds
135 $(QUIET)$(RM) -f $(wildcard $(VBOX_PATH_DIST)/VirtualBox-*-r*.dmg)
136 @# Populate the image with uninstaller, readme, picture, and .VolumeIcon.icns. (TODO)
137 $(INSTALL) $(VBOX_PATH_DI_SRC)/DiskImage/VirtualBox_Uninstall.tool $(VBOX_PATH_PACK_TMP)/DiskImage/
138if defined(VBOX_SIGNING_MODE) && defined(VBOX_NOT_OSX_105)
139 $(call VBOX_SIGN_FILE_FN,$(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox_Uninstall.tool,org.virtualbox.dmg.uninstaller)
140endif
141ifeq (1,1)
142 @# Pedantic mode...
143 $(INSTALL) -m 644 $(VBOX_BRAND_DARWIN_DISKIMAGE_DS_STORE) $(VBOX_PATH_PACK_TMP)/DiskImage/.DS_Store
144 $(MKDIR) $(VBOX_PATH_PACK_TMP)/DiskImage/.background
145 $(INSTALL) -m 644 $(VBOX_BRAND_DARWIN_DISKIMAGE_BG) $(VBOX_PATH_PACK_TMP)/DiskImage/.background/vbox_folder.tiff
146 ifdef VBOX_WITH_BUNDLED_INSTALLER
147 $(if $(VBOX_WITH_DOCS_PACKING), \
148 $(INSTALL) -m 644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual.pdf $(VBOX_PATH_PACK_TMP)/DiskImage/User\ Manual.pdf$(NLTAB) \
149 $(if $(VBOX_ADD_MANUAL_de_DE),$(INSTALL) -m 644 $(VBOX_ADD_MANUAL_de_DE) "$(VBOX_PATH_PACK_TMP)/DiskImage/$(VBOX_BRAND_de_DE_MANUAL_NAME).pdf"$(NLTAB)) \
150 $(if $(VBOX_ADD_MANUAL_fr_FR),$(INSTALL) -m 644 $(VBOX_ADD_MANUAL_fr_FR) "$(VBOX_PATH_PACK_TMP)/DiskImage/$(VBOX_BRAND_fr_FR_MANUAL_NAME).pdf"$(NLTAB)))
151 # Rename the main package
152 else
153 $(if $(VBOX_WITH_DOCS_PACKING), $(INSTALL) $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual.pdf $(VBOX_PATH_PACK_TMP)/DiskImage/)
154 $(LN) -s /Applications/ $(VBOX_PATH_PACK_TMP)/DiskImage/Applications
155 endif
156endif
157 @# hdiutil of OS X 10.10 adds a .Trashes directory and some suggest this may upset the image size calculations (-5341).
158 $(MKDIR) -m 1333 $(VBOX_PATH_PACK_TMP)/DiskImage/.Trashes
159 @# Change the owners.
160 sudo chown -R root:admin $(VBOX_PATH_PACK_TMP)/DiskImage
161 @# Create the image. We calculate the size our selves, adding 8MB for fudging (it's about 100-120MB atm).
162 sudo hdiutil create -format UDBZ -volname "VirtualBox" -srcfolder "$(VBOX_PATH_PACK_TMP)/DiskImage" \
163 -size $(DOLLAR)((`/usr/bin/du -d 0 -k "$(VBOX_PATH_PACK_TMP)/DiskImage/" | /usr/bin/cut -f1` + 8192))k \
164 "$@"
165 @# Change (back) the owner so it can be deleted by the user.
166 sudo chown "$(shell whoami)" "$@"
167 sudo chown -R "$(shell whoami)" $(VBOX_PATH_PACK_TMP)/DiskImage
168
169#
170# The meta-package.
171#
172$(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox.pkg: \
173 $(VBOX_PATH_PACK_TMP)/Packages/VBoxKEXTs.pkg \
174 $(VBOX_PATH_PACK_TMP)/Packages/VirtualBoxCLI.pkg \
175 $(VBOX_PATH_PACK_TMP)/Packages/VirtualBox.pkg \
176 $$(wildcard $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/* \
177 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/*.lproj/*) \
178 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), $(VBOX_BRAND_$(f)_VIRTUALBOX_WELCOME_RTF)) \
179 $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
180 $(call MSG_TOOL,productbuild,,,$@)
181 @# Cleanup any previously failed attempts.
182 sudo rm -Rf \
183 $@ \
184 $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.root \
185 $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.desc \
186 $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res
187 @# Correct directory permissions are important.
188 $(MKDIR) -p \
189 $(@D) \
190 $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.desc \
191 $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res \
192 $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/English.lproj
193 @# Do keyword replacement in the package info and description files.
194 $(SED) \
195 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
196 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
197 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
198 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
199 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
200 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
201 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
202 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/English.lproj/Welcome.rtf \
203 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Welcome.rtf
204 @# Copy the resources.
205 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Conclusion.rtf $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/English.lproj/Conclusion.rtf
206 $(SED) \
207 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
208 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
209 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
210 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/English.lproj/Localizable.strings \
211 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Localizable.strings
212 $(INSTALL) -m 0644 $(VBOX_BRAND_DARWIN_INSTALLER_BG) $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/background.tif
213 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
214 $(MKDIR) -p \
215 $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj$(NLTAB) \
216 $(SED) \
217 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
218 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
219 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
220 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
221 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Welcome.rtf \
222 $(VBOX_BRAND_$(f)_VIRTUALBOX_WELCOME_RTF)$(NLTAB) \
223 $(INSTALL) -m 0644 $(VBOX_BRAND_$(f)_VIRTUALBOX_CONCLUSION_RTF) $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Conclusion.rtf$(NLTAB) \
224 $(SED) \
225 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
226 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
227 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
228 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Localizable.strings \
229 $(VBOX_BRAND_$(f)_VIRTUALBOX_LOCALIZABLE_STRINGS)$(NLTAB) \
230 )
231 @# Build the package.
232 $(VBOX_PRODUCTBUILD) \
233 --distribution $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/distribution.dist \
234 --package-path $(VBOX_PATH_PACK_TMP)/Packages \
235 --resources $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res \
236 --identifier org.VirtualBox.mpkg.virtualbox \
237 --version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
238 $(if $(VBOX_MACOSX_INSTALLER_SIGN),--sign "$(VBOX_MACOSX_INSTALLER_SIGN)",) \
239 $@
240 @# Cleanup.
241 sudo rm -Rf \
242 $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.root \
243 $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.desc \
244 $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res
245
246
247#
248# The VirtualBox Kernel extensions.
249#
250VBOX_DI_KEXTS_UNIVERSAL = VBoxDrv VBoxNetFlt VBoxNetAdp VBoxUSB
251VBOX_DI_KEXTS = $(VBOX_DI_KEXTS_UNIVERSAL)
252
253$(VBOX_PATH_PACK_TMP)/Packages/VBoxKEXTs.pkg: \
254 $(foreach kext,$(VBOX_DI_KEXTS_UNIVERSAL), $(call VBOX_DI_FN_DEP_BOTH,$(kext).kext/Contents/MacOS/$(kext))) \
255 $(foreach kext,$(VBOX_DI_KEXTS), $(VBOX_PATH_DIST)/$(kext).kext/Contents/Info.plist) \
256 $$(wildcard $(VBOX_PATH_DI_SRC)/VBoxKEXTs/* \
257 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/*.lproj/*) \
258 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
259 $(VBOX_BRAND_$(f)_VBOXKEXTS_DESCRIPTION_PLIST) \
260 $(VBOX_BRAND_$(f)_VBOXKEXTS_README_HTML) \
261 $(VBOX_BRAND_$(f)_VBOXKEXTS_INSTALLATIONCHECK_STRINGS)) \
262 $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
263 $(call MSG_TOOL,pkgbuild,,,$@)
264 @# Cleanup any previously failed attempts.
265 sudo rm -Rf \
266 $@ \
267 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root \
268 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc \
269 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res
270 @# Correct directory permissions are important.
271 $(MKDIR) -p \
272 $(@D) \
273 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc \
274 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res \
275 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/English.lproj
276 $(MKDIR) -p -m 0755 \
277 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root \
278 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/LaunchDaemons \
279 $(foreach kext,$(VBOX_DI_KEXTS), \
280 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext \
281 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext/Contents \
282 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext/Contents/MacOS )
283 @# Copy the launch daemon bits.
284 $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/VirtualBoxStartup.sh $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/LaunchDaemons/
285 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/org.virtualbox.startup.plist $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/LaunchDaemons/
286 @# Copy the common files (Info.plist).
287 $(foreach kext,$(VBOX_DI_KEXTS), \
288 $(NLTAB)$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/$(kext).kext/Contents/Info.plist $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext/Contents/)
289 @# Copy the binaries and invoking lipo.
290 $(foreach kext,$(VBOX_DI_KEXTS), \
291 $(NLTAB)$(INSTALL) -m 0755 $(VBOX_PATH_DIST)/$(kext).kext/Contents/MacOS/$(kext) $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext/Contents/MacOS/)
292 @# Signed the kext bundles.
293ifdef VBOX_SIGNING_MODE
294 $(foreach kext,$(VBOX_DI_KEXTS) \
295 ,$(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext/Contents/MacOS/$(kext),org.virtualbox.app.kext.$(kext)) )
296 $(foreach kext,$(VBOX_DI_KEXTS), \
297 $(NLTAB)$(call VBOX_SIGN_BUNDLE_FN,$(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext,org.virtualbox.app.kext.$(kext)) )
298## @TODO check why this fails on the build box: $(foreach kext,$(VBOX_DI_KEXTS), $(NLTAB)codesign --verify --verbose=1 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext )
299endif
300 @# Set the correct owners.
301 sudo chown -R root:wheel $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/
302 @# Do keyword replacement in the package info and description files.
303 $(SED) \
304 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
305 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
306 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
307 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
308 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
309 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
310 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
311 --output $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc/PkgBuildComponent.plist \
312 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/PkgBuildComponent.plist
313 @# Copy the resources.
314 $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/postflight $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/
315 @# Build the package.
316 $(VBOX_PKGBUILD) \
317 --root $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/ \
318 --component-plist $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc/PkgBuildComponent.plist \
319 --script $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res \
320 --identifier org.virtualbox.pkg.vboxkexts \
321 --version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
322 --install-location "/Library/Application Support/VirtualBox" \
323 --ownership preserve \
324 $(if $(VBOX_MACOSX_INSTALLER_SIGN),--sign "$(VBOX_MACOSX_INSTALLER_SIGN)",) \
325 $@
326 @# Cleanup
327 sudo chown -R "$(shell whoami)" \
328 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root
329 sudo rm -Rf \
330 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root \
331 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc \
332 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res
333
334
335#
336# Figure out which languages that we support and construct
337# .qm and .lproj lists for these.
338#
339include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
340VBOX_INSTALL_LANG_FILES := $(foreach f,$(VBOX_APPROVED_GUI_LANGUAGES), VirtualBox_$(f).qm qt_$(f).qm)
341VBOX_INSTALL_LANG_LPROJ := $(addsuffix .lproj,$(VBOX_APPROVED_GUI_LANGUAGES))
342
343
344#
345# The VirtualBox Application.
346#
347
348VBOX_DI_VBAPP_DYLIBS = \
349 $(foreach qtmod, $(VBOX_QT_MOD_NAMES), Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod)) \
350 MacOS/VBoxDD.dylib \
351 MacOS/VBoxDD2.dylib \
352 MacOS/VBoxDDU.dylib \
353 $(if $(VBOX_WITH_REM),MacOS/VBoxREM.dylib,) \
354 MacOS/VBoxRT.dylib \
355 $(if $(VBOX_WITH_SHARED_FOLDERS),MacOS/VBoxSharedFolders.dylib,) \
356 $(if $(VBOX_WITH_SHARED_CLIPBOARD),MacOS/VBoxSharedClipboard.dylib,) \
357 $(if $(VBOX_WITH_DRAG_AND_DROP),MacOS/VBoxDragAndDropSvc.dylib,) \
358 $(if $(VBOX_WITH_GUEST_PROPS),MacOS/VBoxGuestPropSvc.dylib,) \
359 MacOS/VBoxHostChannel.dylib \
360 MacOS/VBoxVMM.dylib \
361 MacOS/VBoxXPCOM.dylib \
362 MacOS/VBoxXPCOMC.dylib \
363 MacOS/components/VBoxC.dylib \
364 MacOS/components/VBoxSVCM.dylib \
365 MacOS/components/VBoxXPCOMIPCC.dylib \
366 MacOS/VBoxAuth.dylib \
367 MacOS/VBoxAuthSimple.dylib \
368 $(if $(VBOX_WITH_GUEST_CONTROL),MacOS/VBoxGuestControlSvc.dylib,)
369ifneq ($(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/accessible/libqtaccessiblewidgets.dylib),)
370 VBOX_DI_VBAPP_DYLIBS += \
371 MacOS/accessible/libqtaccessiblewidgets.dylib
372endif
373if defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL)
374 VBOX_DI_VBAPP_DYLIBS += \
375 MacOS/VBoxVRDP.dylib
376endif
377ifdef VBOX_WITH_CROGL
378 VBOX_DI_VBAPP_DYLIBS += \
379 MacOS/VBoxOGLhostcrutil.dylib \
380 MacOS/VBoxOGLhosterrorspu.dylib \
381 MacOS/VBoxOGLrenderspu.dylib \
382 MacOS/VBoxSharedCrOpenGL.dylib
383
384 ifdef VBOX_WITH_CR_DISPLAY_LISTS
385 VBOX_DI_VBAPP_DYLIBS += \
386 MacOS/VBoxOGLexpandospu.dylib
387 endif
388endif
389ifdef VBOX_WITH_DEBUGGER_GUI
390 VBOX_DI_VBAPP_DYLIBS += \
391 MacOS/VBoxDbg.dylib \
392 MacOS/DbgPlugInDiggers.dylib
393endif
394ifdef VBOX_WITH_HARDENING
395 VBOX_DI_VBAPP_DYLIBS += \
396 MacOS/VirtualBox.dylib \
397 MacOS/VBoxNetDHCP.dylib \
398 MacOS/VBoxNetNAT.dylib \
399 MacOS/VBoxHeadless.dylib
400endif
401ifdef VBOX_WITH_HDDPARALLELS_INSTALL
402 VBOX_DI_VBAPP_DYLIBS += \
403 MacOS/VBoxHDDParallels.dylib
404endif
405if defined(VBOX_WITH_PYTHON) && !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6)
406 VBOX_DI_VBAPP_DYLIBS += \
407 MacOS/VBoxPython2_6.so
408endif
409if defined(VBOX_WITH_PYTHON) && !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_7)
410 VBOX_DI_VBAPP_DYLIBS += \
411 MacOS/VBoxPython2_7.so
412endif
413ifdef VBOX_WITH_VMSVGA3D
414 VBOX_DI_VBAPP_DYLIBS += \
415 MacOS/VBoxSVGA3D.dylib \
416 MacOS/VBoxSVGA3DObjC.dylib
417endif
418
419ifdef VBOX_WITH_REM
420 VBOX_DI_VBAPP_DYLIBS.x86 := \
421 MacOS/VBoxREM32.dylib \
422 MacOS/VBoxREM64.dylib
423endif
424ifdef VBOX_WITH_PYTHON
425 VBOX_DI_VBAPP_DYLIBS.x86 += \
426 MacOS/VBoxPython2_5.so \
427 $(if-expr defined(VBOX_WITH_MAC_OS_X_10_4_SUPPORT),MacOS/VBoxPython2_3.so,)
428endif
429
430VBOX_DI_VBAPP_DYLIBS.amd64 :=
431if defined(VBOX_WITH_PYTHON) && defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6)
432 VBOX_DI_VBAPP_DYLIBS.amd64 += \
433 MacOS/VBoxPython2_6.so
434endif
435
436if defined(VBOX_WITH_JXPCOM)
437 VBOX_DI_VBAPP_DYLIBS += \
438 MacOS/libvboxjxpcom.jnilib
439endif
440
441if1of ($(VBOX_DI_VBAPP_DYLIBS.amd64), $(VBOX_DI_VBAPP_DYLIBS.x86))
442 $(error Conflict.$(NLTAB)VBOX_DI_VBAPP_DYLIBS.amd64=$(VBOX_DI_VBAPP_DYLIBS.amd64)$(NLTAB)VBOX_DI_VBAPP_DYLIBS.x86 =$(VBOX_DI_VBAPP_DYLIBS.x86))
443endif
444if1of ($(VBOX_DI_VBAPP_DYLIBS.amd64) $(VBOX_DI_VBAPP_DYLIBS.x86),$(VBOX_DI_VBAPP_DYLIBS))
445 $(error Conflict.$(NLTAB)VBOX_DI_VBAPP_DYLIBS.amd64=$(VBOX_DI_VBAPP_DYLIBS.amd64)$(NLTAB)VBOX_DI_VBAPP_DYLIBS.x86 =$(VBOX_DI_VBAPP_DYLIBS.x86)$(NLTAB)VBOX_DI_VBAPP_DYLIBS=$(VBOX_DI_VBAPP_DYLIBS))
446endif
447
448VBOX_DI_VBAPP_PROGS = \
449 MacOS/VBoxManage \
450 MacOS/VBoxSVC \
451 MacOS/VBoxHeadless \
452 MacOS/VBoxXPCOMIPCD \
453 MacOS/VBoxNetAdpCtl \
454 MacOS/VBoxNetDHCP \
455 MacOS/VBoxNetNAT \
456 MacOS/VBoxExtPackHelperApp \
457 MacOS/VBoxBalloonCtrl \
458 MacOS/VBoxAutostart \
459 MacOS/VirtualBoxVM \
460 $(if $(VBOX_WITH_WEBSERVICES),MacOS/vboxwebsrv) \
461 MacOS/VirtualBox \
462 $(if $(VBOX_WITH_DTRACE),MacOS/VBoxDTrace,)
463
464VBOX_DI_VBAPP_UNIVERSAL_PROGS = \
465 MacOS/vmstarter \
466 $(if $(VBOX_WITH_VBOX_IMG)$(VBOX_WITH_TESTCASES),MacOS/vbox-img,)
467
468VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS = \
469 MacOS/VMMR0.r0 \
470 MacOS/VBoxDDR0.r0 \
471 MacOS/VBoxDD2R0.r0
472
473ifdef VBOX_WITH_RAW_MODE
474 VBOX_DI_VBAPP_OTHER_BINS = \
475 MacOS/VMMRC.rc \
476 MacOS/VBoxDDRC.rc \
477 MacOS/VBoxDD2RC.rc
478else
479 VBOX_DI_VBAPP_OTHER_BINS =
480endif
481
482VBOX_DI_VBAPP_DUPLICATED_RESOURCE_FILES = \
483 Resources/virtualbox.icns \
484 Resources/virtualbox.png \
485 Resources/virtualbox-vbox.icns \
486 Resources/virtualbox-vbox-extpack.icns \
487 Resources/virtualbox-ovf.icns \
488 Resources/virtualbox-ova.icns \
489 Resources/virtualbox-vdi.icns \
490 Resources/virtualbox-vmdk.icns \
491 Resources/virtualbox-vhd.icns \
492 Resources/virtualbox-hdd.icns
493
494VBOX_DI_VBAPP_MISC_FILES = \
495 Info.plist \
496 PkgInfo \
497 $(VBOX_DI_VBAPP_DUPLICATED_RESOURCE_FILES) \
498 MacOS/components/VBoxXPCOMBase.xpt \
499 MacOS/components/VirtualBox_XPCOM.xpt \
500 Resources/VirtualBoxVM.app/Contents/Info.plist \
501 Resources/VirtualBoxVM.app/Contents/PkgInfo \
502 $(addprefix Resources/VirtualBoxVM.app/Contents/,$(VBOX_DI_VBAPP_DUPLICATED_RESOURCE_FILES)) \
503 Resources/vmstarter.app/Contents/Info.plist \
504 Resources/vmstarter.app/Contents/PkgInfo \
505 $(addprefix Resources/vmstarter.app/Contents/,$(VBOX_DI_VBAPP_DUPLICATED_RESOURCE_FILES))
506ifdef VBOX_WITH_DOCS_PACKING
507VBOX_DI_VBAPP_MISC_FILES += \
508 MacOS/UserManual.pdf
509endif
510ifdef VBOX_WITH_ADDITIONS_PACKING
511 ifneq ($(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso),)
512 VBOX_DI_VBAPP_MISC_FILES += \
513 MacOS/VBoxGuestAdditions.iso
514 endif
515endif
516ifdef VBOX_WITH_EFIFW_PACKING
517VBOX_DI_VBAPP_MISC_FILES += \
518 MacOS/VBoxEFI32.fd \
519 MacOS/VBoxEFI64.fd
520endif
521ifndef VBOX_WITH_QTGUI_V5
522 VBOX_DI_VBAPP_MISC_FILES += \
523 Frameworks/QtGui$(VBOX_QT_INFIX).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/Resources/qt_menu.nib/classes.nib \
524 Frameworks/QtGui$(VBOX_QT_INFIX).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/Resources/qt_menu.nib/info.nib \
525 Frameworks/QtGui$(VBOX_QT_INFIX).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/Resources/qt_menu.nib/keyedobjects.nib
526else
527 VBOX_DI_VBAPP_DYLIBS += \
528 plugins/platforms/libqcocoa$(SUFF_DLL) \
529 plugins/platforms/libqminimal$(SUFF_DLL) \
530 plugins/platforms/libqoffscreen$(SUFF_DLL)
531endif # VBOX_WITH_QTGUI_V5
532VBOX_DI_VBAPP_MISC_FILES += \
533 $(foreach qtmod, $(VBOX_QT_MOD_NAMES), Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/Resources/Info.plist)
534
535VBOX_DI_VBAPP_SYMLINKS = \
536 Resources/VirtualBoxVM.app/Contents/MacOS=>../../../MacOS/ \
537 Resources/vmstarter.app/Contents/MacOS=>../../../MacOS/ \
538 $(foreach qtmod, $(VBOX_QT_MOD_NAMES) \
539 ,Frameworks/$(qtmod).framework/Versions/Current=>$(VBOX_QT_VERSION_MAJOR) )
540ifndef VBOX_NOT_OSX_105
541VBOX_DI_VBAPP_SYMLINKS += $(foreach qtmod, $(VBOX_QT_MOD_NAMES) \
542 ,Frameworks/$(qtmod).framework/$(qtmod)=>Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod) \
543 Frameworks/$(qtmod).framework/Resources=>Versions/$(VBOX_QT_VERSION_MAJOR)/Resources/ )
544endif
545
546ifdef VBOX_WITH_PYTHON
547 # Python XPCOM glue
548 VBOX_DI_VBAPP_PYTHON_FILES = \
549 $(VBOXINST_SDK_BINDINGS_XPCOM_PYTHON_FILES) \
550 $(VBOXINST_SDK_INSTALLER_PYTHON_FILES)
551endif
552
553
554# (The dependencies are including way too much here because I'm lazy.)
555$(VBOX_PATH_PACK_TMP)/Packages/VirtualBox.pkg: \
556 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \
557 $(VBOX_BRAND_$(f)_VIRTUALBOX_DESCRIPTION_PLIST)) \
558 $(foreach f, $(VBOX_DI_VBAPP_DYLIBS) $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) $(VBOX_DI_VBAPP_OTHER_BINS) $(VBOX_DI_VBAPP_PROGS) $(VBOX_DI_VBAPP_MISC_FILES)\
559 ,$(call VBOX_DI_FN_DEP_BOTH,VirtualBox.app/Contents/$(f)) ) \
560 $(foreach f, $(VBOX_DI_VBAPP_DYLIBS.x86) $(VBOX_DI_VBAPP_MISC_FILES.x86)\
561 ,$(call VBOX_DI_FN_DEP_32,VirtualBox.app/Contents/$(f)) ) \
562 $(foreach f, $(VBOX_DI_VBAPP_DYLIBS.amd64) $(VBOX_DI_VBAPP_MISC_FILES.amd64)\
563 ,$(call VBOX_DI_FN_DEP_64,VirtualBox.app/Contents/$(f)) ) \
564 \
565 $(if $(VBOX_WITH_DOCS_PACKING),$(VBOX_ADD_MANUALS),) \
566 $(VBOX_BRAND_LICENSE_TXT) \
567 $(wildcard $(VBOX_PATH_DI_SRC)/VirtualBox/*) \
568 $(wildcard $(VBOX_PATH_DI_SRC)/VirtualBox/*.lproj/*) \
569 $$(addprefix $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/nls/,$(VBOX_INSTALL_LANG_FILES)) \
570 \
571 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/*) \
572 $(filter-out Disabled, $(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/*)) \
573 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/*) \
574 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/*) \
575 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/Resources/*) \
576 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/Resources/*.lproj/*) \
577 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/vmstarter.app/Contents/*) \
578 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/vmstarter.app/Contents/Resources/*) \
579 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/vmstarter.app/Contents/Resources/*.lproj/*) \
580 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/*.lproj/*) \
581 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/*) \
582 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/additions/*) \
583 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/components/*) \
584 $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/accessible/*) \
585 $(if-expr defined(VBOX_WITH_PYTHON), $(addprefix $(VBOX_PATH_DIST)/, $(VBOX_DI_VBAPP_PYTHON_FILES)),) \
586 $(if-expr defined(VBOX_WITH_JXPCOM), $(addprefix $(VBOX_PATH_DIST)/, sdk/bindings/xpcom/java/vboxjxpcom.jar),) \
587 $(if $(VBOX_WITH_WEBSERVICES),$(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxwebsrv.plist,) \
588 $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxballoonctrl.plist \
589 $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxautostart.plist \
590 $(VBOX_PATH_DI_SRC)/VirtualBox/VBoxAutostartDarwin.sh \
591 $(if-expr defined(VBOX_WITH_DTRACE), \
592 $(foreach f, $(VBOXINST_DTRACE_LIB_ARCH_FILES), \
593 $(call VBOX_DI_FN_DEP_32,VirtualBox.app/Contents/MacOS/dtrace/lib/x86/$f) \
594 $(call VBOX_DI_FN_DEP_64,VirtualBox.app/Contents/MacOS/dtrace/lib/amd64/$f)) \
595 $(foreach f, $(VBOXINST_DTRACE_TESTCASE_ARCH_FILES), \
596 $(call VBOX_DI_FN_DEP_32,VirtualBox.app/Contents/MacOS/dtrace/testcase/x86/$f) \
597 $(call VBOX_DI_FN_DEP_64,VirtualBox.app/Contents/MacOS/dtrace/testcase/amd64/$f)) \
598 $(addprefix $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/dtrace/scripts/,$(VBOXINST_DTRACE_SCRIPTS_FILES)) \
599 ,) \
600 $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
601 $(call MSG_TOOL,pkgbuild,,,$@)
602 @# Cleanup any previously failed attempts.
603 sudo rm -Rf \
604 $@ \
605 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root \
606 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc \
607 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res
608 @# Correct directory permissions are important.
609 $(MKDIR) -p \
610 $(@D) \
611 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc \
612 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res \
613 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/English.lproj
614 $(MKDIR) -p -m 0775 \
615 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications
616 $(MKDIR) -p -m 0755 $(sort \
617 $(VBOX_PATH_VBOX_APP_TMP)/Contents \
618 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS \
619 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/components \
620 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/nls \
621 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/accessible \
622 $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources \
623 $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/VirtualBoxVM.app \
624 $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/VirtualBoxVM.app/Contents \
625 $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/vmstarter.app \
626 $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/vmstarter.app/Contents \
627 $(if-expr defined(VBOX_WITH_PYTHON), \
628 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk \
629 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/installer \
630 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/installer/vboxapi \
631 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/ \
632 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom \
633 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom/python \
634 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom/python/xpcom \
635 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom/python/xpcom/client \
636 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom/python/xpcom/server,) \
637 $(if-expr defined(VBOX_WITH_JXPCOM), \
638 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom/java,) \
639 $(addprefix $(VBOX_PATH_VBOX_APP_TMP)/Contents/,$(dir \
640 $(VBOX_DI_VBAPP_DYLIBS) \
641 $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) \
642 $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) \
643 $(VBOX_DI_VBAPP_OTHER_BINS) \
644 $(VBOX_DI_VBAPP_PROGS) \
645 $(VBOX_DI_VBAPP_MISC_FILES) \
646 $(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \
647 $(VBOX_DI_VBAPP_MISC_FILES.$(KBUILD_TARGET_ARCH)) \
648 ))\
649 )
650# Create the .lproj language directories
651 $(MKDIR) -p -m 0755 \
652 $(addprefix $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/,$(VBOX_INSTALL_LANG_LPROJ))
653# Install all supported language files
654 $(foreach f, $(VBOX_INSTALL_LANG_FILES) \
655 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/nls/$(f) $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/nls/$(f)$(NLTAB))
656ifdef VBOX_WITH_WEBSERVICES
657 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxwebsrv.plist $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/
658endif
659 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxballoonctrl.plist $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/
660 $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxautostart.plist $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/
661 $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VirtualBox/VBoxAutostartDarwin.sh $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/
662# Install the python bridge stuff
663ifdef VBOX_WITH_PYTHON
664 $(foreach f,$(VBOX_DI_VBAPP_PYTHON_FILES) \
665 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/$(f) $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/$(f)$(NLTAB) )
666 $(INSTALL) -m 0755 $(PATH_ROOT)/src/VBox/Frontends/VBoxShell/vboxshell.py $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS
667endif
668# Install the java bridge stuff
669ifdef VBOX_WITH_JXPCOM
670 $(INSTALL) -m 0755 $(VBOX_PATH_DIST)/sdk/bindings/xpcom/java/vboxjxpcom.jar $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom/java/vboxjxpcom.jar
671endif
672# Copy misc files.
673 $(foreach f,$(VBOX_DI_VBAPP_MISC_FILES) \
674 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(f) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(f)$(NLTAB) )
675 $(INSTALL) -m 644 $(VBOX_BRAND_LICENSE_TXT) $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/LICENSE
676ifdef VBOX_WITH_DOCS_PACKING
677 $(foreach f,$(VBOX_ADD_MANUALS) \
678 ,$(INSTALL) -m 0644 $(f) $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/$(NLTAB))
679endif
680 @# Create symlinks.
681 $(foreach symlink,$(VBOX_DI_VBAPP_SYMLINKS) $(VBOX_DI_VBAPP_SYMLINKS.$(KBUILD_TARGET_ARCH)) \
682 ,$(LN) -s $(word 2,$(subst =>, ,$(symlink))) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(word 1,$(subst =>, ,$(symlink)))$(NLTAB))
683 @# Copy the dylibs.
684 $(foreach dylib, $(VBOX_DI_VBAPP_DYLIBS) $(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \
685 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(dylib) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(dylib)$(NLTAB))
686 @# Copy the other binaries.
687 $(foreach otherbin, $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) $(VBOX_DI_VBAPP_OTHER_BINS) \
688 ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(otherbin) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(otherbin)$(NLTAB))
689 @# Create/copy the universal executable binaries.
690 $(foreach otherbin, $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) \
691 ,$(INSTALL) -m 0755 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(otherbin) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(otherbin)$(NLTAB))
692 @# Copy the binaries.
693 $(foreach prog, $(VBOX_DI_VBAPP_PROGS) \
694 ,$(INSTALL) -m 0755 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(prog) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(prog)$(NLTAB))
695#ifdef VBOX_WITH_HARDENING - disabled temporarily
696if 1
697 @# We cannot use @executable_path together with setuid binaries, dyld gets upset about it. So, fix Qt libs and users.
698 $(foreach qtmod, $(VBOX_QT_MOD_NAMES) \
699 ,install_name_tool -id /Applications/VirtualBox.app/Contents/Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod) \
700 $(VBOX_PATH_VBOX_APP_TMP)/Contents/Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod)$(NLTAB) )
701 $(foreach f, \
702 $(VBOX_DI_VBAPP_DYLIBS) \
703 $(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \
704 $(VBOX_DI_VBAPP_PROGS) \
705 ,install_name_tool \
706 $(foreach qtmod, $(VBOX_QT_MOD_NAMES), \
707 -change @executable_path/../Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod) \
708 /Applications/VirtualBox.app/Contents/Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod) \
709 -change $(VBOX_PATH_QT)/Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod) \
710 /Applications/VirtualBox.app/Contents/Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod) \
711 -change $(PATH_SDK_QT)/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod) \
712 /Applications/VirtualBox.app/Contents/Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod) \
713 -change $(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod) \
714 /Applications/VirtualBox.app/Contents/Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod) \
715 ) \
716 $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(f)$(NLTAB) )
717endif
718ifdef VBOX_WITH_QTGUI_V5
719 $(QUIET)$(APPEND) $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/qt.conf "[Paths]"
720 $(QUIET)$(APPEND) $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/qt.conf "Prefix =" /Applications/VirtualBox.app/Contents
721 $(QUIET)$(APPEND) $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/VirtualBoxVM.app/Contents/Resources/qt.conf "[Paths]"
722 $(QUIET)$(APPEND) $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/VirtualBoxVM.app/Contents/Resources/qt.conf "Prefix =" /Applications/VirtualBox.app/Contents
723endif # VBOX_WITH_QTGUI_V5
724ifdef VBOX_WITH_DTRACE
725 @# DTrace library, testcases and scripts.
726 $(MKDIR) -p -m 0755 -- \
727 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/dtrace/lib/$(KBUILD_TARGET_ARCH)/ \
728 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/dtrace/testcase/$(KBUILD_TARGET_ARCH)/ \
729 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/dtrace/scripts/
730 $(foreach file, $(addprefix lib/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_LIB_ARCH_FILES)) \
731 $(addprefix testcase/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_TESTCASE_ARCH_FILES)) \
732 $(addprefix scripts/,$(VBOXINST_DTRACE_SCRIPTS_FILES)) \
733 ,$(INSTALL) -m 0655 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/dtrace/$(file) \
734 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/dtrace/$(file)$(NLTAB))
735endif
736
737 @# Signed the binaries and the application bundle.
738ifdef VBOX_SIGNING_MODE
739 $(foreach qtmod, $(VBOX_QT_MOD_NAMES) \
740 ,$(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod),org.virtualbox.app.frameworks.$(qtmod)) )
741 $(foreach qtmod, $(VBOX_QT_MOD_NAMES) \
742 ,$(NLTAB)$(call VBOX_SIGN_BUNDLE_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR),org.virtualbox.app.frameworks.$(qtmod)) )
743 $(foreach dylib, \
744 $(VBOX_DI_VBAPP_DYLIBS) \
745 $(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \
746 , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(dylib),org.virtualbox.app.macos.$(notdir $(dylib))) )
747 $(foreach bin, $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) \
748 , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(bin),org.virtualbox.app.macos.$(notdir $(bin))) )
749 ifdef VBOX_NOT_OSX_105 ## @todo Move as much stuff out of MacOS/ as possible!!
750 $(foreach other, $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) $(VBOX_DI_VBAPP_OTHER_BINS)\
751 , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(other),org.virtualbox.app.macos.$(notdir $(other))) )
752 $(foreach bin, $(filter-out MacOS/VirtualBox,$(VBOX_DI_VBAPP_PROGS)) \
753 , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(bin),org.virtualbox.app.macos.$(notdir $(bin))) )
754 $(foreach file, $(if-expr defined(VBOX_WITH_WEBSERVICES),MacOS/org.virtualbox.vboxwebsrv.plist,) \
755 MacOS/org.virtualbox.vboxballoonctrl.plist \
756 MacOS/org.virtualbox.vboxautostart.plist \
757 MacOS/VBoxAutostartDarwin.sh \
758 $(if-expr defined(VBOX_WITH_PYTHON),$(addprefix MacOS/, $(VBOX_DI_VBAPP_PYTHON_FILES) vboxshell.py),) \
759 $(if-expr defined(VBOX_WITH_JXPCOM),MacOS/sdk/bindings/xpcom/java/vboxjxpcom.jar,) \
760 $(filter MacOS/%,$(VBOX_DI_VBAPP_MISC_FILES)) \
761 $(if-expr defined(VBOX_WITH_DOCS_PACKING),$(addprefix MacOS/,$(VBOX_ADD_MANUALS)),) \
762 $(if-expr defined(VBOX_WITH_DTRACE),\
763 $(addprefix MacOS/dtrace/lib/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_LIB_ARCH_FILES)) \
764 $(addprefix MacOS/dtrace/testcase/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_TESTCASE_ARCH_FILES)) \
765 $(addprefix MacOS/dtrace/scripts/,$(VBOXINST_DTRACE_SCRIPTS_FILES)) ,) \
766 $(addprefix MacOS/nls/,$(VBOX_INSTALL_LANG_FILES)) \
767 , $(NLTAB)$(call VBOX_SIGN_FILE_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(file),org.virtualbox.app.$(tolower $(subst $(SP),,$(subst /,.,$(file))))) )
768
769 $(call VBOX_SIGN_BUNDLE_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/VirtualBoxVM.app,,)
770 $(call VBOX_SIGN_BUNDLE_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/vmstarter.app,,)
771 $(call VBOX_SIGN_BUNDLE_FN,$(VBOX_PATH_VBOX_APP_TMP),,--deep)
772 else
773 $(foreach other, $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) $(VBOX_DI_VBAPP_OTHER_BINS) \
774 , $(NLTAB)$(call VBOX_SIGN_VMM_MOD_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(other),org.virtualbox.app.macos.$(notdir $(other))) )
775 $(foreach bin, $(VBOX_DI_VBAPP_PROGS) \
776 , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(bin),org.virtualbox.app.macos.$(notdir $(bin))) )
777 endif
778endif
779 @# Set the correct owner and set the set-user-ID-on-execution bit on the relevant executables.
780 sudo chown -R root:admin $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root
781 sudo chmod u+s $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/VBoxNetAdpCtl
782ifdef VBOX_WITH_HARDENING
783 sudo chmod u+s \
784 $(foreach bin,VBoxHeadless VirtualBox VirtualBoxVM VBoxNetDHCP VBoxNetNAT,\
785 $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/$(bin))
786endif
787 @# Do keyword replacement in the package info and description files.
788 $(SED) \
789 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
790 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
791 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
792 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
793 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
794 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
795 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
796 --output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc/PkgBuildComponent.plist \
797 $(VBOX_PATH_DI_SRC)/VirtualBox/PkgBuildComponent.plist
798 @# Copy the resources.
799 $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VirtualBox/preflight $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/
800ifdef VBOX_WITH_HARDENING
801 $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VirtualBox/postflight $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/
802else
803 $(SED) -s '/WITH_HARDENING/d' -o $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/postflight $(VBOX_PATH_DI_SRC)/VirtualBox/postflight
804 $(CHMOD) 0755 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/postflight
805endif
806 @# Build the package.
807 $(VBOX_PKGBUILD) \
808 --root $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/ \
809 --component-plist $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc/PkgBuildComponent.plist \
810 --script $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res \
811 --identifier org.virtualbox.pkg.virtualbox \
812 --version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
813 --install-location /Applications/ \
814 --ownership preserve \
815 $(if-expr defined(VBOX_NOT_OSX_105),--preserve-xattr,) \
816 $(if $(VBOX_MACOSX_INSTALLER_SIGN),--sign "$(VBOX_MACOSX_INSTALLER_SIGN)",) \
817 $@
818 @# Cleanup
819 sudo chown -R "$(shell whoami)" \
820 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root
821 sudo chmod -R a-s \
822 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root
823 sudo rm -Rf \
824 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root \
825 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc \
826 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res
827
828#
829# The VirtualBox CLI wrapper scripts.
830#
831$(VBOX_PATH_PACK_TMP)/Packages/VirtualBoxCLI.pkg: \
832 $$(wildcard $(VBOX_PATH_DI_SRC)/VirtualBoxCLI/* \
833 $(VBOX_PATH_DI_SRC)/VirtualBoxCLI/*.lproj/*) \
834 $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES) \
835 ,$(VBOX_BRAND_$(f)_VIRTUALBOXCLI_DESCRIPTION_PLIST)) \
836 $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE)
837 $(call MSG_TOOL,pkgbuild,,,$@)
838 @# Cleanup any previously failed attempts.
839 sudo rm -Rf \
840 $@ \
841 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root \
842 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc \
843 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res
844 @# Correct directory permissions are important.
845 $(MKDIR) -p \
846 $(@D) \
847 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc \
848 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res \
849 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res/English.lproj
850 $(MKDIR) -p -m 0755 \
851 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr \
852 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin
853 @# Generate the wrapper scripts.
854 $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VirtualBox \
855 '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VirtualBox "$$@"'
856 $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxManage \
857 '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxManage "$$@"'
858 $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxVRDP \
859 '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless "$$@"'
860 $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxHeadless \
861 '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless "$$@"'
862ifdef VBOX_WITH_WEBSERVICES
863 $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/vboxwebsrv \
864 '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/vboxwebsrv "$$@"'
865endif
866if defined(VBOX_WITH_VBOX_IMG) || defined(VBOX_WITH_TESTCASES)
867 $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/vbox-img \
868 '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/vbox-img "$$@"'
869endif
870 $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxBalloonCtrl \
871 '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxBalloonCtrl "$$@"'
872 $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxAutostart \
873 '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxAutostart "$$@"'
874ifdef VBOX_WITH_DTRACE
875 $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxDTrace \
876 '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxDTrace "$$@"'
877endif
878 @# Set the correct owners and file permissions.
879 sudo chmod 0755 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/*
880 sudo chown root:admin $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root
881 sudo chown -R root:wheel $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr
882 @# Build the package.
883 $(VBOX_PKGBUILD) \
884 --root $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin \
885 --identifier org.virtualbox.pkg.virtualboxcli \
886 --version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
887 --install-location /usr/local/bin \
888 --ownership preserve \
889 $(if $(VBOX_MACOSX_INSTALLER_SIGN),--sign "$(VBOX_MACOSX_INSTALLER_SIGN)",) \
890 $@
891 @# Cleanup
892 sudo chown -R "$(shell whoami)" \
893 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root
894 sudo rm -Rf \
895 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root \
896 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc \
897 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res
898
899
900#
901# Aliases.
902#
903VBoxKEXTs.pkg: $(VBOX_PATH_PACK_TMP)/Packages/VBoxKEXTs.pkg
904VirtualBoxCLI.pkg: $(VBOX_PATH_PACK_TMP)/Packages/VirtualBoxCLI.pkg
905VirtualBox.pkg: $(VBOX_PATH_PACK_TMP)/Packages/VirtualBox.pkg
906VirtualBox.mpkg: $(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox.pkg
907VirtualBox.dmg: $(VBOX_PATH_DIST)/VirtualBox-$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)-r$(VBOX_SVN_REV).dmg
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette