#!/bin/sh -e
#
# 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 1.3 09/09/23 SMI"
VERS=$1-$2
PREFIX=${ROOT}/usr
GNUPREFIX=${ROOT}/usr/gnu
BINDIR=${PREFIX}/bin
GNUBINDIR=${GNUPREFIX}/bin
INFODIR=${PREFIX}/share/info
MAN1DIR=${PREFIX}/share/man/man1
GNUMAN1DIR=${GNUPREFIX}/share/man/man1
LIBDIR=${PREFIX}/lib
LOCALEDIR=${PREFIX}/share/locale
MANSCRIPT=../sunman.sed
. ${SRC}/tools/install.subr
cd ${VERS}
# binaries
for i in cmp diff diff3 sdiff
do
_install E src/$i ${BINDIR}/g${i} 555
_install L ../../bin/g${i} ${GNUBINDIR}/${i}
done
# infofile
_install N doc/diff.info ${INFODIR}/diff.info 444
/usr/sfw/bin/install-info ${INFODIR}/diff.info ${INFODIR}/dir
# manpages
for i in cmp diff diff3 sdiff
do
_install M man/${i}.1 ${MAN1DIR}/g${i}.1 444
_install L ../../../../share/man/man1/g${i}.1 ${GNUMAN1DIR}/${i}.1
done
# locale source
cd po
for i in `ls *.gmo | cut -d'.' -f1`
do
_install N ${i}.gmo ${LOCALEDIR}/${i}/LC_MESSAGES/diffutils.mo 644
done
cd ..
exit 0