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