pkgsrc/mk/install/header

142 lines
2.2 KiB
Text
Raw Normal View History

#!@SH@
#
# start of header
#
# $NetBSD: header,v 1.18 2003/08/30 18:42:37 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@"
2002-10-08 13:32:34 +02:00
FIND="@FIND@"
GREP="@GREP@"
GROUPADD="@GROUPADD@"
GTAR="@GTAR@"
HEAD="@HEAD@"
ID="@ID@"
LN="@LN@"
MKDIR="@MKDIR@"
MV="@MV@"
PERL5="@PERL5@"
RM="@RM@"
RMDIR="@RMDIR@"
SED="@SED@"
SH="@SH@"
SORT="@SORT@"
SU="@SU@"
TEST="@TEST@"
TOUCH="@TOUCH@"
TR="@TR@"
TRUE="@TRUE@"
USERADD="@USERADD@"
2002-10-08 13:32:34 +02:00
XARGS="@XARGS@"
PKGBASE="@PKGBASE@"
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_SYSCONFDIR="@PKG_SYSCONFDIR@"
PKG_REGISTER_SHELLS="@PKG_REGISTER_SHELLS@"
PKG_SHELL="@PKG_SHELL@"
ALL_USERS=
ALL_GROUPS=
ALL_FILES=
ALL_MAKE_DIRS=
ALL_DIRS=
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