# $Id: Makefile.kmk 13031 2008-10-07 09:21:53Z vboxsync $ ## @file # Makefile for the Solaris guest additions base directory. # # # Copyright (C) 2008 Sun Microsystems, Inc. # # This file is part of VirtualBox Open Source Edition (OSE), as # available from http://www.virtualbox.org. This file is free software; # you can redistribute it and/or modify it under the terms of the GNU # General Public License (GPL) as published by the Free Software # Foundation, in version 2 as it comes in the "COPYING" file of the # VirtualBox OSE distribution. VirtualBox OSE is distributed in the # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. # # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa # Clara, CA 95054 USA or visit http://www.sun.com if you need # additional information or have any questions. # SUB_DEPTH = ../../../.. include $(KBUILD_PATH)/subheader.kmk ifneq ($(KBUILD_HOST),solaris) $(error "The Solaris guest additions installer can only be built on Solaris!") endif ifeq ($(KBUILD_HOST),solaris) include $(PATH_SUB_CURRENT)/SharedFolders/Makefile.kmk endif PKGFILENAME := VBoxSolarisAdditions.pkg PKGINFO_ARCH = $(shell uname -p) PKGINFO_REVSTAMP = $(date %Y.%m.%d.%H.%M) VBOX_PATH_SOLARIS_ADDITION_INSTALLER := $(PATH_SUB_CURRENT)/Installer VBOX_PATH_X11_ADDITION_INSTALLER := $(PATH_ROOT)/src/VBox/Additions/x11/installer SOLARIS_INST_DIR := $(PATH_TARGET)/install ifeq ($(KBUILD_TYPE),debug) BIN_COPY := $(CP) -f BIN_COPY_SYMBOLS := $(CP) -f else BIN_COPY := /usr/sfw/bin/gobjcopy -S -R .comment BIN_COPY_SYMBOLS := /usr/sfw/bin/gobjcopy -g -R .comment endif PACKING += $(PATH_BIN)/additions/$(PKGFILENAME) OTHER_CLEAN += $(PACKING) # # If we are doing a combined package (x86+amd64) include the binaries from both # architectures otherwise use the one from $(PATH_BIN)/additions # ifdef VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE SOLARIS_ADD_BIN_64 := $(PATH_OUT_BASE)/solaris.amd64/$(KBUILD_TYPE)/bin/additions SOLARIS_ADD_BIN_32 := $(PATH_OUT_BASE)/solaris.x86/$(KBUILD_TYPE)/bin/additions SOLARIS_INST_DIR_64 := $(SOLARIS_INST_DIR)/amd64 SOLARIS_INST_DIR_32 := $(SOLARIS_INST_DIR) VBOX_SOLPACKFILES = \ $(SOLARIS_ADD_BIN_64)/vboxguest \ $(SOLARIS_ADD_BIN_64)/VBoxClient \ $(SOLARIS_ADD_BIN_64)/VBoxService \ $(SOLARIS_ADD_BIN_64)/VBoxControl \ $(SOLARIS_ADD_BIN_64)/vboxvideo_drv_13.so \ $(SOLARIS_ADD_BIN_64)/vboxvideo_drv_14.so \ $(SOLARIS_ADD_BIN_64)/vboxvideo_drv_70.so \ $(SOLARIS_ADD_BIN_64)/vboxvideo_drv_71.so \ $(SOLARIS_ADD_BIN_64)/vboxmouse_drv_14.so \ $(SOLARIS_ADD_BIN_64)/vboxmouse_drv_70.so \ $(SOLARIS_ADD_BIN_64)/vboxmouse_drv_71.so \ $(SOLARIS_ADD_BIN_32)/vboxguest \ $(SOLARIS_ADD_BIN_32)/VBoxClient \ $(SOLARIS_ADD_BIN_32)/VBoxService \ $(SOLARIS_ADD_BIN_32)/VBoxControl \ $(SOLARIS_ADD_BIN_32)/vboxvideo_drv_13.so \ $(SOLARIS_ADD_BIN_32)/vboxvideo_drv_14.so \ $(SOLARIS_ADD_BIN_32)/vboxvideo_drv_70.so \ $(SOLARIS_ADD_BIN_32)/vboxvideo_drv_71.so \ $(SOLARIS_ADD_BIN_32)/vboxmouse_drv_14.so \ $(SOLARIS_ADD_BIN_32)/vboxmouse_drv_70.so \ $(SOLARIS_ADD_BIN_32)/vboxmouse_drv_71.so else SOLARIS_ADD_BIN := $(PATH_BIN)/additions ifeq ($(KBUILD_TARGET_ARCH),x86) SOLARIS_INST_DIR_ISA := $(SOLARIS_INST_DIR) else SOLARIS_INST_DIR_ISA := $(SOLARIS_INST_DIR)/amd64 endif VBOX_SOLPACKFILES = \ $(SOLARIS_ADD_BIN)/vboxguest \ $(SOLARIS_ADD_BIN)/VBoxClient \ $(SOLARIS_ADD_BIN)/VBoxService \ $(SOLARIS_ADD_BIN)/VBoxControl \ $(SOLARIS_ADD_BIN)/vboxvideo_drv_13.so \ $(SOLARIS_ADD_BIN)/vboxvideo_drv_14.so \ $(SOLARIS_ADD_BIN)/vboxvideo_drv_70.so \ $(SOLARIS_ADD_BIN)/vboxvideo_drv_71.so \ $(SOLARIS_ADD_BIN)/vboxmouse_drv_14.so \ $(SOLARIS_ADD_BIN)/vboxmouse_drv_70.so \ $(SOLARIS_ADD_BIN)/vboxmouse_drv_71.so endif include $(KBUILD_PATH)/subfooter.kmk $(PATH_BIN)/additions/VBoxSolarisAdditions.pkg: \ $(VBOX_VERSION_STAMP) \ $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/makepackage.sh \ $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/postinstall.sh \ $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/preremove.sh \ $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.pkginfo \ $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.sh \ $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxservice.xml \ $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient \ $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl \ $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11restore.pl \ $(VBOX_PATH_X11_ADDITION_INSTALLER)/solaris_xorg.conf \ $(VBOX_SOLPACKFILES) \ $(VBOX_PATH_X11_ADDITION_INSTALLER)/VBoxRandR.sh \ $(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)) \ $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.conf \ $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxdevlink.sed \ $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/VBox.sh \ $(PATH_SUB_CURRENT)/solaris/Makefile.kmk $(call MSG_L1,Installing guest additions) @# Clear out the existing package files if needed $(QUIET)rm -rf $(SOLARIS_INST_DIR) $(QUIET)$(MKDIR) -p $(SOLARIS_INST_DIR) $(QUIET)$(if $(VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE),$(MKDIR) -p $(SOLARIS_INST_DIR_64),$(MKDIR) -p $(SOLARIS_INST_DIR_ISA)) $(QUIET)$(MKDIR) -p $(SOLARIS_INST_DIR)/etc $(QUIET)$(SED) \ -e "s/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g" \ -e "s/@VBOX_SVN_REV@/$(VBOX_SVN_REV)/g" \ -e "s/@VBOX_VERSION_REVSTAMP@/$(PKGINFO_REVSTAMP)/g" \ -e "s/@UNAME_P@/$(PKGINFO_ARCH)/g" \ --output $(SOLARIS_INST_DIR)/vboxguest.pkginfo \ $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.pkginfo $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/makepackage.sh $(SOLARIS_INST_DIR)/makepackage.sh $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/postinstall.sh $(SOLARIS_INST_DIR)/postinstall.sh $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/preremove.sh $(SOLARIS_INST_DIR)/preremove.sh $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.sh $(SOLARIS_INST_DIR)/vboxguest.sh $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxservice.xml $(SOLARIS_INST_DIR)/vboxservice.xml $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.space $(SOLARIS_INST_DIR)/vboxguest.space $(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(VBOX_BRAND_LICENSE_TXT) $(SOLARIS_INST_DIR)/vboxguest.copyright) $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxclient.desktop $(SOLARIS_INST_DIR)/vboxclient.desktop $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient $(SOLARIS_INST_DIR)/1099.vboxclient $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl $(SOLARIS_INST_DIR)/x11config.pl $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11restore.pl $(SOLARIS_INST_DIR)/x11restore.pl $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_X11_ADDITION_INSTALLER)/solaris_xorg.conf $(SOLARIS_INST_DIR)/solaris_xorg.conf $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/VBoxRandR.sh $(SOLARIS_INST_DIR)/VBoxRandR.sh $(QUIET)$(INSTALL) -m 0644 $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.conf $(SOLARIS_INST_DIR)/vboxguest.conf ifdef VBOX_WITH_COMBINED_SOLARIS_GUEST_PACKAGE $(QUIET)$(INSTALL) -m 0644 $(SOLARIS_ADD_BIN_64)/vboxguest $(SOLARIS_INST_DIR_64)/vboxguest $(QUIET)$(INSTALL) -s -m 0755 $(SOLARIS_ADD_BIN_64)/VBoxClient $(SOLARIS_INST_DIR_64)/VBoxClient $(QUIET)$(INSTALL) -s -m 0755 $(SOLARIS_ADD_BIN_64)/VBoxService $(SOLARIS_INST_DIR_64)/VBoxService $(QUIET)$(INSTALL) -s -m 0755 $(SOLARIS_ADD_BIN_64)/VBoxControl $(SOLARIS_INST_DIR_64)/VBoxControl $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_64)/vboxvideo_drv_13.so $(SOLARIS_INST_DIR_64)/vboxvideo_drv_13.so $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_64)/vboxvideo_drv_14.so $(SOLARIS_INST_DIR_64)/vboxvideo_drv_14.so $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_64)/vboxvideo_drv_70.so $(SOLARIS_INST_DIR_64)/vboxvideo_drv_70.so $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_64)/vboxvideo_drv_71.so $(SOLARIS_INST_DIR_64)/vboxvideo_drv_71.so $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_64)/vboxmouse_drv_14.so $(SOLARIS_INST_DIR_64)/vboxmouse_drv_14.so $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_64)/vboxmouse_drv_70.so $(SOLARIS_INST_DIR_64)/vboxmouse_drv_70.so $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_64)/vboxmouse_drv_71.so $(SOLARIS_INST_DIR_64)/vboxmouse_drv_71.so $(QUIET)$(INSTALL) -m 0644 $(SOLARIS_ADD_BIN_32)/vboxguest $(SOLARIS_INST_DIR_32)/vboxguest $(QUIET)$(INSTALL) -s -m 0755 $(SOLARIS_ADD_BIN_32)/VBoxClient $(SOLARIS_INST_DIR_32)/VBoxClient $(QUIET)$(INSTALL) -s -m 0755 $(SOLARIS_ADD_BIN_32)/VBoxService $(SOLARIS_INST_DIR_32)/VBoxService $(QUIET)$(INSTALL) -s -m 0755 $(SOLARIS_ADD_BIN_32)/VBoxControl $(SOLARIS_INST_DIR_32)/VBoxControl $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_32)/vboxvideo_drv_13.so $(SOLARIS_INST_DIR_32)/vboxvideo_drv_13.so $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_32)/vboxvideo_drv_14.so $(SOLARIS_INST_DIR_32)/vboxvideo_drv_14.so $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_32)/vboxvideo_drv_70.so $(SOLARIS_INST_DIR_32)/vboxvideo_drv_70.so $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_32)/vboxvideo_drv_71.so $(SOLARIS_INST_DIR_32)/vboxvideo_drv_71.so $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_32)/vboxmouse_drv_14.so $(SOLARIS_INST_DIR_32)/vboxmouse_drv_14.so $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_32)/vboxmouse_drv_70.so $(SOLARIS_INST_DIR_32)/vboxmouse_drv_70.so $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN_32)/vboxmouse_drv_71.so $(SOLARIS_INST_DIR_32)/vboxmouse_drv_71.so else $(QUIET)$(INSTALL) -m 0644 $(SOLARIS_ADD_BIN)/vboxguest $(SOLARIS_INST_DIR_ISA)/vboxguest $(QUIET)$(INSTALL) -s -m 0755 $(SOLARIS_ADD_BIN)/VBoxClient $(SOLARIS_INST_DIR_ISA)/VBoxClient $(QUIET)$(INSTALL) -s -m 0755 $(SOLARIS_ADD_BIN)/VBoxService $(SOLARIS_INST_DIR_ISA)/VBoxService $(QUIET)$(INSTALL) -s -m 0755 $(SOLARIS_ADD_BIN)/VBoxControl $(SOLARIS_INST_DIR_ISA)/VBoxControl $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN)/vboxvideo_drv_13.so $(SOLARIS_INST_DIR_ISA)/vboxvideo_drv_13.so $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN)/vboxvideo_drv_14.so $(SOLARIS_INST_DIR_ISA)/vboxvideo_drv_14.so $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN)/vboxvideo_drv_70.so $(SOLARIS_INST_DIR_ISA)/vboxvideo_drv_70.so $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN)/vboxvideo_drv_71.so $(SOLARIS_INST_DIR_ISA)/vboxvideo_drv_71.so $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN)/vboxmouse_drv_14.so $(SOLARIS_INST_DIR_ISA)/vboxmouse_drv_14.so $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN)/vboxmouse_drv_70.so $(SOLARIS_INST_DIR_ISA)/vboxmouse_drv_70.so $(QUIET)$(BIN_COPY) $(SOLARIS_ADD_BIN)/vboxmouse_drv_71.so $(SOLARIS_INST_DIR_ISA)/vboxmouse_drv_71.so endif $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxdevlink.sed $(SOLARIS_INST_DIR)/etc/devlink.tab $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/VBox.sh $(SOLARIS_INST_DIR)/VBox.sh $(call MSG_L1,Creating install package: $@) $(QUIET)$(SOLARIS_INST_DIR)/makepackage.sh $(SOLARIS_INST_DIR) $(PKGFILENAME) $(VBOX_SVN_REV) $(QUIET)$(INSTALL) -m 0644 $(SOLARIS_INST_DIR)/$(PKGFILENAME) $(PATH_BIN)/additions/$(PKGFILENAME)