#!/bin/ksh93
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "@(#)install-sfw-64 1.1 09/03/11 SMI"
# Stop at first error
set -o errexit
PREFIX=${ROOT}/usr
SBINDIR=${PREFIX}/sbin/${MACH64}
LIBDIR=${PREFIX}/lib/${MACH64}
PKGCONFIG_DIR=${LIBDIR}/pkgconfig
PLUGIN_DIR=${LIBDIR}/openwsman/plugins
AUTH_LIB_DIR=${LIBDIR}/openwsman/authenticators
source ${SRC}/tools/install.subr
# BLDDIR is passed in from Makefile.sfw as environment variable
# install the daemon
_install E ${BLDDIR}/src/server/.libs/openwsmand ${SBINDIR}/openwsmand 555
# install libraries
OPENWSMAN_LIB_LIST="\
libwsman.so \
libwsman_curl_client_transport.so \
libwsman_client.so \
libwsman_server.so"
for i in ${OPENWSMAN_LIB_LIST}
do
_install D ${BLDDIR}/src/lib/.libs/${i}.1.0.0 ${LIBDIR}/${i}.1.0.0 555
_install L ${i}.1.0.0 ${LIBDIR}/${i}
_install L ${i}.1.0.0 ${LIBDIR}/${i}.1
done
_install D ${BLDDIR}/src/cpp/.libs/libwsman_clientpp.so.0.0.0 ${LIBDIR}/libwsman_clientpp.so.0.0.0 555
_install L libwsman_clientpp.so.0.0.0 ${LIBDIR}/libwsman_clientpp.so
_install L libwsman_clientpp.so.0.0.0 ${LIBDIR}/libwsman_clientpp.so.0
# install plugin libraries
_install D ${BLDDIR}/src/plugins/identify/.libs/libwsman_identify_plugin.so.1.0.0 ${PLUGIN_DIR}/libwsman_identify_plugin.so.1.0.0 555
_install L libwsman_identify_plugin.so.1.0.0 ${PLUGIN_DIR}/libwsman_identify_plugin.so
_install L libwsman_identify_plugin.so.1.0.0 ${PLUGIN_DIR}/libwsman_identify_plugin.so.1
_install D ${BLDDIR}/src/plugins/wsman/test/.libs/libwsman_test.so.1.0.0 ${PLUGIN_DIR}/libwsman_test.so.1.0.0 555
_install L libwsman_test.so.1.0.0 ${PLUGIN_DIR}/libwsman_test.so
_install L libwsman_test.so.1.0.0 ${PLUGIN_DIR}/libwsman_test.so.1
# install authenticator libraries
_install D ${BLDDIR}/src/authenticators/file/.libs/libwsman_file_auth.so.1.0.0 ${AUTH_LIB_DIR}/libwsman_file_auth.so.1.0.0 555
_install L libwsman_file_auth.so.1.0.0 ${AUTH_LIB_DIR}/libwsman_file_auth.so
_install L libwsman_file_auth.so.1.0.0 ${AUTH_LIB_DIR}/libwsman_file_auth.so.1
_install D ${BLDDIR}/src/authenticators/pam/.libs/libwsman_pam_auth.so.1.0.0 ${AUTH_LIB_DIR}/libwsman_pam_auth.so.1.0.0 555
_install L libwsman_pam_auth.so.1.0.0 ${AUTH_LIB_DIR}/libwsman_pam_auth.so
_install L libwsman_pam_auth.so.1.0.0 ${AUTH_LIB_DIR}/libwsman_pam_auth.so.1
# install pkgconfig files
PKGCONFIG_FILE_LIST="\
openwsman-server.pc \
openwsman++.pc \
openwsman.pc"
for i in ${PKGCONFIG_FILE_LIST}
do
_install N ${BLDDIR}/${i} ${PKGCONFIG_DIR}/${i} 0444
done
exit 0