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 23 # 24 # Copyright 2009 Sun Microsystems, Inc. All rights reserved. 25 # Use is subject to license terms. 26 # 27 # ident "@(#)install-sfw 1.2 09/06/03 SMI" 28 # 29 30 # stop at first error 31 set -o errexit 32 33 PREFIX=${ROOT}/usr 34 MAN1DIR=${PREFIX}/share/man/man1 35 36 source ${SRC}/tools/install.subr 37 38 _install N awstats.1 ${MAN1DIR}/awstats.1 444 39 40 cd ${VER} 41 42 AWSTATSDIR=${PREFIX}/share/doc/awstats 43 cd docs 44 cp -rf * ${AWSTATSDIR} 45 cd .. 46 47 AWSTATSDIR=${PREFIX}/lib/awstats 48 for file in `find . \( -name "*.pm" \) -o \( -name "*.pl" \)`; do 49 chmod +w $file 50 $PERLmaster -pi -e '($. == 1) && (s|^#!.*perl|#!'$PERLmaster'|)' $file 51 done 52 cd tools 53 for file in awstats_exportlib.pl urlaliasbuilder.pl; do 54 dos2unix $file $file 55 done 56 cd .. 57 cp -rf README.TXT tools ${AWSTATSDIR} 58 59 AWSTATSDIR=${PREFIX}/share/awstats 60 cd wwwroot 61 FILELIST="cgi-bin/awredir.pl cgi-bin/lib/blacklist.txt \ 62 cgi-bin/lib/referer_spam.pm cgi-bin/plugins/decodeutfkeys.pm \ 63 cgi-bin/plugins/hashfiles.pm \ 64 cgi-bin/plugins/ipv6.pm cgi-bin/plugins/timehires.pm \ 65 classes/src/AWGraphApplet.java classes/src/Makefile.pl \ 66 css/awstats_bw.css css/awstats_default.css \ 67 js/awstats_misc_tracker.js" 68 chmod +w $FILELIST 69 for file in $FILELIST; do 70 dos2unix $file $file 71 done 72 $PERLmaster -pi -e 's/\r/\n/gi' cgi-bin/plugins/export_to_csv.pm 73 74 cp -rf * ${AWSTATSDIR} 75 76 exit 0 77