Old install-sfw
1 #
2 # CDDL HEADER START
3 #
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
7 #
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
12 #
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 #
19 # CDDL HEADER END
20 #
21 #
22
23
24 #!/bin/sh
25 #
26 # Copyright 2007 Sun Microsystems, Inc. All rights reserved.
27 # Use is subject to license terms.
28 #
29 #ident "@(#)install-sfw 1.7 05/11/07 SMI"
30
31 VERS=tclx8.3.5
32 PREFIX=${ROOT}/opt/sfw
33 BINDIR=${PREFIX}/bin
34 LIBDIR=${PREFIX}/lib
35 TCLXDIR=${PREFIX}/lib/tclX8.3
36 TCLXHDIR=${PREFIX}/lib/tclX8.3/help
37 TCLXHTCLDIR=${PREFIX}/lib/tclX8.3/help/tcl
38 TKXDIR=${PREFIX}/lib/tkX8.3
39 TKXHDIR=${PREFIX}/lib/tkX8.3/help
40 TKXHTKDIR=${PREFIX}/lib/tkX8.3/help/tk
41 INCDIR=${PREFIX}/include
42 MANNDIR=${PREFIX}/man/mann
43 MAN3DIR=${PREFIX}/man/man3
44
45 cd ${VERS}/unix
46
47 /usr/sfw/bin/gmake INSTALL_ROOT=${ROOT} INSTALL="/usr/ucb/install -c" install
48
49 #
50 # Set ownership and permissions for all directories (just in case).
51 #
52 for i in ${TCLXDIR} ${TCLXHDIR} ${TCLXHTCLDIR} \
53 ${TKXDIR} ${TKXHDIR} ${TKXHTKDIR}
54 do
55 chmod 0755 ${i}
56 done
57
58 for i in ${MANNDIR} ${MAN3DIR}
59 do
60 chmod 0755 ${i}
61 done
62
63 for i in intro strings events variables control status time \
64 files lists intl processes math sockets libraries \
65 debug signals filescan keyedlists tclshell
66 do
67 chmod 0755 ${TCLXHTCLDIR}/${i}
68 done
69
70 for i in control images widgets
71 do
72 chmod 0755 ${TKXHTKDIR}/${i}
73 done
74
75 #
76 # Set ownership and permissions for all files (just in case).
77 #
78
79 for i in tcl wishx tclhelp
80 do
81 chmod 0755 ${BINDIR}/${i}
82 done
83
84 for i in pkgIndex.tcl tclx.tcl tcl.tlib tcl.tndx \
85 buildidx.tcl autoload.tcl tclXAppInit.c
86 do
87 chmod 0444 ${TCLXDIR}/${i}
88 done
89
90 for i in syntax tclsh keyedlists
91 do
92 chmod 0444 ${TCLXHTCLDIR}/intro/${i}
93 done
94
95 for i in append binary format regexp regsub scan string subst \
96 ccollate cconcat cequal cindex clength crange csubstr \
97 ctoken ctype replicate translit
98 do
99 chmod 0444 ${TCLXHTCLDIR}/strings/${i}
100 done
101
102 for i in after background-error fileevent update vwait mainloop
103 do
104 chmod 0444 ${TCLXHTCLDIR}/events/${i}
105 done
106
107 for i in array global namespace set trace unset upvar \
108 stdvars variable for_array_keys
109 do
110 chmod 0444 ${TCLXHTCLDIR}/variables/${i}
111 done
112
113 for i in break case catch continue dde error eval exit for foreach \
114 if interp proc rename return safe source switch uplevel while \
115 commandloop loop try_eval tclx_errorHandler
116 do
117 chmod 0444 ${TCLXHTCLDIR}/control/${i}
118 done
119
120 for i in cd history info pwd dirs infox popd pushd showproc id umask
121 do
122 chmod 0444 ${TCLXHTCLDIR}/status/${i}
123 done
124
125 for i in clock time alarm sleep times
126 do
127 chmod 0444 ${TCLXHTCLDIR}/time/${i}
128 done
129
130 for i in close eof fblocked fconfigure fcopy file filename \
131 flush gets glob open puts read registry resource seek \
132 tell echo for_recursive_glob recursive_glob chroot \
133 link readdir sync bsearch chmod chown chgrp dup fcntl \
134 flock for_file funlock fstat ftruncate lgets pipe \
135 read_file select write_file
136 do
137 chmod 0444 ${TCLXHTCLDIR}/files/${i}
138 done
139
140 for i in concat join lappend lindex linsert list llength \
141 lrange lreplace lsearch lsort split intersect intersect3 \
142 lassign lcontain lempty lmatch lrmdups lvarcat lvarpop \
143 lvarpush union
144 do
145 chmod 0444 ${TCLXHTCLDIR}/lists/${i}
146 done
147
148 for i in encoding msgcat catopen catgets catclose
149 do
150 chmod 0444 ${TCLXHTCLDIR}/intl/${i}
151 done
152
153 for i in exec pid execl fork kill nice system wait
154 do
155 chmod 0444 ${TCLXHTCLDIR}/processes/${i}
156 done
157
158 for i in expr incr fmathcmds max min random
159 do
160 chmod 0444 ${TCLXHTCLDIR}/math/${i}
161 done
162
163 for i in http socket host_info
164 do
165 chmod 0444 ${TCLXHTCLDIR}/sockets/${i}
166 done
167
168 for i in library load package pkgMkIndex unknown packagelib \
169 auto_commands buildpackageindex convert_lib loadlibindex \
170 auto_packages auto_load_file searchpath
171 do
172 chmod 0444 ${TCLXHTCLDIR}/libraries/${i}
173 done
174
175 for i in cmdtrace edprocs profile profrep saveprocs
176 do
177 chmod 0444 ${TCLXHTCLDIR}/debug/${i}
178 done
179
180 for i in signal
181 do
182 chmod 0444 ${TCLXHTCLDIR}/signals/${i}
183 done
184
185 for i in scancontext scanfile scanmatch
186 do
187 chmod 0444 ${TCLXHTCLDIR}/filescan/${i}
188 done
189
190 for i in keyldel keylget keylkeys keylset
191 do
192 chmod 0444 ${TCLXHTCLDIR}/keyedlists/${i}
193 done
194
195 for i in intro variables
196 do
197 chmod 0444 ${TCLXHTCLDIR}/tclshell/${i}
198 done
199
200 for i in TclX.brf help
201 do
202 chmod 0444 ${TCLXHDIR}/${i}
203 done
204
205 for i in pkgIndex.tcl tkx.tcl tkXAppInit.c
206 do
207 chmod 0444 ${TKXDIR}/${i}
208 done
209
210 for i in Tk.brf
211 do
212 chmod 0444 ${TKXHDIR}/${i}
213 done
214
215 for i in bell bind bindtags clipboard destroy event focus \
216 tk_focusNext font grab grid loadTk lower option pack \
217 pack-old tk_setPalette tk_bisque place raise selection \
218 send tk tkerror tkvars tkwait winfo wm
219 do
220 chmod 0444 ${TKXHTKDIR}/control/${i}
221 done
222
223 for i in bitmap image photo
224 do
225 chmod 0444 ${TKXHTKDIR}/images/${i}
226 done
227
228 for i in button canvas checkbutton tk_chooseColor tk_dialog \
229 entry frame tk_getOpenFile label listbox menu tk_menuBar \
230 menubutton message tk_messageBox tk_optionMenu options \
231 tk_popup radiobutton scale scrollbar text toplevel
232 do
233 chmod 0444 ${TKXHTKDIR}/widgets/${i}
234 done
235
236 for i in libtclx8.3.a tclxConfig.sh libtkx8.3.a tkxConfig.sh
237 do
238 chmod 0444 ${LIBDIR}/${i}
239 done
240
241
242 for i in libtclx8.3.so libtkx8.3.so
243 do
244 chmod 0755 ${LIBDIR}/${i}
245 done
246
247
248 for i in tclExtend.h
249 do
250 chmod 0444 ${INCDIR}/${i}
251 done
252
253 cd ../doc
254
255 for i in ckfree.n ckalloc.n memoryx.n Tcl_InitMemory.n Tcl_DisplayMemory.n Tcl_ValidateAllMemory.n
256
257 do
258
259 rm -rf ${MANNDIR}/${i}
260
261 done
262
263 for i in TkX_Main.3 TclX_Main.3 Tclx_Init.3 Tclxcmd_Init.3 Tcl_HandleFree.3 Tcl_HandleWalk.3 \
264 Tcl_HandleAlloc.3 Tcl_HandleXlate.3 Tcl_HandleTblInit.3 Tcl_HandleTblRelease.3 Tcl_HandleTblUseCount.3 \
265 TclX_KeyedListGet.3 TclX_KeyedListSet.3 TclX_NewKeyedListObj.3 TclX_KeyedListDelete.3 TclX_KeyedListGetKeys.3
266
267 do
268
269 rm -rf ${MAN3DIR}/${i}
270
271 done
272
273 cp -r Memory.n ${MANNDIR}/ckfree.n
274 cp -r Memory.n ${MANNDIR}/ckalloc.n
275 cp -r Memory.n ${MANNDIR}/memoryx.n
276 cp -r Memory.n ${MANNDIR}/Tcl_InitMemory.n
277 cp -r Memory.n ${MANNDIR}/Tcl_DisplayMemory.n
278 cp -r Memory.n ${MANNDIR}/Tcl_ValidateAllMemory.n
279
280 cp -r TclXInit.3 ${MAN3DIR}/TkX_Main.3
281 cp -r TclXInit.3 ${MAN3DIR}/TclX_Main.3
282 cp -r TclXInit.3 ${MAN3DIR}/Tclx_Init.3
283 cp -r TclXInit.3 ${MAN3DIR}/Tclxcmd_Init.3
284
285 cp -r Handles.3 ${MAN3DIR}/Tcl_HandleFree.3
286 cp -r Handles.3 ${MAN3DIR}/Tcl_HandleWalk.3
287 cp -r Handles.3 ${MAN3DIR}/Tcl_HandleAlloc.3
288 cp -r Handles.3 ${MAN3DIR}/Tcl_HandleXlate.3
289 cp -r Handles.3 ${MAN3DIR}/Tcl_HandleTblInit.3
290 cp -r Handles.3 ${MAN3DIR}/Tcl_HandleTblRelease.3
291 cp -r Handles.3 ${MAN3DIR}/Tcl_HandleTblUseCount.3
292
293 cp -r Keylist.3 ${MAN3DIR}/TclX_KeyedListGet.3
294 cp -r Keylist.3 ${MAN3DIR}/TclX_KeyedListSet.3
295 cp -r Keylist.3 ${MAN3DIR}/TclX_NewKeyedListObj.3
296 cp -r Keylist.3 ${MAN3DIR}/TclX_KeyedListDelete.3
297 cp -r Keylist.3 ${MAN3DIR}/TclX_KeyedListGetKeys.3
298
299 cd ${MANNDIR}
300
301 for i in ckalloc.n ckfree.n memoryx.n Tcl_DisplayMemory.n \
302 Tcl_InitMemory.n Tcl_ValidateAllMemory.n TclX.n
303 do
304 chmod 0444 ${i}
305 done
306
307 cd ${MAN3DIR}
308
309 for i in Tcl_HandleAlloc.3 Tcl_HandleFree.3 Tcl_HandleTblInit.3 \
310 Tcl_HandleTblRelease.3 Tcl_HandleTblUseCount.3 Tcl_HandleWalk.3 \
311 Tcl_HandleXlate.3 TclX_NewKeyedListObj.3 TclX_KeyedListGet.3 \
312 TclX_KeyedListSet.3 TclX_KeyedListDelete.3 TclX_KeyedListGetKeys.3 \
313 TclCommandWriting.3 Tclx_Init.3 Tclxcmd_Init.3 TclX_Main.3 \
314 Tkx_Init.3 TkX_Main.3
315 do
316 chmod 0444 ${i}
317 done
318
319 exit 0