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 #
27 # Copyright 2007 Sun Microsystems, Inc. All rights reserved.
28 # Use is subject to license terms.
29 #
30 # install nmh's objects in the proto area, since it would really
31 # like to install locally, but that doesn't scale.
32 #
33
34 VERS=1.2
35 PREFIX=${ROOT}/opt/sfw
36 BINDIR=${PREFIX}/bin
37 LIBDIR=${PREFIX}/lib
38 NMHLIB=${LIBDIR}/nmh-lib
39 ETCDIR=${PREFIX}/etc
40 NMHETC=${ETCDIR}/nmh
41 MAN1DIR=${PREFIX}/man/man1
42 MAN5DIR=${PREFIX}/man/man5
43 MAN8DIR=${PREFIX}/man/man8
44
45 cd nmh-${VERS};
46
47 mkdir -p ${NMHLIB}
48 chmod 755 ${NMHLIB}
49
50 mkdir -p ${NMHETC}
51 chmod 755 ${NMHETC}
52
53 # binaries
54
55 cd uip;
56
57 for i in ali folder mhmail msh repl sortm anno mhn \
58 rmf viamail burst forw mhparam packf rmm whatnow \
59 comp inc mhpath pick scan whom dist mark mhshow \
60 send flist mhbuild mhstore prompter \
61 mhlist msgchk refile show
62 do
63 rm -f ${BINDIR}/${i}
64 cp ${i} ${BINDIR}/${i}
65 strip ${BINDIR}/${i}
66 chmod 555 ${BINDIR}/${i}
67 done
68
69 # hark link files
70
71 rm -f ${BINDIR}/prev
72 rm -f ${BINDIR}/next
73 rm -f ${BINDIR}/flists
74 rm -f ${BINDIR}/folders
75 ln ${BINDIR}/show ${BINDIR}/prev
76 ln ${BINDIR}/show ${BINDIR}/next
77 ln ${BINDIR}/flist ${BINDIR}/flists
78 ln ${BINDIR}/folder ${BINDIR}/folders
79
80 # library
81
82 for i in ap conflict dp fmtdump install-mh mhl mhtest \
83 post rcvdist rcvpack rcvstore rcvtty slocal spost
84 do
85 rm -f ${NMHLIB}/${i}
86 cp ${i} ${NMHLIB}/${i}
87 strip ${NMHLIB}/${i}
88 chmod 555 ${NMHLIB}/${i}
89 done
90
91 # etc files
92
93 cd ../etc;
94 for i in MailAliases components digestcomps distcomps forwcomps \
95 mhl.body mhl.digest mhl.format mhl.forward mhl.headers mhl.reply \
96 mhn.defaults mts.conf rcvdistcomps rcvdistcomps.outbox replcomps \
97 replgroupcomps scan.MMDDYY scan.YYYYMMDD scan.default scan.mailx \
98 scan.nomime scan.size scan.time scan.timely scan.unseen
99 do
100 rm -f ${NMHETC}/${i}
101 cp ${i} ${NMHETC}/${i}
102 chmod 444 ${NMHETC}/${i}
103 done
104
105 rm -f ${BINDIR}/sendfiles
106 cp sendfiles ${BINDIR}/sendfiles
107 chmod 555 ${BINDIR}/sendfiles
108
109 # man1 files
110
111 cd ../man;
112 for i in ali anno burst comp dist flist folder forw inc mark mh-chart \
113 mhbuild mhl mhlist mhmail mhn mhparam mhpath mhshow mhstore \
114 msgchk msh next nmh packf pick prev prompter rcvdist \
115 rcvpack rcvstore rcvtty refile repl rmf rmm scan \
116 send sendfiles show slocal sortm whatnow whom
117 do
118 rm -f ${MAN1DIR}/${i}.1
119 cp ${i}.1 ${MAN1DIR}/${i}.1
120 chmod 444 ${MAN1DIR}/${i}.1
121 done
122
123 # man5 files
124
125 for i in mh-alias mh-draft mh-format mh-mail mh-profile \
126 mh-sequence mh-tailor
127 do
128 rm -f ${MAN5DIR}/${i}.5
129 cp ${i}.5 ${MAN5DIR}/${i}.5
130 chmod 444 ${MAN5DIR}/${i}.5
131 done
132
133 # man8 files
134
135 for i in ap conflict dp fmtdump mh-mts post
136
137 do
138 rm -f ${MAN8DIR}/${i}.8
139 cp ${i}.8 ${MAN8DIR}/${i}.8
140 chmod 444 ${MAN8DIR}/${i}.8
141 done
142
143 exit 0