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