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# ************************************************************* 21 cdf0e10cSrcweirif [ "$1" = install ] 22 cdf0e10cSrcweirthen 23 cdf0e10cSrcweir# backing out existing entries to avoid duplicates 24 cdf0e10cSrcweirsed ' 25 cdf0e10cSrcweir/^# OpenOffice.org/d 26 cdf0e10cSrcweir/^application\/vnd\.oasis\.opendocument/d 27 cdf0e10cSrcweir/^application\/vnd\.openofficeorg/d 28 cdf0e10cSrcweir/^application\/vnd\.sun/d 29 cdf0e10cSrcweir/^application\/vnd\.stardivision/d 30 cdf0e10cSrcweir/^application\/vnd\.ms-word/d 31 cdf0e10cSrcweir/^application\/vnd\.ms-excel/d 32 cdf0e10cSrcweir/^application\/vnd\.ms-powerpoint/d 33 cdf0e10cSrcweir/^application\/x-star/d 34 cdf0e10cSrcweir/excel/d 35 cdf0e10cSrcweir/ms[-]*word/d 36 cdf0e10cSrcweir/powerpoint/d 37 cdf0e10cSrcweir' ${PKG_INSTALL_ROOT}/etc/mailcap 2>/dev/null 38 cdf0e10cSrcweir 39 cdf0e10cSrcweir# now append our stuff to the temporary file 40 cdf0e10cSrcweircat << END 41 *bda541ebSArmin Le Grand# Apache OpenOffice 42 cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text; %PREFIX -view %s 43 cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text-template; %PREFIX -view %s 44 cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text-web; %PREFIX -view %s 45 cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text-master; %PREFIX -view %s 46 cdf0e10cSrcweirapplication/vnd.sun.xml.writer; %PREFIX -view %s 47 cdf0e10cSrcweirapplication/vnd.sun.xml.writer.template; %PREFIX -view %s 48 cdf0e10cSrcweirapplication/vnd.sun.xml.writer.global; %PREFIX -view %s 49 cdf0e10cSrcweirapplication/vnd.stardivision.writer; %PREFIX -view %s 50 cdf0e10cSrcweirapplication/vnd.stardivision.writer-global; %PREFIX -view %s 51 cdf0e10cSrcweirapplication/x-starwriter; %PREFIX -view %s 52 cdf0e10cSrcweirapplication/vnd.oasis.opendocument.formula; %PREFIX -view %s 53 cdf0e10cSrcweirapplication/vnd.sun.xml.math; %PREFIX -view %s 54 cdf0e10cSrcweirapplication/vnd.stardivision.math; %PREFIX -view %s 55 cdf0e10cSrcweirapplication/x-starmath; %PREFIX -view %s 56 cdf0e10cSrcweirapplication/msword; %PREFIX -view %s 57 cdf0e10cSrcweirapplication/vnd.oasis.opendocument.spreadsheet; %PREFIX -view %s 58 cdf0e10cSrcweirapplication/vnd.oasis.opendocument.spreadsheet-template; %PREFIX -view %s 59 cdf0e10cSrcweirapplication/vnd.sun.xml.calc; %PREFIX -view %s 60 cdf0e10cSrcweirapplication/vnd.sun.xml.calc.template; %PREFIX -view %s 61 cdf0e10cSrcweirapplication/vnd.stardivision.calc; %PREFIX -view %s 62 cdf0e10cSrcweirapplication/x-starcalc; %PREFIX -view %s 63 cdf0e10cSrcweirapplication/vnd.stardivision.chart; %PREFIX -view %s 64 cdf0e10cSrcweirapplication/x-starchart; %PREFIX -view %s 65 cdf0e10cSrcweirapplication/excel; %PREFIX -view %s 66 cdf0e10cSrcweirapplication/msexcel; %PREFIX -view %s 67 cdf0e10cSrcweirapplication/vnd.ms-excel; %PREFIX -view %s 68 cdf0e10cSrcweirapplication/x-msexcel; %PREFIX -view %s 69 cdf0e10cSrcweirapplication/vnd.oasis.opendocument.presentation; %PREFIX -view %s 70 cdf0e10cSrcweirapplication/vnd.oasis.opendocument.presentation-template; %PREFIX -view %s 71 cdf0e10cSrcweirapplication/vnd.sun.xml.impress; %PREFIX -view %s 72 cdf0e10cSrcweirapplication/vnd.sun.xml.impress.template; %PREFIX -view %s 73 cdf0e10cSrcweirapplication/vnd.stardivision.impress; %PREFIX -view %s 74 cdf0e10cSrcweirapplication/x-starimpress; %PREFIX -view %s 75 cdf0e10cSrcweirapplication/powerpoint; %PREFIX -view %s 76 cdf0e10cSrcweirapplication/mspowerpoint; %PREFIX -view %s 77 cdf0e10cSrcweirapplication/vnd.ms-powerpoint; %PREFIX -view %s 78 cdf0e10cSrcweirapplication/x-mspowerpoint; %PREFIX -view %s 79 cdf0e10cSrcweirapplication/vnd.oasis.opendocument.graphics; %PREFIX -view %s 80 cdf0e10cSrcweirapplication/vnd.oasis.opendocument.graphics-template; %PREFIX -view %s 81 cdf0e10cSrcweirapplication/vnd.sun.xml.draw; %PREFIX -view %s 82 cdf0e10cSrcweirapplication/vnd.sun.xml.draw.template; %PREFIX -view %s 83 cdf0e10cSrcweirapplication/vnd.stardivision.draw; %PREFIX -view %s 84 cdf0e10cSrcweirapplication/x-stardraw; %PREFIX -view %s 85 cdf0e10cSrcweirapplication/vnd.sun.xml.base; %PREFIX -view %s 86 cdf0e10cSrcweirapplication/vnd.oasis.opendocument.database; %PREFIX -view %s 87 cdf0e10cSrcweirapplication/vnd.writerperfect; %PREFIX -view %s 88 cdf0e10cSrcweirapplication/wordperfect5.1; %PREFIX -view %s 89 cdf0e10cSrcweirapplication/x-wordperfect; %PREFIX -view %s 90 cdf0e10cSrcweirapplication/wordperfect; %PREFIX -view %s 91 cdf0e10cSrcweirapplication/wpwin; %PREFIX -view %s 92 cdf0e10cSrcweirapplication/vnd.openofficeorg.extension; %PREFIX %s 93 cdf0e10cSrcweirEND 94 cdf0e10cSrcweirelse 95 cdf0e10cSrcweir# backing all entries pointing to our binary 96 cdf0e10cSrcweirsed '/%PREFIX/d' ${PKG_INSTALL_ROOT}/etc/mailcap 2>/dev/null 97 cdf0e10cSrcweirfi 98 cdf0e10cSrcweir 99