Makefile.kmk revision 743171284c248b538ac36a8cf86260ff276496d9
# $Id$
## @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.
#
DEPTH ?= ../../../..
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
SOLARISINSTDIR := $(PATH_TARGET)/install
SOLARISTEMPDIR := $(PATH_TARGET)/tempinstall
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/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 \
$(PATH_SUB_CURRENT)/solaris/Makefile.kmk
$(call MSG_L1,Installing guest additions)
@# Clear out the existing package files if needed
$(QUIET)rm -rf $(SOLARISINSTDIR)
$(QUIET)rm -rf $(SOLARISTEMPDIR)
$(QUIET)$(MKDIR) -p $(SOLARISINSTDIR)
$(QUIET)$(MKDIR) -p $(SOLARISINSTDIR)/etc
$(QUIET)$(MKDIR) -p $(SOLARISTEMPDIR)
$(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 $(SOLARISINSTDIR)/vboxguest.pkginfo \
$(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.pkginfo
$(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/makepackage.sh $(SOLARISINSTDIR)/makepackage.sh
$(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/postinstall.sh $(SOLARISINSTDIR)/postinstall.sh
$(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/preremove.sh $(SOLARISINSTDIR)/preremove.sh
$(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.sh $(SOLARISINSTDIR)/vboxguest.sh
$(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxservice.xml $(SOLARISINSTDIR)/vboxservice.xml
$(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxguest.space $(SOLARISINSTDIR)/vboxguest.space
$(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(PATH_ROOT)/doc/License.txt $(SOLARISINSTDIR)/vboxguest.copyright)
$(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_X11_ADDITION_INSTALLER)/vboxclient.desktop $(SOLARISINSTDIR)/vboxclient.desktop
$(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient $(SOLARISINSTDIR)/1099.vboxclient
$(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl $(SOLARISINSTDIR)/x11config.pl
$(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11restore.pl $(SOLARISINSTDIR)/x11restore.pl
$(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_X11_ADDITION_INSTALLER)/solaris_xorg.conf $(SOLARISINSTDIR)/solaris_xorg.conf
$(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/VBoxRandR.sh $(SOLARISINSTDIR)/VBoxRandR.sh
$(QUIET)$(INSTALL) -m 0644 $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.conf $(SOLARISINSTDIR)/vboxguest.conf
$(QUIET)$(INSTALL) -m 0644 $(PATH_BIN)/additions/vboxguest $(SOLARISINSTDIR)/vboxguest
@#$(QUIET)$(if $(VBOX_DO_STRIP),strip $(SOLARISINSTDIR)/vboxguest,)
$(QUIET)$(INSTALL) -s -m 0755 $(PATH_BIN)/additions/VBoxClient $(SOLARISINSTDIR)/VBoxClient
$(QUIET)$(INSTALL) -s -m 0755 $(PATH_BIN)/additions/VBoxService $(SOLARISINSTDIR)/VBoxService
$(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_13.so $(SOLARISINSTDIR)/vboxvideo_drv_13.so
$(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_14.so $(SOLARISINSTDIR)/vboxvideo_drv_14.so
$(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_70.so $(SOLARISINSTDIR)/vboxvideo_drv_70.so
$(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_71.so $(SOLARISINSTDIR)/vboxvideo_drv_71.so
$(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_14.so $(SOLARISINSTDIR)/vboxmouse_drv_14.so
$(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_70.so $(SOLARISINSTDIR)/vboxmouse_drv_70.so
$(QUIET)$(BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_71.so $(SOLARISINSTDIR)/vboxmouse_drv_71.so
$(QUIET)$(INSTALL) -m 0644 $(VBOX_PATH_SOLARIS_ADDITION_INSTALLER)/vboxdevlink.sed $(SOLARISINSTDIR)/etc/devlink.tab
$(call MSG_L1,Creating install package: $@)
$(QUIET)$(SOLARISINSTDIR)/makepackage.sh $(SOLARISINSTDIR) $(PKGFILENAME)
$(QUIET)$(INSTALL) -m 0644 $(SOLARISINSTDIR)/$(PKGFILENAME) $(PATH_BIN)/additions/$(PKGFILENAME)