# 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 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#pragma ident "@(#)install-sfw 1.9 08/07/09 SMI"
#
# makefile.master {usr/src} sets the following:
#
# CFGPREFIX= /usr
# CFGBIN= ${CFGPREFIX}/bin
# CFGMAN= ${CFGPREFIX}/share/man
# CFGMAN1= ${CFGMAN}/man1
# CONFIGURE_OPTIONS = --prefix=${CFGPREFIX}
# CONFIGURE_OPTIONS += --mandir=${CFGMAN}
#
# ROOTxxx refers to the build root {proto/MACHTYPE/...}
#
# ROOTBIN= ${ROOT}${CFGBIN}
# ROOTMAN1= ${ROOT}${CFGMAN1}
#
# These directories are added in Targetdirs in usr/src
#
# ROOT_IRC_DIR=${ROOT}/${CFGPREFIX}/share/irc
# ROOT_SCRIPT=${ROOT_IRC_DIR}/script
# ROOT_HELP=${ROOT_IRC_DIR}/help
#
#
# set base information
#
CFGPREFIX=/usr
CFGBIN=${CFGPREFIX}/bin
CFGMAN=${CFGPREFIX}/share/man
CFGMAN1=${CFGMAN}/man1
ROOTBIN=${ROOT}${CFGBIN}
ROOTMAN1=${ROOT}${CFGMAN1}
ROOT_IRC_DIR=${ROOT}/${CFGPREFIX}/share/irc
ROOT_SCRIPT=${ROOT_IRC_DIR}/script
ROOT_HELP=${ROOT_IRC_DIR}/help
VERS=20060725
PKGVERS=ircii-${VERS}
TOPDIR=$PWD/${PKGVERS}
. ${SRC}/tools/install.subr
#
# populate man page
#
cd ${TOPDIR}/doc
MANSCRIPT=../../sunman-stability
_install M ircII.1 ${ROOTMAN1}/ircII.1 444
_install L ../../../share/man/man1/ircII.1 ${ROOTMAN1}/irc.1 444
#
# populate scripts
#
cd ${TOPDIR}/script
tar -cf - . | ( cd ${ROOT_SCRIPT}; tar -xf - )
find ${ROOT_SCRIPT} -type f -print | xargs chmod 555
chmod 755 ${ROOT_SCRIPT}
#
# populate help files
#
cd ${TOPDIR}/help
tar -cf - . | ( cd ${ROOT_HELP}; tar -xf - )
find ${ROOT_HELP} -type d -print | xargs chmod 755
find ${ROOT_HELP} -type f -print | xargs chmod 444
#
# populate bins
#
cd ${TOPDIR}
_install E irc ${ROOTBIN}/irc 555
_install E ircio ${ROOTBIN}/ircio 555
_install E ircflush ${ROOTBIN}/ircflush 555
_install E wserv ${ROOTBIN}/wserv 555
exit 0