usr/src/cmd/fakeroot/install-sfw
author Cyril Plisko <cyril.plisko@grigale.com>
Wed, 21 Oct 2009 17:43:30 +0200
changeset 0 b34509ac961f
permissions -rw-r--r--
Import sfw repo b126
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     1
#!/usr/bin/ksh93 -p
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     2
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     3
# CDDL HEADER START
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     4
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     5
# The contents of this file are subject to the terms of the
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     6
# Common Development and Distribution License (the "License").
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     7
# You may not use this file except in compliance with the License.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     8
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     9
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    10
# or http://www.opensolaris.org/os/licensing.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    11
# See the License for the specific language governing permissions
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    12
# and limitations under the License.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    13
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    14
# When distributing Covered Code, include this CDDL HEADER in each
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    15
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    16
# If applicable, add the following below this CDDL HEADER, with the
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    17
# fields enclosed by brackets "[]" replaced with your own identifying
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    18
# information: Portions Copyright [yyyy] [name of copyright owner]
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    19
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    20
# CDDL HEADER END
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    21
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    22
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    23
# 
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    24
# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    25
# Use is subject to license terms.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    26
# 
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    27
# ident	"@(#)install-sfw	1.1	09/10/07 SMI"
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    28
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    29
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    30
set -o errexit
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    31
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    32
PKGVERS=${1}
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    33
M64=${2:-""}
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    34
PREFIX=${ROOT}/usr
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    35
MANDIR=${PREFIX}/share/man
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    36
MANSCRIPT=../sunman-stability
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    37
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    38
source ${SRC}/tools/install.subr
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    39
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    40
cd ${PKGVERS}
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    41
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    42
if ((${#M64} == 0)); then
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    43
	# Install the 32-bit targets only
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    44
	_install S scripts/fakeroot ${PREFIX}/bin/fakeroot 555
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    45
	_install E faked ${PREFIX}/lib/faked 555
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    46
	_install D .libs/libfakeroot.so ${PREFIX}/lib/libfakeroot.so 555
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    47
	_install M doc/fakeroot.1 ${MANDIR}/man1/fakeroot.1 444
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    48
else
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    49
	# Install the 64-bit targets only
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    50
	_install D .libs/libfakeroot.so ${PREFIX}/lib/${M64}/libfakeroot.so 555
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    51
fi
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    52
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    53
exit 0