Home | History | Annotate | Download | only in gawk
      1 #!/bin/sh -e
      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 #
     23 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
     24 # Use is subject to license terms.
     25 #
     26 #
     27 #ident	"@(#)install-sfw	1.1	08/10/01 SMI"
     28 
     29 VERS=gawk-3.1.5
     30 
     31 PREFIX=${ROOT}/usr
     32 BINDIR=${PREFIX}/bin
     33 AWKLIBDIR=${PREFIX}/lib/awk
     34 SHAREDIR=${PREFIX}/share
     35 AWKSHAREDIR=${SHAREDIR}/awk
     36 INFODIR=${SHAREDIR}/info
     37 MAN1DIR=${SHAREDIR}/man/man1
     38 LOCALEDIR=${SHAREDIR}/locale
     39 GNUPREFIX=${ROOT}/usr/gnu
     40 GNUBINDIR=${GNUPREFIX}/bin
     41 GNUMAN1DIR=${GNUPREFIX}/share/man/man1
     42 
     43 mkdir -p -m 755 ${BINDIR}
     44 mkdir -p -m 755 ${AWKLIBDIR}
     45 mkdir -p -m 755 ${AWKSHAREDIR}
     46 mkdir -p -m 755 ${INFODIR}
     47 mkdir -p -m 755 ${MAN1DIR}
     48 mkdir -p -m 755 ${GNUBINDIR}
     49 mkdir -p -m 755 ${GNUMAN1DIR}
     50 
     51 . ${SRC}/tools/install.subr
     52 
     53 cd ${VERS}
     54 
     55 # The gawk manpages are updated by Sun to include a comment, an
     56 # ATTRIBUTES section with stability classification, and a NOTES
     57 # section containing a pointer to the source package. We do this
     58 # automatically at install time. If the package is revised, it is
     59 # possible that additional changes may be required.  This can be
     60 # generally be done by updating the sunman-stability file.
     61 
     62 MANSCRIPT=../../sunman-stability
     63 
     64 cd doc
     65 _install M gawk.1 ${MAN1DIR}/gawk.1 444
     66 _install H ${MAN1DIR}/gawk.1 ${MAN1DIR}/pgawk.1 444
     67 _install L ../../../../share/man/man1/gawk.1 ${GNUMAN1DIR}/awk.1
     68 _install M igawk.1 ${MAN1DIR}/igawk.1 444
     69 _install N gawk.info ${INFODIR}/gawk.info 444
     70 _install N gawkinet.info ${INFODIR}/gawkinet.info 444
     71 install-info --dir-file=${INFODIR}/dir ${INFODIR}/gawk.info
     72 install-info --dir-file=${INFODIR}/dir ${INFODIR}/gawkinet.info
     73 chmod 644 ${INFODIR}/dir
     74 
     75 cd ..
     76 _install E gawk ${BINDIR}/gawk 555
     77 _install L ../../bin/gawk ${GNUBINDIR}/awk
     78 _install E pgawk ${BINDIR}/pgawk 555
     79 
     80 cd awklib
     81 _install S igawk ${BINDIR}/igawk 555
     82 _install E grcat ${AWKLIBDIR}/grcat 555
     83 _install E pwcat ${AWKLIBDIR}/pwcat 555
     84 _install N group.awk ${AWKSHAREDIR}/group.awk 444
     85 _install N passwd.awk ${AWKSHAREDIR}/passwd.awk 444
     86 
     87 cd eg/lib
     88 _install N assert.awk ${AWKSHAREDIR}/assert.awk 444
     89 _install N bits2str.awk ${AWKSHAREDIR}/bits2str.awk 444
     90 _install N cliff_rand.awk ${AWKSHAREDIR}/cliff_rand.awk 444
     91 _install N ctime.awk ${AWKSHAREDIR}/ctime.awk 444
     92 _install N ftrans.awk ${AWKSHAREDIR}/ftrans.awk 444
     93 _install N getopt.awk ${AWKSHAREDIR}/getopt.awk 444
     94 _install N gettime.awk ${AWKSHAREDIR}/gettime.awk 444
     95 _install N join.awk ${AWKSHAREDIR}/join.awk 444
     96 _install N libintl.awk ${AWKSHAREDIR}/libintl.awk 444
     97 _install N nextfile.awk ${AWKSHAREDIR}/nextfile.awk 444
     98 _install N noassign.awk ${AWKSHAREDIR}/noassign.awk 444
     99 _install N ord.awk ${AWKSHAREDIR}/ord.awk 444
    100 _install N readable.awk ${AWKSHAREDIR}/readable.awk 444
    101 _install N rewind.awk ${AWKSHAREDIR}/rewind.awk 444
    102 _install N round.awk ${AWKSHAREDIR}/round.awk 444
    103 _install N strtonum.awk ${AWKSHAREDIR}/strtonum.awk 444
    104 _install N zerofile.awk ${AWKSHAREDIR}/zerofile.awk 444
    105 
    106 cd ../../../po
    107 for file in *.po
    108 do
    109 	base=`basename $file .po`
    110 	chmod 444 ${LOCALEDIR}/$base/LC_MESSAGES/gawk.mo
    111 done
    112 
    113 exit 0
    114