blob: 17d41cbd972b14060670c0583a60177213676d08 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
#!@SH@
#
# start of header
#
# $NetBSD: header,v 1.27 2004/12/27 06:41:50 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@"
ECHO_N="@ECHO_N@"
EGREP="@EGREP@"
EXPR="@EXPR@"
FALSE="@FALSE@"
FIND="@FIND@"
GREP="@GREP@"
GROUPADD="@GROUPADD@"
GTAR="@GTAR@"
HEAD="@HEAD@"
ID="@ID@"
LINKFARM="@LINKFARM@"
LN="@LN@"
LS="@LS@"
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_MODE="@CONF_FILES_MODE@"
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
if [ -z "${USERADD}" -o -z "${GROUPADD}" ]; then
_PKG_CREATE_USERGROUP=NO
fi
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
|