xref: /aoo42x/main/sysui/desktop/solaris/mailcap (revision b31e36b3)
1*b31e36b3SAndrew Rist# *************************************************************
2*b31e36b3SAndrew Rist#
3*b31e36b3SAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
4*b31e36b3SAndrew Rist#  or more contributor license agreements.  See the NOTICE file
5*b31e36b3SAndrew Rist#  distributed with this work for additional information
6*b31e36b3SAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
7*b31e36b3SAndrew Rist#  to you under the Apache License, Version 2.0 (the
8*b31e36b3SAndrew Rist#  "License"); you may not use this file except in compliance
9*b31e36b3SAndrew Rist#  with the License.  You may obtain a copy of the License at
10*b31e36b3SAndrew Rist#
11*b31e36b3SAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
12*b31e36b3SAndrew Rist#
13*b31e36b3SAndrew Rist#  Unless required by applicable law or agreed to in writing,
14*b31e36b3SAndrew Rist#  software distributed under the License is distributed on an
15*b31e36b3SAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b31e36b3SAndrew Rist#  KIND, either express or implied.  See the License for the
17*b31e36b3SAndrew Rist#  specific language governing permissions and limitations
18*b31e36b3SAndrew Rist#  under the License.
19*b31e36b3SAndrew Rist#
20*b31e36b3SAndrew Rist# *************************************************************
21cdf0e10cSrcweirif [ "$1" = install ]
22cdf0e10cSrcweirthen
23cdf0e10cSrcweir# backing out existing entries to avoid duplicates
24cdf0e10cSrcweirsed '
25cdf0e10cSrcweir/^# OpenOffice.org/d
26cdf0e10cSrcweir/^application\/vnd\.oasis\.opendocument/d
27cdf0e10cSrcweir/^application\/vnd\.openofficeorg/d
28cdf0e10cSrcweir/^application\/vnd\.sun/d
29cdf0e10cSrcweir/^application\/vnd\.stardivision/d
30cdf0e10cSrcweir/^application\/vnd\.ms-word/d
31cdf0e10cSrcweir/^application\/vnd\.ms-excel/d
32cdf0e10cSrcweir/^application\/vnd\.ms-powerpoint/d
33cdf0e10cSrcweir/^application\/x-star/d
34cdf0e10cSrcweir/excel/d
35cdf0e10cSrcweir/ms[-]*word/d
36cdf0e10cSrcweir/powerpoint/d
37cdf0e10cSrcweir' ${PKG_INSTALL_ROOT}/etc/mailcap 2>/dev/null
38cdf0e10cSrcweir
39cdf0e10cSrcweir# now append our stuff to the temporary file
40cdf0e10cSrcweircat << END
41cdf0e10cSrcweir# OpenOffice.org
42cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text; %PREFIX -view %s
43cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text-template; %PREFIX -view %s
44cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text-web; %PREFIX -view %s
45cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text-master; %PREFIX -view %s
46cdf0e10cSrcweirapplication/vnd.sun.xml.writer; %PREFIX -view %s
47cdf0e10cSrcweirapplication/vnd.sun.xml.writer.template; %PREFIX -view %s
48cdf0e10cSrcweirapplication/vnd.sun.xml.writer.global; %PREFIX -view %s
49cdf0e10cSrcweirapplication/vnd.stardivision.writer; %PREFIX -view %s
50cdf0e10cSrcweirapplication/vnd.stardivision.writer-global; %PREFIX -view %s
51cdf0e10cSrcweirapplication/x-starwriter; %PREFIX -view %s
52cdf0e10cSrcweirapplication/vnd.oasis.opendocument.formula; %PREFIX -view %s
53cdf0e10cSrcweirapplication/vnd.sun.xml.math; %PREFIX -view %s
54cdf0e10cSrcweirapplication/vnd.stardivision.math; %PREFIX -view %s
55cdf0e10cSrcweirapplication/x-starmath; %PREFIX -view %s
56cdf0e10cSrcweirapplication/msword; %PREFIX -view %s
57cdf0e10cSrcweirapplication/vnd.oasis.opendocument.spreadsheet; %PREFIX -view %s
58cdf0e10cSrcweirapplication/vnd.oasis.opendocument.spreadsheet-template; %PREFIX -view %s
59cdf0e10cSrcweirapplication/vnd.sun.xml.calc; %PREFIX -view %s
60cdf0e10cSrcweirapplication/vnd.sun.xml.calc.template; %PREFIX -view %s
61cdf0e10cSrcweirapplication/vnd.stardivision.calc; %PREFIX -view %s
62cdf0e10cSrcweirapplication/x-starcalc; %PREFIX -view %s
63cdf0e10cSrcweirapplication/vnd.stardivision.chart; %PREFIX -view %s
64cdf0e10cSrcweirapplication/x-starchart; %PREFIX -view %s
65cdf0e10cSrcweirapplication/excel; %PREFIX -view %s
66cdf0e10cSrcweirapplication/msexcel; %PREFIX -view %s
67cdf0e10cSrcweirapplication/vnd.ms-excel; %PREFIX -view %s
68cdf0e10cSrcweirapplication/x-msexcel; %PREFIX -view %s
69cdf0e10cSrcweirapplication/vnd.oasis.opendocument.presentation; %PREFIX -view %s
70cdf0e10cSrcweirapplication/vnd.oasis.opendocument.presentation-template; %PREFIX -view %s
71cdf0e10cSrcweirapplication/vnd.sun.xml.impress; %PREFIX -view %s
72cdf0e10cSrcweirapplication/vnd.sun.xml.impress.template; %PREFIX -view %s
73cdf0e10cSrcweirapplication/vnd.stardivision.impress; %PREFIX -view %s
74cdf0e10cSrcweirapplication/x-starimpress; %PREFIX -view %s
75cdf0e10cSrcweirapplication/powerpoint; %PREFIX -view %s
76cdf0e10cSrcweirapplication/mspowerpoint; %PREFIX -view %s
77cdf0e10cSrcweirapplication/vnd.ms-powerpoint; %PREFIX -view %s
78cdf0e10cSrcweirapplication/x-mspowerpoint; %PREFIX -view %s
79cdf0e10cSrcweirapplication/vnd.oasis.opendocument.graphics; %PREFIX -view %s
80cdf0e10cSrcweirapplication/vnd.oasis.opendocument.graphics-template; %PREFIX -view %s
81cdf0e10cSrcweirapplication/vnd.sun.xml.draw; %PREFIX -view %s
82cdf0e10cSrcweirapplication/vnd.sun.xml.draw.template; %PREFIX -view %s
83cdf0e10cSrcweirapplication/vnd.stardivision.draw; %PREFIX -view %s
84cdf0e10cSrcweirapplication/x-stardraw; %PREFIX -view %s
85cdf0e10cSrcweirapplication/vnd.sun.xml.base; %PREFIX -view %s
86cdf0e10cSrcweirapplication/vnd.oasis.opendocument.database; %PREFIX -view %s
87cdf0e10cSrcweirapplication/vnd.writerperfect; %PREFIX -view %s
88cdf0e10cSrcweirapplication/wordperfect5.1; %PREFIX -view %s
89cdf0e10cSrcweirapplication/x-wordperfect; %PREFIX -view %s
90cdf0e10cSrcweirapplication/wordperfect; %PREFIX -view %s
91cdf0e10cSrcweirapplication/wpwin; %PREFIX -view %s
92cdf0e10cSrcweirapplication/vnd.openofficeorg.extension; %PREFIX %s
93cdf0e10cSrcweirEND
94cdf0e10cSrcweirelse
95cdf0e10cSrcweir# backing all entries pointing to our binary
96cdf0e10cSrcweirsed '/%PREFIX/d' ${PKG_INSTALL_ROOT}/etc/mailcap 2>/dev/null
97cdf0e10cSrcweirfi
98cdf0e10cSrcweir
99