1 #!/usr/bin/ksh93 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 (the "License"). 7 # You may not use this file except in compliance with the License. 8 # 9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 # or http://www.opensolaris.org/os/licensing. 11 # See the License for the specific language governing permissions 12 # and limitations under the License. 13 # 14 # When distributing Covered Code, include this CDDL HEADER in each 15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 # If applicable, add the following below this CDDL HEADER, with the 17 # fields enclosed by brackets "[]" replaced with your own identifying 18 # information: Portions Copyright [yyyy] [name of copyright owner] 19 # 20 # CDDL HEADER END 21 # 22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved. 23 # Use is subject to license terms. 24 # 25 #ident "@(#)install-sfw 1.2 09/07/30 SMI" 26 27 set +o errexit 28 29 VERS=7.4 30 31 GNUPREFIX=usr/gnu 32 GNUBINDIR=${GNUPREFIX}/bin 33 GNUSHAREDIR=${GNUPREFIX}/share 34 GNUMANDIR=${GNUSHAREDIR}/man 35 GNUMAN1DIR=${GNUMANDIR}/man1 36 37 ROOTGNUBINDIR=${ROOT}/${GNUBINDIR} 38 ROOTGNUMAN1DIR=${ROOT}/${GNUMAN1DIR} 39 40 PREFIX=${ROOT}/usr 41 BINDIR=${PREFIX}/bin 42 SHAREDIR=${PREFIX}/share 43 MANDIR=${SHAREDIR}/man 44 MAN1DIR=${MANDIR}/man1 45 INFODIR=${SHAREDIR}/info 46 47 ROOTMAN1DIR=${MAN1DIR} 48 49 MANSCRIPT=../../sunman-stability 50 source ${SRC}/tools/install.subr 51 52 cd coreutils-${VERS}/src 53 54 # Binaries and manual pages 55 56 CMDS_NONCONFLICTING="[ base64 dir dircolors ginstall md5sum pinky printenv \ 57 ptx readlink seq sha1sum sha224sum sha256sum sha384sum sha512sum shred \ 58 shuf stat tac timeout truncate users vdir whoami" 59 60 for cmd in $CMDS_NONCONFLICTING; do 61 _install E ${cmd} ${BINDIR}/${cmd} 555 62 63 if [ "${cmd}" = "[" ]; then 64 # Special case 1: [ has the manual page "test", which 65 # conflicts. 66 man=test.1 67 dman=${man} 68 tgtdir=${ROOTGNUMAN1DIR} 69 elif [ "${cmd}" = "ginstall" ]; then 70 # Special case 2. ginstall has the manual page 71 # "install" which conflicts 72 man=install.1 73 dman=ginstall.1 74 tgtdir=${ROOTMAN1DIR} 75 else 76 man=${cmd}.1 77 dman=${man} 78 tgtdir=${ROOTMAN1DIR} 79 fi 80 81 _install M ../man/${man} ${tgtdir}/${dman} 444 82 done 83 84 CMDS_CONFLICTING_ELF="basename cat chgrp chmod chown chroot cksum comm \ 85 cp csplit cut date dd df dirname du echo env expand expr factor false \ 86 fmt fold head hostid id join kill link ln logname ls mkdir \ 87 mkfifo mknod mktemp mv nice nl nohup od paste pathchk pr printf pwd rm rmdir \ 88 sleep sort split stty sum sync tail tee test touch tr true tsort tty \ 89 uname unexpand uniq unlink uptime wc who whoami yes" 90 91 for cmd in $CMDS_CONFLICTING_ELF; do 92 _install E ${cmd} ${ROOTGNUBINDIR}/${cmd} 555 93 94 man=${cmd}.1 95 _install M ../man/${man} ${ROOTGNUMAN1DIR}/${man} 444 96 done 97 98 # Non-ELF executables. 99 # The groups(1) variant is implemented as a shell script. 100 _install N groups ${ROOTGNUBINDIR}/groups 555 101 _install M ../man/groups.1 ${ROOTGNUMAN1DIR}/groups.1 444 102 103 # Info file. 104 _install N ../doc/coreutils.info ${INFODIR}/coreutils.info 444 105 106 exit 0 107 108