summaryrefslogtreecommitdiffstats
path: root/abs/extra/miro/miro.install
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
commit7b29169fff9e7c624890c5edffe85def8a293136 (patch)
tree47753889faa3a2063b66d1c7e7681e703eb1b39a /abs/extra/miro/miro.install
parentc491dea779dac29afff3578bf8245943817c2339 (diff)
downloadlinhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.zip
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.gz
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.bz2
LinHES 6.01.00
Diffstat (limited to 'abs/extra/miro/miro.install')
-rw-r--r--abs/extra/miro/miro.install54
1 files changed, 54 insertions, 0 deletions
diff --git a/abs/extra/miro/miro.install b/abs/extra/miro/miro.install
new file mode 100644
index 0000000..db52df4
--- /dev/null
+++ b/abs/extra/miro/miro.install
@@ -0,0 +1,54 @@
+# arg 1: the new package version
+post_install() {
+ update-desktop-database -q
+ mv /usr/share/mythtv/is.xml /tmp/is.xml.tmp
+ sed -e '/\#Miro/,/\#Miro/d' < /tmp/is.xml.tmp > /usr/share/mythtv/is.xml
+ mv /usr/share/mythtv/is.xml /tmp
+ grep -v -e /mythmenu /tmp/is.xml > /tmp/is.xml.tmp
+ echo "<!--#Miro-->" >> /tmp/is.xml.tmp
+ echo " <button>" >> /tmp/is.xml.tmp
+ echo " <type>STREAM</type>" >> /tmp/is.xml.tmp
+ echo " <text>Miro Player</text>" >> /tmp/is.xml.tmp
+ echo " <action>EXEC /usr/bin/miro --set xine-xvhack=false --set renderer=xine</action>" >> /tmp/is.xml.tmp
+ echo " </button>" >> /tmp/is.xml.tmp
+ echo "<!--#Miro-->" >> /tmp/is.xml.tmp
+ echo "" >> /tmp/is.xml.tmp
+ echo "</mythmenu>" >> /tmp/is.xml.tmp
+ mv /tmp/is.xml.tmp /usr/share/mythtv/is.xml
+ if [ -d /myth/democracy ]
+ then
+ ln -s /myth/democracy /home/mythtv/.miro
+ ln -s /myth/miro/Movies /myth/video/Miro
+ exit 1
+ else
+ if [ -d /myth/miro ]
+ then
+ ln -s /myth/miro /home/mythtv/.miro
+ ln -s /myth/miro/Movies /myth/video/Miro
+ exit 1
+ else
+ if [ ! -d /myth/miro -o /myth/democracy ]
+ then
+ mkdir -p /myth/miro/Movies
+ ln -s /myth/miro /home/mythtv/.miro
+ ln -s /myth/miro/Movies /home/mythtv/Movies
+ ln -s /myth/miro/Movies /myth/video/Miro
+ fi
+ fi
+ fi
+}
+
+post_update() {
+ post_install $1
+}
+
+post_remove() {
+ update-desktop-database -q
+ rm -fr /home/mythtv/.miro /myth/video/Miro /myth/miro /myth/democracy
+ mv /usr/share/mythtv/is.xml /tmp/is.xml.tmp
+ sed -e '/\#Miro/,/\#Miro/d' < /tmp/is.xml.tmp > /usr/share/mythtv/is.xml
+}
+
+op=$1
+shift
+$op $*