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 #!/bin/sh
24 #
25 # Copyright 2007 Sun Microsystems, Inc. All Rights Reserved.
26 # Use is subject to license terms.
27 #
28 # install slang's objects in the proto area, since it would really
29 # like to install locally, but that doesn't scale.
30 #
31
32 MAJVERS=2
33 VERS=2.0.7
34 SLANGVERS=slang-${VERS}
35 PREFIX=${ROOT}/opt/sfw
36 LIBDIR=${PREFIX}/lib
37 INCDIR=${PREFIX}/include
38
39 cd ${SLANGVERS}
40
41 cd src
42 for i in slang.h slcurses.h
43 do
44 rm -f ${INCDIR}/${i}
45 cp ${i} ${INCDIR}/${i}
46 chmod 444 ${INCDIR}/${i}
47 done
48 cd ..
49
50 cd src/elfobjs
51
52 for i in slang
53 do
54 libso=lib${i}.so # slang.so
55 libso_majver=lib${i}.so.${MAJVERS} # slang.so.X
56 libsover=${libso}.${VERS} # slang.so.X.Y.Z
57
58 rm -f ${LIBDIR}/${libsover}
59 cp ${libsover} ${LIBDIR}/${libsover}
60 strip ${LIBDIR}/${libsover}
61 chmod 755 ${LIBDIR}/${libsover}
62 rm -f ${LIBDIR}/${libso}
63 rm -f ${LIBDIR}/${libso_majver}
64 ln -s ${libsover} ${LIBDIR}/${libso}
65 ln -s ${libsover} ${LIBDIR}/${libso_majver}
66 done
67
68 cd ../..
69
70 cd src/objs
71
72 for i in slang
73 do
74 liba=lib${i}.a
75 rm -f ${LIBDIR}/${liba}
76 cp ${liba} ${LIBDIR}/${liba}
77 chmod 444 ${LIBDIR}/${liba}
78 done
79
80 cd ../..
81
82 exit 0