#!@SH@ # # start of header # # $NetBSD: header,v 1.23 2003/09/17 02:38:30 jlam Exp $ PKGNAME=$1 STAGE=$2 AWK="@AWK@" BASENAME="@BASENAME@" CAT="@CAT@" CHGRP="@CHGRP@" CHMOD="@CHMOD@" CHOWN="@CHOWN@" CMP="@CMP@" CP="@CP@" DIRNAME="@DIRNAME@" ECHO="@ECHO@" EGREP="@EGREP@" EXPR="@EXPR@" FALSE="@FALSE@" FIND="@FIND@" GREP="@GREP@" GROUPADD="@GROUPADD@" GTAR="@GTAR@" HEAD="@HEAD@" ID="@ID@" LINKFARM="@LINKFARM@" LN="@LN@" MKDIR="@MKDIR@" MV="@MV@" PERL5="@PERL5@" PKG_ADMIN="@PKG_ADMIN@" PKG_INFO="@PKG_INFO@" RM="@RM@" RMDIR="@RMDIR@" SED="@SED@" SETENV="@SETENV@" SH="@SH@" SORT="@SORT@" SU="@SU@" TEST="@TEST@" TOUCH="@TOUCH@" TR="@TR@" TRUE="@TRUE@" USERADD="@USERADD@" XARGS="@XARGS@" PKGBASE="@PKGBASE@" LOCALBASE="@LOCALBASE@" X11BASE="@X11BASE@" DEPOTBASE="@DEPOTBASE@" PREFIX="@PREFIX@" case ${PKG_PREFIX} in ${LOCALBASE}/*) VIEW="${PKG_PREFIX#${LOCALBASE}/}" ;; *) VIEW="" ;; esac PKG_USERS="@PKG_USERS@" PKG_GROUPS="@PKG_GROUPS@" SPECIAL_PERMS="@SPECIAL_PERMS@" CONF_FILES="@CONF_FILES@" CONF_FILES_PERMS="@CONF_FILES_PERMS@" SUPPORT_FILES="@SUPPORT_FILES@" SUPPORT_FILES_PERMS="@SUPPORT_FILES_PERMS@" RCD_SCRIPTS="@RCD_SCRIPTS@" RCD_SCRIPTS_DIR="@RCD_SCRIPTS_DIR@" RCD_SCRIPTS_EXAMPLEDIR="@RCD_SCRIPTS_EXAMPLEDIR@" MAKE_DIRS="@MAKE_DIRS@" MAKE_DIRS_PERMS="@MAKE_DIRS_PERMS@" OWN_DIRS="@OWN_DIRS@" OWN_DIRS_PERMS="@OWN_DIRS_PERMS@" PKG_SYSCONFBASE="@PKG_SYSCONFBASE@" PKG_SYSCONFDEPOTBASE="@PKG_SYSCONFDEPOTBASE@" PKG_SYSCONFBASEDIR="@PKG_SYSCONFBASEDIR@" PKG_SYSCONFDIR="@PKG_SYSCONFDIR@" CONF_DEPENDS="@CONF_DEPENDS@" case ${VIEW} in "") PKG_SYSCONFVIEWBASE="${PKG_SYSCONFBASE}" ;; *) PKG_SYSCONFVIEWBASE="${PKG_SYSCONFBASE}/${VIEW}" ;; esac PKG_REGISTER_SHELLS="@PKG_REGISTER_SHELLS@" PKG_SHELL="@PKG_SHELL@" ALL_USERS= ALL_GROUPS= ALL_FILES= ALL_MAKE_DIRS= ALL_DIRS= VIEW_FILES= CONF_IGNORE_FILES="*[~#] *.OLD *.orig *,v .pkgsrc */.pkgsrc" PKG_INSTALLATION_TYPE="@PKG_INSTALLATION_TYPE@" case "${PKG_CREATE_USERGROUP:-@PKG_CREATE_USERGROUP@}" in [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) _PKG_CREATE_USERGROUP=YES ;; [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) _PKG_CREATE_USERGROUP=NO ;; esac case "${PKG_CONFIG:-@PKG_CONFIG@}" in [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) _PKG_CONFIG=YES ;; [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) _PKG_CONFIG=NO ;; esac case "${PKG_RCD_SCRIPTS:-@PKG_RCD_SCRIPTS@}" in [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) _PKG_RCD_SCRIPTS=YES ;; [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) _PKG_RCD_SCRIPTS=NO ;; esac msginit() { _msgn=0 _msgempty=1 } msgempty() { if [ $_msgempty -gt 0 ]; then ${TRUE} else ${FALSE} fi } msgadd() { eval _msg$_msgn=\"$1\" _msgn=`${EXPR} $_msgn + 1` _msgempty=0 } msgprint() { i=0 while [ $i -lt $_msgn ]; do eval _msg=_msg$i eval ${ECHO} "\$$_msg" | ${SED} \ -e "s,^###, ," \ -e "s,^##, ," \ -e "s,^#, ," i=`${EXPR} $i + 1` done } # end of header