usr/src/cmd/foomatic-ppd/install-sfw
author Jon Tibble <meths@btinternet.com>
Fri, 10 Feb 2012 16:19:42 +0000
branchoi_151a
changeset 114 b6d40d0a7b17
parent 0 b34509ac961f
child 78 f18fd066fbf3
permissions -rw-r--r--
Added tag oi_151a_prestable1 for changeset b1282e88c680
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     1
#!/bin/sh -e
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     2
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     3
# CDDL HEADER START
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     4
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     5
# The contents of this file are subject to the terms of the
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     6
# Common Development and Distribution License (the "License").
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     7
# You may not use this file except in compliance with the License.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     8
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     9
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    10
# or http://www.opensolaris.org/os/licensing.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    11
# See the License for the specific language governing permissions
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    12
# and limitations under the License.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    13
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    14
# When distributing Covered Code, include this CDDL HEADER in each
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    15
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    16
# If applicable, add the following below this CDDL HEADER, with the
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    17
# fields enclosed by brackets "[]" replaced with your own identifying
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    18
# information: Portions Copyright [yyyy] [name of copyright owner]
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    19
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    20
# CDDL HEADER END
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    21
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    22
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    23
# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    24
# Use is subject to license terms.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    25
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    26
#ident	"@(#)install-sfw	1.8	08/08/29 SMI"
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    27
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    28
PKGVERS=foomatic-filters-ppds-20080818
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    29
PREFIX=${ROOT}/usr/sfw
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    30
LPPREFIX=${ROOT}/usr/share
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    31
LPPPD=${LPPREFIX}/ppd
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    32
FOOM=SUNWfoomatic
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    33
LPPPDFOOM=${LPPPD}/${FOOM}
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    34
HPIJ=SUNWhpijs
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    35
LPPPDHPIJ=${LPPPD}/${HPIJ}
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    36
GIMP=SUNWgimp
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    37
LPPPDGIMP=${LPPPD}/${GIMP}
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    38
CACHEDIR=${ROOT}/usr/lib/lp/caches
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    39
DONOTINSTALL=${SRC}/cmd/foomatic-ppd/nolicense
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    40
PPDCACHE=SUNWfoomatic.cache
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    41
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    42
. ${SRC}/tools/install.subr
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    43
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    44
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    45
cd ${PKGVERS}
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    46
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    47
# The foomatic rip and gswrapper filters are not delivered by this package as
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    48
# that is done by the foomatic-filter (SFWffltr) package
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    49
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    50
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    51
# The *.ppd.gz files will be installed directly into the 
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    52
# directory /usr/share/ppd, but into SUNWfoomatic subdirectory to
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    53
# separate them from other delivered ppds
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    54
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    55
# Make the directories here instead of cluttering up Targetdirs and then
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    56
# install the lpsched foomatic ppd files
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    57
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    58
for i in ${LPPPD} ${LPPPDFOOM} ${LPPPDHPIJ} ${LPPPDGIMP}
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    59
do
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    60
  mkdir -p ${i}
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    61
  chmod 755 ${i}
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    62
done
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    63
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    64
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    65
# for each vendor install the foomatic ppd files
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    66
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    67
cd share/ppd
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    68
for v in `ls`
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    69
do
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    70
  mkdir -p ${LPPPDFOOM}/${v}
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    71
  chmod 755 ${LPPPDFOOM}/${v}
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    72
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    73
  cd ${v}
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    74
  for i in `ls *.ppd`
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    75
  do
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    76
    /usr/bin/grep $i $DONOTINSTALL > /dev/null
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    77
    if [ $? = 1 ];
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    78
    then
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    79
	/usr/bin/gzip ${i} 
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    80
	_install N ${i}.gz ${LPPPDFOOM}/${v}/${i}.gz 444
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    81
	/usr/bin/gunzip ${i}.gz 
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    82
     fi
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    83
  done
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    84
  cd ..
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    85
done
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    86
cd ../../..
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    87
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    88
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    89
# Install ppdcache of PPD files for printmgr
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    90
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    91
/usr/bin/mkdir -p ${CACHEDIR}
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    92
_install N SUNWfoomatic.cache ${CACHEDIR}/${PPDCACHE} 444
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    93
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    94
exit 0