usr/src/cmd/foomatic-ppd/install-sfw
author Jon Tibble <meths@btinternet.com>
Mon, 04 May 2015 14:04:39 +0100
branchoi_151a
changeset 254 9c2a4ac793f0
parent 0 b34509ac961f
child 78 f18fd066fbf3
permissions -rw-r--r--
Bash patch catchup including shellshock

#!/bin/sh -e
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
#ident	"@(#)install-sfw	1.8	08/08/29 SMI"

PKGVERS=foomatic-filters-ppds-20080818
PREFIX=${ROOT}/usr/sfw
LPPREFIX=${ROOT}/usr/share
LPPPD=${LPPREFIX}/ppd
FOOM=SUNWfoomatic
LPPPDFOOM=${LPPPD}/${FOOM}
HPIJ=SUNWhpijs
LPPPDHPIJ=${LPPPD}/${HPIJ}
GIMP=SUNWgimp
LPPPDGIMP=${LPPPD}/${GIMP}
CACHEDIR=${ROOT}/usr/lib/lp/caches
DONOTINSTALL=${SRC}/cmd/foomatic-ppd/nolicense
PPDCACHE=SUNWfoomatic.cache

. ${SRC}/tools/install.subr


cd ${PKGVERS}

# The foomatic rip and gswrapper filters are not delivered by this package as
# that is done by the foomatic-filter (SFWffltr) package
#

# The *.ppd.gz files will be installed directly into the 
# directory /usr/share/ppd, but into SUNWfoomatic subdirectory to
# separate them from other delivered ppds

# Make the directories here instead of cluttering up Targetdirs and then
# install the lpsched foomatic ppd files

for i in ${LPPPD} ${LPPPDFOOM} ${LPPPDHPIJ} ${LPPPDGIMP}
do
  mkdir -p ${i}
  chmod 755 ${i}
done


# for each vendor install the foomatic ppd files
#
cd share/ppd
for v in `ls`
do
  mkdir -p ${LPPPDFOOM}/${v}
  chmod 755 ${LPPPDFOOM}/${v}

  cd ${v}
  for i in `ls *.ppd`
  do
    /usr/bin/grep $i $DONOTINSTALL > /dev/null
    if [ $? = 1 ];
    then
	/usr/bin/gzip ${i} 
	_install N ${i}.gz ${LPPPDFOOM}/${v}/${i}.gz 444
	/usr/bin/gunzip ${i}.gz 
     fi
  done
  cd ..
done
cd ../../..

#
# Install ppdcache of PPD files for printmgr
#
/usr/bin/mkdir -p ${CACHEDIR}
_install N SUNWfoomatic.cache ${CACHEDIR}/${PPDCACHE} 444

exit 0