Home | History | Annotate | Download | only in libusb
      1 #!/bin/sh -x
      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 # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
     24 # Use is subject to license terms.
     25 #
     26 # ident	"@(#)install-libusb	1.7	07/04/02 SMI"
     27 #
     28 #
     29 # install libusb's objects in the proto area
     30 # These are: manpages, libusb-config, header files, libraries
     31 #
     32 
     33 VERS=1.1
     34 PREFIX=${ROOT}/usr/sfw
     35 BINDIR=${PREFIX}/bin
     36 LIBDIR=${PREFIX}/lib
     37 INCDIR=${PREFIX}/include
     38 SHAREDIR=${PREFIX}/share
     39 DOCDIR=${PREFIX}/share/doc/libusb
     40 MAN1DIR=${SHAREDIR}/man/man1
     41 MAN3DIR=${SHAREDIR}/man/man3
     42 INFODIR=${SHAREDIR}/info
     43 PKGCONFIG=${LIBDIR}/pkgconfig
     44 
     45 BUILD_DIR=`pwd`
     46 #from the current dir
     47 LIBUSBMANSRC=${BUILD_DIR}/sunman
     48 HDRSRC=${BUILD_DIR}/inc
     49 BUILD_LIBDIR=${BUILD_DIR}/${MACH}
     50 
     51 LIBNAME=libusb.so.1
     52 LIBUSBCONFIG=libusb-config
     53 
     54 . ${SRC}/tools/install.subr
     55 
     56 #install man pages
     57 
     58 #install header files
     59 
     60 _install N ${HDRSRC}/usb.h ${INCDIR}/usb.h 644
     61 
     62 # libusb.so->libusb.so.1 link already created
     63 # and a copy of libusb.so.1 is also placed there
     64 # by the $(ROOTSFWLINKS) target
     65 # using the install command. This however will not
     66 # create non existant directories.
     67 
     68 
     69 #install libs
     70 _install D ${BUILD_LIBDIR}/${LIBNAME} ${LIBDIR}/${LIBNAME} 755
     71 
     72 rm -rf ${DOCDIR}
     73 mkdir -p ${DOCDIR}
     74 chmod 755 ${DOCDIR}
     75 _install N ${BUILD_DIR}/doc/libusb.txt ${DOCDIR}/libusb.txt 644
     76 
     77 
     78 #libusb-config file
     79 _install S ${BUILD_DIR}/${LIBUSBCONFIG} ${BINDIR}/${LIBUSBCONFIG} 555
     80