VirtualBox

source: vbox/trunk/src/VBox/Installer/solaris/Makefile.kmk@ 98715

Last change on this file since 98715 was 98697, checked in by vboxsync, 22 months ago

Installer/solaris: Ship VBoxCAPI-x86.so. bugref:7675

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 31.1 KB
Line 
1# $Id: Makefile.kmk 98697 2023-02-22 23:16:23Z vboxsync $
2## @file
3# Sub-Makefile for the Solaris installer.
4#
5
6#
7# Copyright (C) 2007-2023 Oracle and/or its affiliates.
8#
9# This file is part of VirtualBox base platform packages, as
10# available from https://www.virtualbox.org.
11#
12# This program is free software; you can redistribute it and/or
13# modify it under the terms of the GNU General Public License
14# as published by the Free Software Foundation, in version 3 of the
15# License.
16#
17# This program is distributed in the hope that it will be useful, but
18# WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20# General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, see <https://www.gnu.org/licenses>.
24#
25# SPDX-License-Identifier: GPL-3.0-only
26#
27
28SUB_DEPTH = ../../../..
29include $(KBUILD_PATH)/subheader.kmk
30
31ifneq ($(KBUILD_HOST),solaris)
32 $(error "The Solaris installer can only be built on Solaris!") # yeah, right.
33endif
34
35
36#
37# Globals
38#
39VBOX_PATH_SOL_INST_SRC := $(PATH_SUB_CURRENT)
40VBOX_PATH_SI_SCRATCH := $(PATH_TARGET)/Installer-solaris
41VBOX_PATH_SI_SCRATCH_PKG := $(PATH_TARGET)/Installer-solaris/pkg
42VBOX_PATH_SI_SCRATCH_DBG := $(PATH_TARGET)/Installer-solaris/DebugPkg
43VBOX_SI_ARCH := $(subst x86,i386,$(KBUILD_TARGET_ARCH))
44VBOX_SI_ICON_TYPES := ova ovf vbox vbox-extpack vdi vmdk vhd hdd
45VBOX_SI_ICON_SIZES := 16 20 24 32 48 64 72 96 128 256
46VBOX_SI_GTAR := /usr/sfw/bin/gtar
47VBOX_SI_OBJCOPY_STRIP := /usr/sfw/bin/gobjcopy --strip-debug -R .comment
48ifeq ($(KBUILD_TARGET_ARCH),amd64)
49 VBOX_SI_OBJCOPY_DBGINFO := /usr/sfw/bin/gobjcopy --only-keep-debug
50else
51 VBOX_SI_OBJCOPY_DBGINFO := $(CP) -p # Solaris ld/gobjcopy(2.15) don't get along on x86, works only on amd64. So just using cp for now.
52endif
53
54# Unset this to speed up things during makefile hacking.
55VBOX_SI_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT)
56
57
58# Base package
59PKGINFO_ARCH = $(shell uname -p)
60PKGINFO_DATE = $(date %Y.%m.%d.%H.%M.%S)
61PKGINFO_REVSTAMP = $(PKGINFO_DATE).$(VBOX_SVN_REV)
62PKGINFO_PSTAMP = vbox_$(subst .,,$(PKGINFO_DATE))_r$(VBOX_SVN_REV)
63PKG_FILENAME := VirtualBox-$(VBOX_VERSION_STRING)-SunOS-$(KBUILD_TARGET_ARCH)-r$(VBOX_SVN_REV)
64
65# For Alpha, Beta, RC and releases VBOX_VERSION_STRING needs to be converted into the variant
66# which complies to Solaris 11 Image Packaging System (IPS) versioning convention. For GA release,
67# we add '.3.0' to the end of the version string in order to make its version look newer from
68# IPS point of view.
69VBOX_VERSION_SMF_STYLE := $(subst _ALPHA,.0.,$(VBOX_VERSION_STRING))
70VBOX_VERSION_SMF_STYLE := $(subst _BETA,.1.,$(VBOX_VERSION_SMF_STYLE))
71VBOX_VERSION_SMF_STYLE := $(subst _RC,.2.,$(VBOX_VERSION_SMF_STYLE))
72VBOX_VERSION_SMF_STYLE := $(if $(VBOX_VERSION_PRERELEASE),$(VBOX_VERSION_SMF_STYLE),$(VBOX_VERSION_SMF_STYLE).3.0)
73PKG_FILENAME_SMF_STYLE := VirtualBox-$(VBOX_VERSION_SMF_STYLE)-SunOS-$(KBUILD_TARGET_ARCH)-r$(VBOX_SVN_REV)
74
75#
76# Targets
77#
78PROGRAMS += VBoxZoneAccess VBoxISAExec
79INSTALLS += solaris-doc solaris-bin solaris-drv-confs solaris-icons
80BLDDIRS += $(VBOX_PATH_SI_SCRATCH)
81PACKING += \
82 $(PATH_STAGE_BIN)/$(PKG_FILENAME).tar.gz \
83 $(if $(VBOX_WITH_SOLARIS_IPS_PACKAGE),$(PATH_STAGE_BIN)/$(PKG_FILENAME_SMF_STYLE).p5p,) \
84 $(PATH_STAGE_BIN)/VirtualBoxDebug.tar.bz2
85OTHER_CLEAN += \
86 $(VBOX_PATH_SI_SCRATCH)/$(PKG_FILENAME).pkg \
87 $(PATH_STAGE_BIN)/$(PKG_FILENAME).tar.gz \
88 $(PATH_STAGE_BIN)/$(PKG_FILENAME_SMF_STYLE).p5p \
89 $(PATH_STAGE_BIN)/VirtualBoxDebug.tar.bz2 \
90 $(VBOX_PATH_SI_SCRATCH)/dist-copy.ts
91
92#
93# VBoxZoneAccess
94#
95VBoxZoneAccess_TEMPLATE = VBoxR3Exe
96VBoxZoneAccess_DEPS = $(VBOX_SVN_REV_KMK)
97VBoxZoneAccess_SOURCES = VBoxZoneAccess.c
98VBoxZoneAccess_LIBS = $(LIB_RUNTIME)
99
100#
101# VBoxISAExec
102#
103VBoxISAExec_TEMPLATE = VBoxR3Exe
104VBoxISAExec_DEPS = $(VBOX_SVN_REV_KMK)
105VBoxISAExec_SOURCES = VBoxISAExec.c
106
107#
108# Solaris installs.
109#
110solaris-doc_INST = bin/
111solaris-doc_MODE = a+r,u+w
112solaris-doc_SOURCES = \
113 $(VBOX_BRAND_LICENSE_TXT)=>LICENSE \
114 $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/$(if $(VBOX_OSE),OSE,NonOSE)/VirtualBox_64px.png=>VBox.png \
115 $(PATH_ROOT)/src/VBox/Artwork/$(if $(VBOX_OSE),OSE,NonOSE)/virtualbox-128px.png=>virtualbox.png
116
117solaris-bin_INST = bin/
118solaris-bin_MODE = a+rx,u+w
119solaris-bin_SOURCES = \
120 $(if $(VBOX_WITH_PYTHON),$(PATH_ROOT)/src/VBox/Frontends/VBoxShell/vboxshell.py,) \
121 $(VBOX_PATH_SOL_INST_SRC)/vboxconfig.sh \
122 $(VBOX_PATH_SOL_INST_SRC)/VBox.sh \
123 $(VBOX_PATH_SOL_INST_SRC)/pkginstall.sh \
124 $(if $(VBOX_WITH_FE_BALLOONCTRL),$(VBOX_PATH_SOL_INST_SRC)/smf-vboxballoonctrl.sh) \
125 $(if $(VBOX_WITH_FE_AUTOSTART),$(VBOX_PATH_SOL_INST_SRC)/smf-vboxautostart.sh) \
126 $(if $(VBOX_WITH_WEBSERVICES),$(VBOX_PATH_SOL_INST_SRC)/smf-vboxwebsrv.sh,)
127
128solaris-drv-confs_INST = bin/
129solaris-drv-confs_MODE = a+r,u+w
130solaris-drv-confs_SOURCES = \
131 $(PATH_ROOT)/src/VBox/HostDrivers/Support/solaris/vboxdrv.conf \
132 $(if $(VBOX_WITH_NETFLT),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetFlt/solaris/vboxflt.conf) \
133 $(if $(VBOX_WITH_NETFLT_CROSSBOW),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetFlt/solaris/vboxbow.conf) \
134 $(if $(VBOX_WITH_NETADP),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetAdp/solaris/vboxnet.conf) \
135 $(if $(VBOX_WITH_USB),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/solaris/vboxusbmon.conf) \
136 $(if $(VBOX_WITH_USB),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/solaris/vboxusb.conf)
137
138solaris-icons_INST = bin/icons/
139solaris-icons_MODE = a+r,u+w
140solaris-icons_SOURCES = $(foreach f,$(VBOX_SI_ICON_TYPES), $(foreach s,$(VBOX_SI_ICON_SIZES) \
141 ,$(PATH_ROOT)/src/VBox/Artwork/other/virtualbox-$(f)-$(s)px.png=>$(s)x$(s)/mimetypes/virtualbox-$(f).png))
142
143
144#
145# What follows is various files lists (and a symlink list) that lists various
146# types of files going from/to various places during installation.
147#
148# Each list has the following attributes (used by makefile command and
149# dependency generation):
150# .SUBDIRS := <yes|no>
151# .STRIP := <yes|objcopy|no>
152# .MODE := <0644|0755>
153# .SRC := <Directory to copy the files from>
154# .DST := <Directory to copy the files to>
155#
156
157
158## List of file list variable names.
159SOLARIS_FILE_LIST_VARS :=
160
161## @def SOLARIS_ETC_FILES
162# System-wide configuration files to copy from VBOX_PATH_SOL_INST_SRC to /etc.
163SOLARIS_FILE_LIST_VARS += SOLARIS_ETC_FILES
164SOLARIS_ETC_FILES.SUBDIRS := yes
165SOLARIS_ETC_FILES.STRIP := no
166SOLARIS_ETC_FILES.MODE := 0644
167SOLARIS_ETC_FILES.SRC := $(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetAdp/solaris
168SOLARIS_ETC_FILES.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/etc
169SOLARIS_ETC_FILES := $(if-expr defined(VBOX_WITH_NETADP),hostname.vboxnet0,)
170
171## @def SOLARIS_SMF_FILES
172# Service management facility manifest files to copy from VBOX_PATH_SOL_INST_SRC to /var/svc/manifest/application/virtualbox/.
173SOLARIS_FILE_LIST_VARS += SOLARIS_SMF_FILES
174SOLARIS_SMF_FILES.SUBDIRS := yes
175SOLARIS_SMF_FILES.STRIP := no
176SOLARIS_SMF_FILES.MODE := 0644
177SOLARIS_SMF_FILES.SRC := $(VBOX_PATH_SOL_INST_SRC)
178SOLARIS_SMF_FILES.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/var/svc/manifest/application/virtualbox
179SOLARIS_SMF_FILES = \
180 virtualbox-zoneaccess.xml \
181 $(if-expr defined(VBOX_WITH_FE_BALLOONCTRL),virtualbox-balloonctrl.xml,) \
182 $(if-expr defined(VBOX_WITH_FE_AUTOSTART),virtualbox-autostart.xml,) \
183 $(if-expr defined(VBOX_WITH_WEBSERVICES),virtualbox-webservice.xml,)
184
185## @def SOLARIS_MIME_INFO_FILES
186# MIME info files to be copied directly from VBOX_PATH_SOL_INST_SRC to /usr/share/mime-info/.
187SOLARIS_FILE_LIST_VARS += SOLARIS_MIME_INFO_FILES
188SOLARIS_MIME_INFO_FILES.SUBDIRS := yes
189SOLARIS_MIME_INFO_FILES.STRIP := no
190SOLARIS_MIME_INFO_FILES.MODE := 0644
191SOLARIS_MIME_INFO_FILES.SRC := $(VBOX_PATH_SOL_INST_SRC)
192SOLARIS_MIME_INFO_FILES.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/mime-info
193SOLARIS_MIME_INFO_FILES = \
194 virtualbox.keys \
195 virtualbox.mime
196
197## @def SOLARIS_PIXMAP_FILES
198# Bitmap files to copy directly from INST_BIN to /usr/share/pixmaps/.
199SOLARIS_FILE_LIST_VARS += SOLARIS_PIXMAP_FILES
200SOLARIS_PIXMAP_FILES.SUBDIRS = no
201SOLARIS_PIXMAP_FILES.STRIP = no
202SOLARIS_PIXMAP_FILES.MODE = 0644
203SOLARIS_PIXMAP_FILES.SRC = $(PATH_STAGE_BIN)
204SOLARIS_PIXMAP_FILES.DST = $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/pixmaps
205SOLARIS_PIXMAP_FILES = \
206 VBox.png \
207 virtualbox.png
208
209
210## @def SOLARIS_INSTALLER_SCRIPTS
211# Installer shell scripts that gets copied directly from VBOX_PATH_SOL_INST_SRC to VBOX_PATH_SI_SCRATCH_PKG (/).
212SOLARIS_FILE_LIST_VARS += SOLARIS_INSTALLER_SCRIPTS
213SOLARIS_INSTALLER_SCRIPTS.SUBDIRS = no
214SOLARIS_INSTALLER_SCRIPTS.STRIP = no
215SOLARIS_INSTALLER_SCRIPTS.MODE = 0755
216SOLARIS_INSTALLER_SCRIPTS.SRC = $(VBOX_PATH_SOL_INST_SRC)
217SOLARIS_INSTALLER_SCRIPTS.DST = $(VBOX_PATH_SI_SCRATCH_PKG)
218SOLARIS_INSTALLER_SCRIPTS = \
219 postinstall.sh \
220 checkinstall.sh \
221 preremove.sh \
222 makepackage.sh
223
224## @def SOLARIS_INSTALLER_FILES
225# Installer files that gets copied directly from VBOX_PATH_SOL_INST_SRC to VBOX_PATH_SI_SCRATCH_PKG (/).
226SOLARIS_FILE_LIST_VARS += SOLARIS_INSTALLER_FILES
227SOLARIS_INSTALLER_FILES.SUBDIRS = no
228SOLARIS_INSTALLER_FILES.STRIP = no
229SOLARIS_INSTALLER_FILES.MODE = 0644
230SOLARIS_INSTALLER_FILES.SRC = $(VBOX_PATH_SOL_INST_SRC)
231SOLARIS_INSTALLER_FILES.DST = $(VBOX_PATH_SI_SCRATCH_PKG)
232SOLARIS_INSTALLER_FILES = \
233 vbox.space
234
235## @def SOLARIS_INSTALLER_LICENSE
236# List of files that are copied directly from INST_BIN to VBOX_PATH_SI_SCRATCH_PKG (/).
237# LICENSE is needed by IPS packaging only.
238SOLARIS_FILE_LIST_VARS += SOLARIS_INSTALLER_LICENSE
239SOLARIS_INSTALLER_LICENSE.SUBDIRS := no
240SOLARIS_INSTALLER_LICENSE.STRIP := no
241SOLARIS_INSTALLER_LICENSE.MODE := 0644
242SOLARIS_INSTALLER_LICENSE.SRC := $(PATH_STAGE_BIN)
243SOLARIS_INSTALLER_LICENSE.DST := $(VBOX_PATH_SI_SCRATCH_PKG)
244SOLARIS_INSTALLER_LICENSE = \
245 LICENSE
246
247## @def SOLARIS_DRIVER_BINS
248# List of kernel module files that are copied from INST_BIN to platform/i86pc/kernel/drv/[amd64/] and stripped of debug info.
249SOLARIS_FILE_LIST_VARS += SOLARIS_DRIVER_BINS
250SOLARIS_DRIVER_BINS.SUBDIRS := no
251SOLARIS_DRIVER_BINS.STRIP := no
252SOLARIS_DRIVER_BINS.MODE := 0644
253SOLARIS_DRIVER_BINS.SRC := $(PATH_STAGE_BIN)
254SOLARIS_DRIVER_BINS.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/platform/i86pc/kernel/drv/$(subst x86,,$(KBUILD_TARGET_ARCH))
255SOLARIS_DRIVER_BINS = \
256 vboxdrv \
257 $(if $(VBOX_WITH_NETFLT),vboxflt,) \
258 $(if $(VBOX_WITH_NETFLT_CROSSBOW),vboxbow,) \
259 $(if $(VBOX_WITH_NETADP),vboxnet,) \
260 $(if $(VBOX_WITH_USB),vboxusbmon,) \
261 $(if $(VBOX_WITH_USB),vboxusb,)
262
263## @def SOLARIS_DRIVER_CONFS
264# List of kernel module configuration files that are copied directly from INST_BIN to platform/i86pc/kernel/drv/.
265SOLARIS_FILE_LIST_VARS += SOLARIS_DRIVER_CONFS
266SOLARIS_DRIVER_CONFS.SUBDIRS := no
267SOLARIS_DRIVER_CONFS.STRIP := no
268SOLARIS_DRIVER_CONFS.MODE := 0644
269SOLARIS_DRIVER_CONFS.SRC := $(PATH_STAGE_BIN)
270SOLARIS_DRIVER_CONFS.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/platform/i86pc/kernel/drv
271SOLARIS_DRIVER_CONFS = \
272 vboxdrv.conf \
273 $(if $(VBOX_WITH_NETFLT),vboxflt.conf,) \
274 $(if $(VBOX_WITH_NETFLT_CROSSBOW),vboxbow.conf,) \
275 $(if $(VBOX_WITH_NETADP),vboxnet.conf,) \
276 $(if $(VBOX_WITH_USB),vboxusbmon.conf,) \
277 $(if $(VBOX_WITH_USB),vboxusb.conf,)
278
279## @def SOLARIS_COMMON
280# List of files that are copied directly from INST_BIN to /opt/VirtualBox/.
281SOLARIS_FILE_LIST_VARS += SOLARIS_COMMON
282SOLARIS_COMMON.SUBDIRS := yes
283SOLARIS_COMMON.STRIP := no
284SOLARIS_COMMON.MODE := 0644
285SOLARIS_COMMON.SRC := $(PATH_STAGE_BIN)
286SOLARIS_COMMON.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox
287SOLARIS_COMMON = \
288 LICENSE
289
290## @def SOLARIS_COMMON_EXES
291# List of executable script (and VBoxISAExec) files that are copied directly from INST_BIN to /opt/VirtualBox/.
292SOLARIS_FILE_LIST_VARS += SOLARIS_COMMON_EXES
293SOLARIS_COMMON_EXES.SUBDIRS := no
294SOLARIS_COMMON_EXES.STRIP := no
295SOLARIS_COMMON_EXES.MODE := 0755
296SOLARIS_COMMON_EXES.SRC := $(PATH_STAGE_BIN)
297SOLARIS_COMMON_EXES.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox
298SOLARIS_COMMON_EXES = \
299 VBoxISAExec
300
301## @def SOLARIS_COMMON_BINS
302# List of INST_BIN shared libraries that should be copied into /opt/VirtualBox/ and stripped.
303SOLARIS_FILE_LIST_VARS += SOLARIS_COMMON_STRIP_BINS
304SOLARIS_COMMON_STRIP_BINS.SUBDIRS := yes
305SOLARIS_COMMON_STRIP_BINS.STRIP := yes
306SOLARIS_COMMON_STRIP_BINS.MODE := 0644
307SOLARIS_COMMON_STRIP_BINS.SRC := $(PATH_STAGE_BIN)
308SOLARIS_COMMON_STRIP_BINS.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/
309SOLARIS_COMMON_STRIP_BINS =
310
311## @def SOLARIS_STRIP_EXES
312# List of exectuables files that are copied from INST_BIN to /opt/VirtualBox/$(VBOX_SI_ARCH)/ and stripped of debug info.
313SOLARIS_FILE_LIST_VARS += SOLARIS_STRIP_EXES
314SOLARIS_STRIP_EXES.SUBDIRS := no
315SOLARIS_STRIP_EXES.STRIP := yes
316SOLARIS_STRIP_EXES.MODE := 0755
317SOLARIS_STRIP_EXES.SRC := $(PATH_STAGE_BIN)
318SOLARIS_STRIP_EXES.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH)
319SOLARIS_STRIP_EXES = \
320 VBoxZoneAccess \
321 $(if $(VBOX_WITH_QTGUI),VirtualBox VirtualBoxVM,) \
322 VBoxManage \
323 $(if $(VBOX_WITH_VBOXSDL),VBoxSDL,) \
324 $(if $(VBOX_WITH_NETADP),VBoxNetAdpCtl,) \
325 VBoxNetDHCP \
326 VBoxNetNAT \
327 $(if $(VBOX_WITH_EXTPACK),VBoxExtPackHelperApp,) \
328 VBoxSVC \
329 $(if $(VBOX_WITH_VMSVGA3D), VBoxTestOGL,) \
330 VBoxXPCOMIPCD \
331 $(if $(VBOX_WITH_DTRACE),VBoxDTrace,) \
332 $(if $(VBOX_WITH_HOST_SHIPPING_AUDIO_TEST),VBoxAudioTest,)
333
334## @def SOLARIS_STRIP_BINS
335# List of shared libraries that are copied from INST_BIN to /opt/VirtualBox/$(VBOX_SI_ARCH)/ and stripped of debug info.
336SOLARIS_FILE_LIST_VARS += SOLARIS_STRIP_BINS
337SOLARIS_STRIP_BINS.SUBDIRS := yes
338SOLARIS_STRIP_BINS.STRIP := yes
339SOLARIS_STRIP_BINS.MODE := 0644
340SOLARIS_STRIP_BINS.SRC := $(PATH_STAGE_BIN)
341SOLARIS_STRIP_BINS.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH)
342SOLARIS_STRIP_BINS = \
343 VBoxDD.so \
344 VBoxDD2.so \
345 VBoxRT.so \
346 VBoxDDU.so \
347 VBoxVMM.so \
348 $(if $(VBOX_WITH_LIBSSH),VBoxLibSsh.so,) \
349 VBoxXPCOM.so \
350 VBoxXPCOMC.so \
351 $(if $(VBOX_WITH_SHARED_FOLDERS),VBoxSharedFolders.so,) \
352 $(if $(VBOX_WITH_SHARED_CLIPBOARD),VBoxSharedClipboard.so,) \
353 $(if $(VBOX_WITH_DRAG_AND_DROP),VBoxDragAndDropSvc.so,) \
354 $(if $(VBOX_WITH_GUEST_PROPS),VBoxGuestPropSvc.so,) \
355 $(if $(VBOX_WITH_GUEST_CONTROL),VBoxGuestControlSvc.so,) \
356 VBoxHostChannel.so \
357 $(if $(VBOX_WITH_JXPCOM),libvboxjxpcom.so,) \
358 $(if $(VBOX_WITH_QTGUI), \
359 VBoxKeyboard.so) \
360 $(if $(VBOX_WITH_DEBUGGER_GUI),VBoxDbg.so DbgPlugInDiggers.so,) \
361 components/VBoxC.so \
362 components/VBoxSVCM.so \
363 components/VBoxXPCOMIPCC.so
364
365ifdef VBOX_WITH_QTGUI
366 ifdef VBOX_WITH_ORACLE_QT
367 SOLARIS_STRIP_BINS += \
368 $(notdir $(wildcard $(PATH_STAGE_BIN)/lib*VBox*)) \
369 $(VBOX_QT_PLUGINS)
370 endif
371endif #VBOX_WITH_QTGUI
372
373ifdef VBOX_WITH_32_ON_64_MAIN_API
374 SOLARIS_STRIP_BINS += \
375 VBoxRT-x86.so \
376 VBoxXPCOM-x86.so \
377 VBoxCAPI-x86.so \
378 components/VBoxClient-x86.so \
379 components/VBoxSVCM-x86.so \
380 components/VBoxXPCOMIPCC-x86.so
381endif
382ifdef VBOX_WITH_HARDENING
383 SOLARIS_STRIP_BINS += \
384 VBoxNetDHCP.so \
385 VBoxNetNAT.so \
386 $(if $(VBOX_WITH_VBOXSDL),VBoxSDL.so,) \
387 $(if $(VBOX_WITH_QTGUI),VirtualBoxVM.so UICommon.so,)
388endif
389
390## @def SOLARIS_STRIP_OBJS
391# List of relocable object files to be copied from INST_BIN to /opt/VirtualBox/$(VBOX_SI_ARCH)/ and carefully
392# stripped of debug info but not relocation information. These are the ring-0 and raw-mode context modules.
393SOLARIS_FILE_LIST_VARS += SOLARIS_STRIP_OBJS
394SOLARIS_STRIP_OBJS.SUBDIRS := no
395SOLARIS_STRIP_OBJS.STRIP := objcopy
396SOLARIS_STRIP_OBJS.MODE := 0644
397SOLARIS_STRIP_OBJS.SRC := $(PATH_STAGE_BIN)
398SOLARIS_STRIP_OBJS.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH)
399SOLARIS_STRIP_OBJS = \
400 VBoxDDR0.r0 \
401 VMMR0.r0
402ifdef VBOX_WITH_RAW_MODE
403 SOLARIS_STRIP_OBJS += \
404 VBoxDDRC.rc \
405 VMMRC.rc
406endif
407
408## @def SOLARIS_NO_STRIP
409# List of data files that should be copied from INST_BIN to /opt/VirtualBox/$(VBOX_SI_ARCH)/.
410SOLARIS_FILE_LIST_VARS += SOLARIS_NO_STRIP
411SOLARIS_NO_STRIP.SUBDIRS := yes
412SOLARIS_NO_STRIP.STRIP := no
413SOLARIS_NO_STRIP.MODE := 0644
414SOLARIS_NO_STRIP.SRC := $(PATH_STAGE_BIN)
415SOLARIS_NO_STRIP.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH)
416SOLARIS_NO_STRIP = \
417 components/VBoxXPCOMBase.xpt \
418 components/VirtualBox_XPCOM.xpt \
419 $(if $(and $(VBOX_LICENSE_FILES),$(VBOX_WITH_QTGUI)),$(VBOX_LICENSE_FILES))
420
421## @def SOLARIS_USRBIN_LINKS
422# List of links to create in /usr/bin to /opt/VirtualBox/VBox.sh.
423# Naturally no subdirectories.
424SOLARIS_USRBIN_LINKS = \
425 $(if $(VBOX_WITH_QTGUI),VirtualBox VirtualBoxVM,) \
426 $(if $(VBOX_WITH_HEADLESS),VBoxHeadless,) \
427 $(if $(VBOX_WITH_VBOXSDL),VBoxSDL,) \
428 VBoxManage \
429 $(if $(VBOX_WITH_DTRACE),VBoxDTrace,) \
430 $(if $(VBOX_WITH_HOST_SHIPPING_AUDIO_TEST),VBoxAudioTest,)
431
432SOLARIS_COMMON_EXES += \
433 vboxconfig.sh \
434 VBox.sh \
435 pkginstall.sh \
436 $(if $(VBOX_WITH_FE_BALLOONCTRL),smf-vboxballoonctrl.sh) \
437 $(if $(VBOX_WITH_FE_AUTOSTART),smf-vboxautostart.sh) \
438 $(if $(VBOX_WITH_WEBSERVICES),smf-vboxwebsrv.sh)
439
440
441# Documentation (packed as DOCS as they are arch. neutral)
442ifdef VBOX_WITH_DOCS_PACKING
443 SOLARIS_COMMON += \
444 $(if-expr defined(VBOX_WITH_DOCS_CHM_PACKING),VirtualBox.chm,) \
445 $(if-expr defined(VBOX_WITH_DOCS_QHELP_PACKING),UserManual.qch UserManual.qhc,) \
446 UserManual.pdf \
447 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES), \
448 $(if-expr defined(VBOX_WITH_DOCS_CHM_PACKING),VirtualBox_$(f).chm,) \
449 $(if-expr defined(VBOX_WITH_DOCS_QHELP_PACKING),UserManual_$(f).qch UserManual_$(f).qhc,) \
450 UserManual_$(f).pdf)
451endif
452
453# Python XPCOM glue
454ifdef VBOX_WITH_PYTHON
455 SOLARIS_COMMON += \
456 $(VBOXINST_SDK_BINDINGS_XPCOM_PYTHON_FILES) \
457 $(VBOXINST_SDK_INSTALLER_PYTHON_FILES)
458 ifeq ($(KBUILD_TARGET_ARCH),amd64)
459 SOLARIS_PYTHON_32_ON_64_BINS = $(notdir $(wildcard $(PATH_STAGE_BIN)/VBoxPython*_x86.so))
460 ifdef VBOX_WITH_32_ON_64_MAIN_API
461 SOLARIS_COMMON_STRIP_BINS += $(SOLARIS_PYTHON_32_ON_64_BINS)
462 endif
463 SOLARIS_COMMON_STRIP_BINS += $(filter-out $(SOLARIS_PYTHON_32_ON_64_BINS), $(notdir $(wildcard $(PATH_STAGE_BIN)/VBoxPython*.so)))
464 else
465 SOLARIS_COMMON_STRIP_BINS += $(notdir $(wildcard $(PATH_STAGE_BIN)/VBoxPython*.so)))
466 endif
467endif
468
469ifdef VBOX_WITH_JXPCOM
470 SOLARIS_COMMON += \
471 sdk/bindings/xpcom/java/vboxjxpcom.jar
472endif
473
474# auth stuff
475SOLARIS_STRIP_BINS += \
476 VBoxAuth.so \
477 VBoxAuthSimple.so
478
479# VRDP
480ifdef VBOX_WITH_VRDP
481 ifndef VBOX_WITH_EXTPACK_PUEL
482 SOLARIS_STRIP_BINS += \
483 VBoxVRDP.so
484 endif
485endif
486
487SOLARIS_STRIP_BINS += \
488 $(if $(and $(VBOX_WITH_HARDENING),$(VBOX_WITH_HEADLESS)),VBoxHeadless.so,)
489
490SOLARIS_STRIP_EXES += \
491 $(if $(VBOX_WITH_HEADLESS),VBoxHeadless) \
492 $(if $(VBOX_WITH_FE_BUGREPORT),VBoxBugReport) \
493 $(if $(VBOX_WITH_FE_BALLOONCTRL),VBoxBalloonCtrl) \
494 $(if $(VBOX_WITH_FE_AUTOSTART),VBoxAutostart) \
495 $(if $(VBOX_WITH_WEBSERVICES),vboxwebsrv) \
496 $(if $(VBOX_WITH_VBOX_IMG)$(VBOX_WITH_TESTCASES),vbox-img)
497
498# Guest Additions
499ifdef VBOX_WITH_ADDITIONS_PACKING
500 # SOLARIS_COMMON += \
501 # additions/VBoxGuestAdditions.iso
502endif
503
504
505# EFI firmware
506ifdef VBOX_WITH_EFIFW_PACKING
507 SOLARIS_COMMON += \
508 VBoxEFI32.fd \
509 VBoxEFI64.fd
510endif
511
512# Unattended installation template scripts.
513ifdef VBOX_UNATTENDED_TEMPLATES
514 SOLARIS_COMMON += $(addprefix UnattendedTemplates/,$(VBOX_UNATTENDED_TEMPLATES))
515endif
516
517# DTrace library, testcase and scripts (as the rest of this file, this makes bold
518# ASSUMPTIONS about VBPX_INST_XXX variable values).
519ifdef VBOX_WITH_DTRACE
520 SOLARIS_COMMON += \
521 $(addprefix dtrace/lib/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_LIB_ARCH_FILES)) \
522 $(addprefix dtrace/testcase/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_TESTCASE_ARCH_FILES)) \
523 $(addprefix dtrace/scripts/,$(VBOXINST_DTRACE_SCRIPTS_FILES))
524endif
525
526
527#
528# End of file lists.
529#
530
531
532
533include $(FILE_KBUILD_SUB_FOOTER)
534
535
536#
537# Copy all files needed for packaging into the final directory structure
538#
539$(VBOX_PATH_SI_SCRATCH)/dist-copy.ts: \
540 $(VBOX_VERSION_STAMP) \
541 \
542 $(VBOX_PATH_INST_COMMON_SRC)/virtualbox.desktop.in \
543 $(VBOX_PATH_INST_COMMON_SRC)/virtualboxvm.desktop.in \
544 $(VBOX_PATH_INST_COMMON_SRC)/virtualbox.xml \
545 $(VBOX_PATH_SOL_INST_SRC)/virtualbox.applications.in \
546 $(VBOX_PATH_SOL_INST_SRC)/vbox.pkginfo \
547 $(VBOX_PATH_SOL_INST_SRC)/vbox-ips.mog \
548 \
549 $(if-expr defined(VBOX_WITH_ADDITIONS_PACKING),$(PATH_STAGE_BIN)/additions/VBoxGuestAdditions.iso,) \
550 $(if-expr !defined(VBOX_OSE) && defined(VBOX_WITH_VBOXSDL), $(KBUILD_DEVTOOLS_TRG)/libsdl/v1.2.13/lib/libSDL-1.2.so.0.11.2,) \
551 \
552 $(foreach var, $(SOLARIS_FILE_LIST_VARS),$(foreach file, $($(var)), $($(var).SRC)/$(file))) \
553 \
554 $(foreach size, $(VBOX_SI_ICON_SIZES), $(foreach type, $(VBOX_SI_ICON_TYPES) \
555 ,$(PATH_ROOT)/src/VBox/Artwork/other/virtualbox-$(type)-$(size)px.png)) \
556 \
557 $(VBOX_SI_DEP_ON_MAKEFILE) \
558 | $$(dir $$@)
559 $(call MSG_L1,Copying files to package staging area)
560# Start with a clean slate, don't want to pick up random garbage.
561 $(RM) -Rf -- "$(VBOX_PATH_SI_SCRATCH_PKG)/"
562 $(QUIET)$(RM) -f -- "$@"
563
564# Create all the directories we need. We specify each sub directory to make sure the mode is correct.
565 $(MKDIR) -p -m 0755 -- $(sort $(VBOX_PATH_SI_SCRATCH_PKG)/ \
566 $(VBOX_PATH_SI_SCRATCH_PKG)/opt/ \
567 $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/ \
568 $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/amd64/ \
569 $(VBOX_PATH_SI_SCRATCH_PKG)/platform/ \
570 $(VBOX_PATH_SI_SCRATCH_PKG)/platform/i86pc/ \
571 $(VBOX_PATH_SI_SCRATCH_PKG)/platform/i86pc/kernel/ \
572 $(VBOX_PATH_SI_SCRATCH_PKG)/platform/i86pc/kernel/drv/ \
573 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/ \
574 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/bin/ \
575 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/ \
576 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/applications/ \
577 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/application-registry/ \
578 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/icons/ \
579 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/icons/hicolor/ \
580 $(foreach size, $(VBOX_SI_ICON_SIZES) \
581 ,$(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/icons/hicolor/$(size)x$(size)/ \
582 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/icons/hicolor/$(size)x$(size)/mimetypes/) \
583 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/mime/ \
584 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/mime/packages/ \
585 $(VBOX_PATH_SI_SCRATCH_PKG)/var/ \
586 $(VBOX_PATH_SI_SCRATCH_PKG)/var/svc/ \
587 $(VBOX_PATH_SI_SCRATCH_PKG)/var/svc/manifest/ \
588 $(VBOX_PATH_SI_SCRATCH_PKG)/var/svc/manifest/application/ \
589 $(foreach var,$(SOLARIS_FILE_LIST_VARS), $($(var).DST)/) \
590 $(foreach var,$(SOLARIS_FILE_LIST_VARS),$(if-expr "$($(var).SUBDIRS)" == "yes",$(sort $(dir $(addprefix $($(var).DST)/,$($(var))))),)) \
591 )
592
593# Generic copy file lists.
594 $(foreach var, $(SOLARIS_FILE_LIST_VARS), $(foreach file, $($(var)) \
595 ,$(if-expr "$($(var).STRIP)" == "objcopy" && defined(VBOX_DO_STRIP)\
596 ,$(NLTAB)$(VBOX_SI_OBJCOPY_STRIP) "$($(var).SRC)/$(file)" "$($(var).DST)/$(file)" \
597 $(NLTAB)$(CHMOD) "$($(var).MODE)" "$($(var).DST)/$(file)" \
598 ,$(NLTAB)$(INSTALL) -m "$($(var).MODE)" $(if-expr "$($(var).STRIP)" == "yes" && defined(VBOX_DO_STRIP),-s,) \
599 "$($(var).SRC)/$(file)" "$($(var).DST)/$(file)")))
600
601# VirtualBox: Common files.
602 $(if-expr defined(VBOX_WITH_ADDITIONS_PACKING) \
603 ,$(INSTALL) -m 0644 $(PATH_STAGE_BIN)/additions/VBoxGuestAdditions.iso $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/,)
604 $(LN_SYMLINK) -f ./pkginstall.sh $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/ipsinstall.sh
605 $(SED) -e "s/_HARDENED_/$(if $(VBOX_WITH_HARDENED),hardened,)/" \
606 --output $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/vboxconfig.sh \
607 $(VBOX_PATH_SOL_INST_SRC)/vboxconfig.sh
608 $(CHMOD) 0755 $(VBOX_PATH_SOL_INST_SRC)/vboxconfig.sh
609 $(INSTALL) -m 0644 $(VBOX_PATH_SOL_INST_SRC)/vbox.pkgresponse $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/autoresponse
610 $(if-expr defined(VBOX_WITH_PYTHON) \
611 ,$(SED) -e "s@^#!.*@#!/usr/bin/python3@" \
612 --output $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/vboxshell.py \
613 $(PATH_STAGE_BIN)/vboxshell.py \
614 $(NLTAB)$(CHMOD) 0755 $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/vboxshell.py,)
615
616# VirtualBox: Arch specific files.
617 $(if-expr defined(VBOX_WITH_ADDITIONS_PACKING) \
618 ,$(NLTAB)$(LN_SYMLINK) ../VBoxGuestAdditions.iso $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH)/,)
619
620 $(if-expr !defined(VBOX_OSE) && defined(VBOX_WITH_VBOXSDL) \
621 ,$(INSTALL) -s -m 0644 $(KBUILD_DEVTOOLS_TRG)/libsdl/v1.2.13/lib/libSDL-1.2.so.0.11.2 \
622 $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH)/libSDL-1.2.so.0,)
623
624 $(if-expr defined(VBOX_WITH_EFIFW_PACKING) \
625 ,$(LN_SYMLINK) ../VBoxEFI32.fd ../VBoxEFI64.fd $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH)/,)
626
627# Links to /usr/bin.
628 $(foreach link,$(SOLARIS_USRBIN_LINKS) \
629 ,$(NLTAB)$(LN_SYMLINK) ../../opt/VirtualBox/VBox.sh $(VBOX_PATH_SI_SCRATCH_PKG)/usr/bin/$(link))
630
631# Desktop stuff in /usr/share/applications/.
632 $(SED) -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+" \
633 --output $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/applications/virtualbox.desktop \
634 $(VBOX_PATH_INST_COMMON_SRC)/virtualbox.desktop.in
635 $(CHMOD) 0644 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/applications/virtualbox.desktop
636
637 $(SED) -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+" \
638 --output $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/applications/virtualboxvm.desktop \
639 $(VBOX_PATH_INST_COMMON_SRC)/virtualboxvm.desktop.in
640 $(CHMOD) 0644 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/applications/virtualboxvm.desktop
641
642# Desktop stuff in /usr/share/mime/packages/ (S10 cannot deal with icon information in virtualbox.xml).
643 $(SED) -e '/<icon/d' \
644 --output $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/mime/packages/virtualbox.xml \
645 $(VBOX_PATH_INST_COMMON_SRC)/virtualbox.xml
646 $(CHMOD) 0644 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/mime/packages/virtualbox.xml
647
648# Desktop stuff in /usr/share/application-registry.
649 $(SED) -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+" \
650 --output $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/application-registry/virtualbox.applications \
651 $(VBOX_PATH_SOL_INST_SRC)/virtualbox.applications.in
652 $(CHMOD) 0644 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/application-registry/virtualbox.applications
653
654# Icons stuff under /usr/share/icons/hicolor/<size>x<size>/mimetypes/.
655 $(foreach size, $(VBOX_SI_ICON_SIZES), $(foreach type, $(VBOX_SI_ICON_TYPES) \
656 ,$(NLTAB)$(INSTALL) -m 0644 \
657 $(PATH_ROOT)/src/VBox/Artwork/other/virtualbox-$(type)-$(size)px.png \
658 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/icons/hicolor/$(size)x$(size)/mimetypes/virtualbox-$(type).png))
659
660# Files related to package creation.
661 $(SED) -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+g" \
662 -e "s+@VBOX_VENDOR@+$(VBOX_VENDOR)+g" \
663 -e "s+@VBOX_VERSION_STRING@+$(VBOX_VERSION_STRING)+g" \
664 -e "s+@VBOX_VERSION_REVSTAMP@+$(PKGINFO_REVSTAMP)+g" \
665 -e "s+@UNAME_P@+$(PKGINFO_ARCH)+g" \
666 -e "s+@VBOX_PSTAMP@+$(PKGINFO_PSTAMP)+g" \
667 --output $(VBOX_PATH_SI_SCRATCH_PKG)/vbox.pkginfo \
668 $(VBOX_PATH_SOL_INST_SRC)/vbox.pkginfo
669 $(SED) -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+g" \
670 -e "s+@VBOX_VENDOR@+$(VBOX_VENDOR)+g" \
671 -e "s+@VBOX_VERSION_STRING@+$(VBOX_VERSION_SMF_STYLE)+g" \
672 -e "s+@VBOX_SVN_REV@+$(VBOX_SVN_REV)+g" \
673 -e "s+@UNAME_P@+$(PKGINFO_ARCH)+g" \
674 --output $(VBOX_PATH_SI_SCRATCH_PKG)/vbox-ips.mog \
675 $(VBOX_PATH_SOL_INST_SRC)/vbox-ips.mog
676 $(APPEND) -t $@ "done"
677
678#
679# Creates the System V style installer package.
680#
681solaris-package:: $(VBOX_PATH_SI_SCRATCH)/$(PKG_FILENAME).pkg
682$(VBOX_PATH_SI_SCRATCH)/$(PKG_FILENAME).pkg: \
683 $(VBOX_PATH_SI_SCRATCH)/dist-copy.ts \
684 $(VBOX_SI_DEP_ON_MAKEFILE) \
685 | $$(dir $$@)
686 $(call MSG_L1,Creating install package: $(PKG_FILENAME).pkg)
687 $(VBOX_PATH_SI_SCRATCH_PKG)/makepackage.sh \
688 $(if-expr defined(VBOX_WITH_HARDENING),--hardened,) \
689 $(if-expr !defined(VBOX_WITH_FE_BUGREPORT),--without-VBoxBugReport,) \
690 $(if-expr !defined(VBOX_WITH_FE_BALLOONCTRL),--without-VBoxBalloonCtrl,) \
691 $(if-expr !defined(VBOX_WITH_FE_AUTOSTART),--without-VBoxAutostart,) \
692 $(if-expr !defined(VBOX_WITH_WEBSERVICES),--without-vboxwebsrv,) \
693 $(VBOX_PATH_SI_SCRATCH_PKG) \
694 $(PKG_FILENAME) \
695 $(KBUILD_TARGET_ARCH) \
696 $(VBOX_SVN_REV)
697 $(MV) -- "$(VBOX_PATH_SI_SCRATCH_PKG)/$(PKG_FILENAME).pkg" "$@"
698
699#
700# Creates the tar file containing license, readme and autoresponse file in addition to the System V package.
701#
702solaris-package-tar-gz:: $(PATH_STAGE_BIN)/$(PKG_FILENAME).tar.gz
703$(PATH_STAGE_BIN)/$(PKG_FILENAME).tar.gz: \
704 $(VBOX_PATH_SI_SCRATCH)/$(PKG_FILENAME).pkg \
705 $(PATH_STAGE_BIN)/LICENSE \
706 $(VBOX_PATH_SOL_INST_SRC)/vbox.pkgresponse \
707 $(PATH_ROOT)/doc/ReadMe-Solaris.txt \
708 $(VBOX_SI_DEP_ON_MAKEFILE) \
709 | $(VBOX_PATH_SI_SCRATCH)/
710 $(call MSG_L1,Creating final tar.gz package: $(PKG_FILENAME).tar.gz)
711 $(QUIET)$(RM) -f -- $(VBOX_PATH_SI_SCRATCH)/ReadMe.txt "$@"
712 $(QUIET)$(SED) \
713 -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+g" \
714 -e "s+@VBOX_VENDOR@+$(VBOX_VENDOR)+g" \
715 -e "s+@VBOX_VERSION_STRING@+$(VBOX_VERSION_STRING)+g" \
716 -e "s+@KBUILD_TARGET_ARCH@+$(KBUILD_TARGET_ARCH)+g" \
717 -e "s+@VBOX_SVN_REV@+$(VBOX_SVN_REV)+g" \
718 --output $(VBOX_PATH_SI_SCRATCH)/ReadMe.txt \
719 $(PATH_ROOT)/doc/ReadMe-Solaris.txt
720 $(QUIET)$(VBOX_SI_GTAR) -C $(VBOX_PATH_SI_SCRATCH) -czvf "$@" --show-transformed-name \
721 --xform 's,^.*/,,g' --xform 's,vbox.pkgresponse,autoresponse,' \
722 $(VBOX_PATH_SI_SCRATCH)/ReadMe.txt \
723 $(PATH_STAGE_BIN)/LICENSE \
724 $(VBOX_PATH_SOL_INST_SRC)/vbox.pkgresponse \
725 $(VBOX_PATH_SI_SCRATCH)/$(PKG_FILENAME).pkg
726 $(QUIET)$(RM) -f -- $(VBOX_PATH_SI_SCRATCH)/ReadMe.txt
727 $(call MSG_L1,Packaging $@ is completed.)
728
729#
730# Creates the IPS style installer package.
731#
732solaris-package-ips:: $(PATH_STAGE_BIN)/$(PKG_FILENAME_SMF_STYLE).p5p
733$(PATH_STAGE_BIN)/$(PKG_FILENAME_SMF_STYLE).p5p: \
734 $(VBOX_PATH_SI_SCRATCH)/dist-copy.ts \
735 $(VBOX_SI_DEP_ON_MAKEFILE) \
736 | $$(dir $$@)
737 $(call MSG_L1,Creating install package: $(PKG_FILENAME_SMF_STYLE).p5p)
738 $(VBOX_PATH_SI_SCRATCH_PKG)/makepackage.sh \
739 --ips \
740 $(if-expr defined(VBOX_WITH_HARDENING),--hardened,) \
741 $(if-expr !defined(VBOX_WITH_FE_BUGREPORT),--without-VBoxBugReport,) \
742 $(if-expr !defined(VBOX_WITH_FE_BALLOONCTRL),--without-VBoxBalloonCtrl,) \
743 $(if-expr !defined(VBOX_WITH_FE_AUTOSTART),--without-VBoxAutostart,) \
744 $(if-expr !defined(VBOX_WITH_WEBSERVICES),--without-vboxwebsrv,) \
745 $(VBOX_PATH_SI_SCRATCH_PKG) \
746 $(PKG_FILENAME_SMF_STYLE) \
747 $(KBUILD_TARGET_ARCH) \
748 $(VBOX_SVN_REV)
749 $(MV) -- "$(VBOX_PATH_SI_SCRATCH_PKG)/$(PKG_FILENAME_SMF_STYLE).p5p" "$@"
750
751
752## List of file list variable names relevant for debug info.
753SOLARIS_FILE_LIST_DBGINFO_VARS := $(foreach var, $(SOLARIS_FILE_LIST_VARS), $(if-expr "$($(var).STRIP)" != "no",$(var),))
754## Adds a .DBGDST property to each of the debug info file lists. Simplifies our job below
755$(foreach var,$(SOLARIS_FILE_LIST_DBGINFO_VARS) \
756 ,$(eval $(var).DBGDST := $(subst $(VBOX_PATH_SI_SCRATCH_PKG)/,$(VBOX_PATH_SI_SCRATCH_DBG)/,$(subst /opt/VirtualBox,,$($(var).DST)))))
757
758#
759# Creates a tar file containing the debug info.
760#
761$(PATH_STAGE_BIN)/VirtualBoxDebug.tar.bz2: \
762 $(VBOX_VERSION_STAMP) \
763 $(VBOX_SI_DEP_ON_MAKEFILE) \
764 $(foreach var, $(SOLARIS_FILE_LIST_DBGINFO_VARS), $(foreach file, $($(var)), $($(var).SRC)/$(file)))
765 $(call MSG_L1,Preparing $@)
766 $(RM) -Rf -- "$(VBOX_PATH_SI_SCRATCH_DBG)/"
767 $(RM) -f -- "$@"
768 $(MKDIR) -p -m 0755 \
769 $(VBOX_PATH_SI_SCRATCH_DBG)/ \
770 $(sort $(foreach var, $(SOLARIS_FILE_LIST_DBGINFO_VARS), $($(var).DBGDST)/ $(if-expr "$($(var).SUBDIRS)" == "yes" \
771 ,$(sort $(dir $(foreach file, $($(var)), $($(var).DBGDST)/$(file)))),)))
772 $(foreach var, $(SOLARIS_FILE_LIST_DBGINFO_VARS),$(foreach file, $($(var)) \
773 ,$(NLTAB)$(VBOX_SI_OBJCOPY_DBGINFO) "$($(var).SRC)/$(file)" "$($(var).DBGDST)/$(file)"))
774 $(call MSG_L1,Packing $@)
775 $(QUIET)$(VBOX_SI_GTAR) --dereference --owner 0 --group 0 \
776 -cvjRhf "$@" -C "$(VBOX_PATH_SI_SCRATCH_DBG)/.." "./$(notdir $(VBOX_PATH_SI_SCRATCH_DBG))/"
777 $(QUIET)$(CHMOD) 0644 $@
778 $(call MSG_L1,Packaging $@ is completed.)
779 $(RM) -Rf "$(VBOX_PATH_SI_SCRATCH_DBG)/"
780
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