Home | History | Annotate | Download | only in foomatic-ppd
      1 #!/bin/sh -e
      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 2008 Sun Microsystems, Inc.  All rights reserved.
     24 # Use is subject to license terms.
     25 #
     26 #ident	"@(#)install-sfw	1.8	08/08/29 SMI"
     27 
     28 PKGVERS=foomatic-filters-ppds-20080818
     29 PREFIX=${ROOT}/usr/sfw
     30 LPPREFIX=${ROOT}/usr/share
     31 LPPPD=${LPPREFIX}/ppd
     32 FOOM=SUNWfoomatic
     33 LPPPDFOOM=${LPPPD}/${FOOM}
     34 HPIJ=SUNWhpijs
     35 LPPPDHPIJ=${LPPPD}/${HPIJ}
     36 GIMP=SUNWgimp
     37 LPPPDGIMP=${LPPPD}/${GIMP}
     38 CACHEDIR=${ROOT}/usr/lib/lp/caches
     39 DONOTINSTALL=${SRC}/cmd/foomatic-ppd/nolicense
     40 PPDCACHE=SUNWfoomatic.cache
     41 
     42 . ${SRC}/tools/install.subr
     43 
     44 
     45 cd ${PKGVERS}
     46 
     47 # The foomatic rip and gswrapper filters are not delivered by this package as
     48 # that is done by the foomatic-filter (SFWffltr) package
     49 #
     50 
     51 # The *.ppd.gz files will be installed directly into the 
     52 # directory /usr/share/ppd, but into SUNWfoomatic subdirectory to
     53 # separate them from other delivered ppds
     54 
     55 # Make the directories here instead of cluttering up Targetdirs and then
     56 # install the lpsched foomatic ppd files
     57 
     58 for i in ${LPPPD} ${LPPPDFOOM} ${LPPPDHPIJ} ${LPPPDGIMP}
     59 do
     60   mkdir -p ${i}
     61   chmod 755 ${i}
     62 done
     63 
     64 
     65 # for each vendor install the foomatic ppd files
     66 #
     67 cd share/ppd
     68 for v in `ls`
     69 do
     70   mkdir -p ${LPPPDFOOM}/${v}
     71   chmod 755 ${LPPPDFOOM}/${v}
     72 
     73   cd ${v}
     74   for i in `ls *.ppd`
     75   do
     76     /usr/bin/grep $i $DONOTINSTALL > /dev/null
     77     if [ $? = 1 ];
     78     then
     79 	/usr/bin/gzip ${i} 
     80 	_install N ${i}.gz ${LPPPDFOOM}/${v}/${i}.gz 444
     81 	/usr/bin/gunzip ${i}.gz 
     82      fi
     83   done
     84   cd ..
     85 done
     86 cd ../../..
     87 
     88 #
     89 # Install ppdcache of PPD files for printmgr
     90 #
     91 /usr/bin/mkdir -p ${CACHEDIR}
     92 _install N SUNWfoomatic.cache ${CACHEDIR}/${PPDCACHE} 444
     93 
     94 exit 0
     95