1 #!/usr/bin/bash
   2 #
   3 # CDDL HEADER START
   4 #
   5 # The contents of this file are subject to the terms of the
   6 # Common Development and Distribution License, Version 1.0 only
   7 # (the "License").  You may not use this file except in compliance
   8 # with the License.
   9 #
  10 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  11 # or http://www.opensolaris.org/os/licensing.
  12 # See the License for the specific language governing permissions
  13 # and limitations under the License.
  14 #
  15 # When distributing Covered Code, include this CDDL HEADER in each
  16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  17 # If applicable, add the following below this CDDL HEADER, with the
  18 # fields enclosed by brackets "[]" replaced with your own identifying
  19 # information: Portions Copyright [yyyy] [name of copyright owner]
  20 #
  21 # CDDL HEADER END
  22 #
  23 
  24 #
  25 # Copyright (c) 2014 by Delphix. All rights reserved.
  26 #
  27 
  28 # Load support functions
  29 . ../../lib/functions.sh
  30 
  31 PROG=open-vm-tools
  32 BUILDDIR=open-vm-tools-9.4.0-1280544
  33 VER=9.4.0
  34 VERHUMAN=9.4.0
  35 PKG=system/virtualization/open-vm-tools
  36 SUMMARY="Open Virtual Machine Tools"
  37 DESC="The Open Virtual Machine Tools project aims to provide a suite of open source virtualization utilities and drivers to improve the functionality and user experience of virtualization. The project currently runs in guest operating systems under the VMware hypervisor."
  38 
  39 BUILD_DEPENDS_IPS='developer/pkg-config'
  40 RUN_DEPENDS_IPS='library/glib2 system/library/gcc-5-runtime'
  41 
  42 install_smf() {
  43         logmsg "Installing SMF components"
  44         logcmd mkdir -p $DESTDIR/lib/svc/manifest/system/virtualization || \
  45                 logerr "--- Failed to create manifest directory"
  46         logcmd cp $SRCDIR/open-vm-tools.xml $DESTDIR/lib/svc/manifest/system/virtualization/ || \
  47                 logerr "--- Failed to copy manifest file"
  48 }
  49 
  50 CFLAGS="-std=gnu89 -Wno-logical-not-parentheses -Wno-bool-compare -Wno-deprecated-declarations -Wno-unused-local-typedefs"
  51 CONFIGURE_OPTS="
  52         --without-kernel-modules
  53         --disable-static
  54         --without-x
  55         --without-dnet
  56         --without-icu
  57         --without-gtk2
  58         --without-gtkmm
  59 "
  60 BUILDARCH=32
  61 
  62 init
  63 download_source $PROG $PROG $VER
  64 patch_source
  65 prep_build
  66 build
  67 install_smf
  68 make_isa_stub
  69 make_package
  70 clean_up