New install-sfw
1 #!/bin/sh
2 #
3 # CDDL HEADER START
4 #
5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
8 #
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
13 #
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
19 #
20 # CDDL HEADER END
21 #
22 #
23
24
25 #
26 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
27 # Use is subject to license terms.
28 #
29
30 VERS=AfterStep-1.8.11
31 PREFIX=${ROOT}/opt/sfw
32 BINDIR=${PREFIX}/bin
33 SBINDIR=${PREFIX}/sbin
34 ETCDIR=${PREFIX}/etc
35 LIBDIR=${PREFIX}/lib
36 INCDIR=${PREFIX}/include
37 INFODIR=${PREFIX}/info
38 MAN1DIR=${PREFIX}/man/man1
39 MAN4DIR=${PREFIX}/man/man4
40 SHAREDIR=${PREFIX}/share
41 AFTERSTEPDIR=${SHAREDIR}/afterstep
42
43 # Include for _fixup_perl
44 . ${SRC}/tools/install.subr
45
46 cd ${VERS}
47
48 for i in ${AFTERSTEPDIR} ${AFTERSTEPDIR}/doc
49 do
50 rm -rf ${i}
51 mkdir -p ${i}
52 chmod 755 ${i}
53 done
54
55 cp -r afterstep/* afterstep/.workspace_state ${AFTERSTEPDIR}
56 rm -f ${AFTERSTEPDIR}/*.in
57 rm -f ${AFTERSTEPDIR}/non-configurable/*.in
58 rm -f ${AFTERSTEPDIR}/start/.include.in
59 rm -f ${AFTERSTEPDIR}/start/Desktop/Feel/.include.in
60 rm -f ${AFTERSTEPDIR}/start/Desktop/Look/.include.in
61 rm -f ${AFTERSTEPDIR}/start/Desktop/Theme/.include.in
62 rm -f ${AFTERSTEPDIR}/start/Desktop/Pictures/.include.in
63 rm -f ${AFTERSTEPDIR}/*.orig
64 rm -f ${AFTERSTEPDIR}/*/*.orig
65 rm -f ${AFTERSTEPDIR}/*/*/*.orig
66 rm -f ${AFTERSTEPDIR}/*/*/*/*.orig
67 find ${AFTERSTEPDIR} -type d -exec chmod 755 {} \;
68 find ${AFTERSTEPDIR} -type f -exec chmod 644 {} \;
69
70 cd doc
71
72 rm -f ${BINDIR}/afterstepdoc
73 cp afterstepdoc ${BINDIR}/afterstepdoc
74 chmod 555 ${BINDIR}/afterstepdoc
75
76 for i in *.html
77 do
78 rm -f ${AFTERSTEPDIR}/doc/${i}
79 cp ${i} ${AFTERSTEPDIR}/doc/${i}
80 chmod 644 ${AFTERSTEPDIR}/doc/${i}
81 done
82
83 cd ..
84
85 cd tools
86
87 _fixup_perl ascommand.pl
88
89 for i in ascommand.pl importasmenu makeastheme.pl installastheme.pl
90 do
91 rm -f ${BINDIR}/${i}
92 cp ${i} ${BINDIR}/${i}
93 chmod 555 ${BINDIR}/${i}
94 done
95
96 cd ..
97
98 cd src
99
100 for dir in *
101 do
102 if [ -d ${dir} -a -x ${dir}/${dir} ]; then
103 rm -f ${BINDIR}/${dir}
104 cp ${dir}/${dir} ${BINDIR}/${dir}
105 strip ${BINDIR}/${dir}
106 chmod 555 ${BINDIR}/${dir}
107
108 rm -f ${MAN1DIR}/${dir}.1
109 cp ${dir}/${dir}.man ${MAN1DIR}/${dir}.1
110 chmod 444 ${MAN1DIR}/${dir}.1
111 fi
112 done
113
114 cd Sound
115
116 rm -f ${BINDIR}/ASSound
117 cp ASSound ${BINDIR}/ASSound
118 strip ${BINDIR}/ASSound
119 chmod 555 ${BINDIR}/ASSound
120
121 cd ..
122