VirtualBox

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

Last change on this file since 88142 was 87703, checked in by vboxsync, 4 years ago

Installer/solaris: Additional amendment to vbox-ips.mog to remove dependency on python 2.6 since VBoxPython.so is linked with libpython2.6.so.1.0 on Solaris 11 systems up to 11.3 SRU19 inclusive. Also change vboxshell.py to explicity invoke python2.7 which has always been available on Solaris 11 and is delivered in S10 as part of freely available patches. bugref:5999

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