New install-sfw
  1 #!/bin/sh
  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 
 24 
 25 #
 26 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 27 # Use is subject to license terms.
 28 #
 29 # install lynx's objects in the proto area, since it would really
 30 # like to install locally, but that doesn't scale.
 31 #
 32 
 33 VERS=lynx2-8-6
 34 PREFIX=${ROOT}/opt/sfw
 35 BINDIR=${PREFIX}/bin
 36 LIBDIR=${PREFIX}/lib
 37 INCDIR=${PREFIX}/include
 38 MAN1DIR=${PREFIX}/man/man1
 39 MAN3DIR=${PREFIX}/man/man3
 40 INFODIR=${PREFIX}/info
 41 
 42 # Include for _fixup_perl
 43 . ${SRC}/tools/install.subr
 44 
 45 cd ${VERS}
 46 
 47 rm -f ${BINDIR}/lynx
 48 cp lynx ${BINDIR}/lynx
 49 strip ${BINDIR}/lynx
 50 chmod 555 ${BINDIR}/lynx
 51 
 52 rm -f ${MAN1DIR}/lynx.1
 53 cp lynx.man ${MAN1DIR}/lynx.1
 54 chmod 444 ${MAN1DIR}/lynx.1
 55 
 56 cd lynx_help
 57 
 58 for f in *.html */*.html
 59 do
 60         rm -f ${LIBDIR}/lynx_help/$f
 61         sed -f ../help_files.sed $f > ${LIBDIR}/lynx_help/$f
 62         chmod 644 ${LIBDIR}/lynx_help/$f
 63 done
 64 
 65 cd ..
 66 
 67 rm -f ${LIBDIR}/lynx.cfg
 68 sed     -e '/^HELPFILE:http/s@^@#@' \
 69         -e '/^#HELPFILE:file/s@#@@' \
 70         -e '/^HELPFILE:file/s@/PATH_TO/lynx_help@/opt/sfw/lib/lynx_help@' \
 71         -e '/^[A-Z_]*:/s@/PATH_TO/lynx_doc@/opt/sfw/lib/lynx_doc@' \
 72         -e '/^HELPFILE:file/s@$@@' \
 73         -e '/^HELPFILE:file/s@$@@' \
 74         lynx.cfg >${LIBDIR}/lynx.cfg
 75 chmod 644 ${LIBDIR}/lynx.cfg
 76 
 77 _fixup_perl samples/mailto-form.pl
 78 
 79 cp samples/lynx.lss ${LIBDIR}/lynx.lss
 80 
 81 tar cf - C[HO]* PROBLEMS README samples test | \
 82     (cd ${LIBDIR}/lynx_doc; tar xf -; chmod 755 test samples)
 83 
 84 for i in COPYING COPYHEADER
 85 do
 86         rm -f ${LIBDIR}/lynx_help/${i}
 87         ln -s ../lynx_doc/${i} ${LIBDIR}/lynx_help/${i}
 88 done
 89 cd ..