# $Id: Makefile.kmk 12170 2008-09-06 03:58:49Z 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. # ifdef VBOX_SINGLE_MAKEFILE SUB_DEPTH = ../../../.. else SUB_DEPTH = .. DEPTH ?= ../../../.. endif 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 SOLARIS64_INST_DIR := $(SOLARIS_INST_DIR)/amd64 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) 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_PATH_X11_ADDITION_INSTALLER)/VBoxRandR.sh \ $(PATH_BIN)/additions/vboxguest \ $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.conf \ $(if $(VBOX_OSE),,$(PATH_ROOT)/doc/License.txt) \ $(PATH_BIN)/additions/VBoxClient \ $(PATH_BIN)/additions/VBoxService \ $(PATH_BIN)/additions/VBoxControl \ $(PATH_BIN)/additions/vboxvideo_drv_13.so \ $(PATH_BIN)/additions/vboxvideo_drv_14.so \ $(PATH_BIN)/additions/vboxvideo_drv_70.so \ $(PATH_BIN)/additions/vboxvideo_drv_71.so \ $(PATH_BIN)/additions/vboxmouse_drv_14.so \ $(PATH_BIN)/additions/vboxmouse_drv_70.so \ $(PATH_BIN)/additions/vboxmouse_drv_71.so \ $(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)$(MKDIR) -p $(SOLARIS64_INST_DIR) $(QUIET)$(MKDIR) -p $(SOLARIS_INST_DIR)/etc $(QUIET)$(SED) \ -e "s/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/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 $(PATH_ROOT)/doc/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 $(QUIET)$(INSTALL) -m 0644 $(PATH_BIN)/additions/vboxguest $(SOLARIS_INST_DIR)/vboxguest @#$(QUIET)$(if $(VBOX_DO_STRIP),strip $(SOLARIS_INST_DIR)/vboxguest,) $(QUIET)$(INSTALL) -s -m 0755 $(PATH_BIN)/additions/VBoxClient $(SOLARIS_INST_DIR)/VBoxClient $(QUIET)$(INSTALL) -s -m 0755 $(PATH_BIN)/additions/VBoxService $(SOLARIS_INST_DIR)/VBoxService $(QUIET)$(INSTALL) -s -m 0755 $(PATH_BIN)/additions/VBoxControl $(SOLARIS_INST_DIR)/VBoxControl $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_13.so $(SOLARIS_INST_DIR)/vboxvideo_drv_13.so $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_14.so $(SOLARIS_INST_DIR)/vboxvideo_drv_14.so $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_70.so $(SOLARIS_INST_DIR)/vboxvideo_drv_70.so $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_71.so $(SOLARIS_INST_DIR)/vboxvideo_drv_71.so $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_14.so $(SOLARIS_INST_DIR)/vboxmouse_drv_14.so $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_70.so $(SOLARIS_INST_DIR)/vboxmouse_drv_70.so $(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_71.so $(SOLARIS_INST_DIR)/vboxmouse_drv_71.so $(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxdevlink.sed $(SOLARIS_INST_DIR)/etc/devlink.tab $(QUIET)$(INSTALL) -m 0644 $(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) $(KBUILD_TARGET_ARCH) $(QUIET)$(INSTALL) -m 0644 $(SOLARIS_INST_DIR)/$(PKGFILENAME) $(PATH_BIN)/additions/$(PKGFILENAME)