From 53f57020ae0e9adeb2d650a58b5e21806f48602b Mon Sep 17 00:00:00 2001
From: Cecil Hugh Watson <knoppmyth@gmail.com>
Date: Sun, 25 Jan 2009 18:27:23 -0800
Subject: Initial MythStream build for LinHES.

---
 abs/core-testing/mythtv/stable/mythstream/PKGBUILD | 31 +++++++++++++++++++
 .../mythtv/stable/mythstream/mythstream.install    | 36 ++++++++++++++++++++++
 2 files changed, 67 insertions(+)
 create mode 100644 abs/core-testing/mythtv/stable/mythstream/PKGBUILD
 create mode 100644 abs/core-testing/mythtv/stable/mythstream/mythstream.install

diff --git a/abs/core-testing/mythtv/stable/mythstream/PKGBUILD b/abs/core-testing/mythtv/stable/mythstream/PKGBUILD
new file mode 100644
index 0000000..e78ecee
--- /dev/null
+++ b/abs/core-testing/mythtv/stable/mythstream/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# Maintainer: Juergen Hoetzel <juergen@archlinux.org> 
+# Contributor: kleptophobiac@gmail.com
+
+pkgname=mythstream
+pkgver=0.18_1
+pkgrel=2
+pkgdesc="Unofficial MythTV plugin for Internet audio and video streams."
+arch=('i686' 'x86_64')
+url="http://home.kabelfoon.nl/~moongies/streamtuned.html"
+license=('GPL')
+depends=('mythtv' 'perl-xml-simple')
+source=("http://home.kabelfoon.nl/~moongies/sw9vc4htz2/mythstream-v0.18_1.tar.gz" "http://home.kabelfoon.nl/~moongies/sw9vc4htz2/mythstream.cpp.patch_svn20071123")
+md5sums=('')
+groups=('mythtv-extras')
+
+build() {
+   cd $startdir/src/mythstream-0.18_1
+   ln -s ../../../mythtv/src/mythtv-0.21/libs/lib* .
+   . /etc/profile.d/qt3.sh
+
+   # use QT3 qmake
+   export PATH=$QTDIR/bin:$PATH
+
+   qmake mythstream.pro
+   make qmake || return 1
+   make -j 2 || return 1
+
+   make INSTALL_ROOT=$startdir/pkg install
+}
+
diff --git a/abs/core-testing/mythtv/stable/mythstream/mythstream.install b/abs/core-testing/mythtv/stable/mythstream/mythstream.install
new file mode 100644
index 0000000..f06e0c2
--- /dev/null
+++ b/abs/core-testing/mythtv/stable/mythstream/mythstream.install
@@ -0,0 +1,36 @@
+# arg 1:  the new package version
+post_install() {
+  mv /usr/share/mythtv/is.xml /tmp
+  grep -v -e /mythmenu /tmp/is.xml > /tmp/is.xml.tmp
+  echo "<!--#MythStream-->" >> /tmp/is.xml.tmp
+  echo "   <button>" >> /tmp/is.xml.tmp
+  echo "     <type>STREAM</type>" >> /tmp/is.xml.tmp
+  echo "     <text>MythStream</text>" >> /tmp/is.xml.tmp
+  echo "     <action>PLUGIN mythstream</action>" >> /tmp/is.xml.tmp 
+  echo "   </button>" >> /tmp/is.xml.tmp
+  echo "<!--#MythStream-->" >> /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
+}
+# arg 1:  the new package version
+# arg 2:  the old package version
+post_upgrade() {
+  if [ -e /usr/share/mythtv/appletrailer.xml ]
+  then
+  	exit
+  else	
+  ln -s /home/mythtv/appletrailer.xml /usr/share/mythtv/appletrailer.xml
+  fi
+}
+
+# arg 1:  the old package version
+post_remove() {
+	rm -fr /usr/share/mythtv/appletrailer.xml
+	mv /usr/share/mythtv/is.xml /tmp/is.xml.tmp
+	sed -e '/\#MythStream/,/\#MythStream/d' < /tmp/is.xml.tmp > /usr/share/mythtv/is.xml
+}
+
+op=$1
+shift
+$op $*
-- 
cgit v0.12

