#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
#ident "@(#)install-privoxy 1.2 10/04/22 SMI"
set -o errexit
function ins_file {
iprog=$1
idir=$2
imode=$3
_install N ${iprog} ${idir}/${iprog##*/} ${imode}
}
function install_smf {
(cd ${TOP}/Solaris
ins_file http-privoxy.xml ${ROOT}/lib/svc/manifest/network 444
ins_file http-privoxy ${ROOT}/lib/svc/method 555
)
}
function install_config {
for f in config default.action default.filter standard.action trust \
user.action user.filter; do
ins_file $f $CONFDIR 644
done
}
function install_doc {
for f in README AUTHORS doc/text/faq.txt LICENSE ChangeLog
do
ins_file $f ${DOCDIR} 644
done
(cd doc/webserver
for i in developer-manual faq user-manual
do
(cd $i
for j in *
do
[ j = 'pcrs.3' -o j = 'gpl.html' ] && continue
ins_file $j ${DOCDIR}/$i 644
done
)
done
)
}
function install_templates {
(cd templates
for i in *
do
ins_file $i ${TEMPLATEDIR} 644
done
)
}
function install_man {
_install M privoxy.1 ${MANDIR}/privoxy.1 444
}
function install_daemon {
_install N privoxy ${LIBDIR}/privoxy 555
}
TOP=$( pwd )
PKGVERS=$( sed -ne '/VER=/s/.*=//p' Makefile.sfw )
PREFIX=${ROOT}/usr
LIBDIR=${PREFIX}/lib
DOCDIR=${PREFIX}/share/doc/privoxy
CONFDIR=${ROOT}/etc/privoxy
TEMPLATEDIR=${CONFDIR}/templates
MANDIR=${PREFIX}/share/man/man1
MANSCRIPT=${TOP}/sunman-stability
source ${SRC}/tools/install.subr
cd ${PKGVERS}
install_config
install_templates
install_man
install_daemon
install_doc
install_smf