Old 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 # Copyright 2008 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.1.3
 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 exit 0