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