From 38d2158355d4ebddf3bcf10a488fdf85c4f57d90 Mon Sep 17 00:00:00 2001
From: James Meyer <james.meyer@operamail.com>
Date: Tue, 15 Jan 2013 12:02:19 -0600
Subject: mythexpress, remyth:  add error page for when the software isn't
 installed.  After install the webpage for each application will redirect the
 browser to the correct network address.

---
 abs/core/supplemental-web/PKGBUILD                 |  4 +--
 abs/core/supplemental-web/contents/header.html     |  4 +--
 abs/core/supplemental-web/lighttpd-supplement.conf |  8 ++++++
 abs/extra/mythexpress/PKGBUILD                     |  8 +++---
 abs/extra/mythexpress/mythexpress.html             | 30 ++++++++++++++++++++++
 abs/extra/remyth/PKGBUILD                          |  9 ++++---
 abs/extra/remyth/remyth.html                       | 30 ++++++++++++++++++++++
 7 files changed, 83 insertions(+), 10 deletions(-)
 create mode 100755 abs/extra/mythexpress/mythexpress.html
 create mode 100755 abs/extra/remyth/remyth.html

diff --git a/abs/core/supplemental-web/PKGBUILD b/abs/core/supplemental-web/PKGBUILD
index 257abdd..4d8d984 100644
--- a/abs/core/supplemental-web/PKGBUILD
+++ b/abs/core/supplemental-web/PKGBUILD
@@ -1,7 +1,7 @@
 pkgbase=supplemental-web
 pkgname=('supplemental-web' 'supplemental-web-slave')
 pkgver=1.0
-pkgrel=39
+pkgrel=40
 arch=('i686' 'x86_64')
 
 backup=('extra.cfg.txt')
@@ -74,7 +74,7 @@ package_supplemental-web-slave() {
 
 
 
-md5sums=('521714803b5a3df529f0fc5f853c0d55'
+md5sums=('a2497205c92ad5b3aa565574afbf7f80'
          '3d8c7b430c1319d706ca420825918d2a'
          '26598fd1dfaf5d36d7b1f9620da5543c'
          'fabf825ca07502db40d78f0aae15f90b'
diff --git a/abs/core/supplemental-web/contents/header.html b/abs/core/supplemental-web/contents/header.html
index e08cbda..f84b4c8 100644
--- a/abs/core/supplemental-web/contents/header.html
+++ b/abs/core/supplemental-web/contents/header.html
@@ -51,8 +51,8 @@ function remyth()
     <ul>
         <li><a href="mythweb/">MythWeb</a></li>
         <li><a href="mythexport/setup.cgi">MythExport</a></li>
-        <li><a   onClick=express() >MythExpress</a></li>
-        <li><a   onClick=remyth() >ReMyth</a></li>
+        <li><a href="mythexpress.html">MythExpress</a></li>
+        <li><a href="remyth.html" >ReMyth</a></li>
     </ul>
 </li>
 
diff --git a/abs/core/supplemental-web/lighttpd-supplement.conf b/abs/core/supplemental-web/lighttpd-supplement.conf
index 9d718bb..a86cfc6 100644
--- a/abs/core/supplemental-web/lighttpd-supplement.conf
+++ b/abs/core/supplemental-web/lighttpd-supplement.conf
@@ -21,6 +21,14 @@ $HTTP["url"] =~ "(call_log)" {
 server.error-handler-404   = "/error/call_log.html"
 }
 
+$HTTP["url"] =~ "(mythexpress)" {
+    server.error-handler-404   = "/error/mythexpress.html"
+}
+
+$HTTP["url"] =~ "(remyth)" {
+    server.error-handler-404   = "/error/remyth.html"
+}
+
 
 $HTTP["url"] =~ "(zm)" {
     server.error-handler-404   = "/error/zoneminder.html"
diff --git a/abs/extra/mythexpress/PKGBUILD b/abs/extra/mythexpress/PKGBUILD
index 5d8bfba..37a9dfb 100755
--- a/abs/extra/mythexpress/PKGBUILD
+++ b/abs/extra/mythexpress/PKGBUILD
@@ -1,13 +1,13 @@
 pkgname=mythexpress
 pkgver=20121210
-pkgrel=1
+pkgrel=2
 pkgdesc="MythExpress is a browser-based interface to MythTV HTTP streaming capability"
 arch=('i686' 'x86_64')
 url="https://github.com/MythTV-Clients/MythExpress"
 license=('GPL3')
 depends=('nodejs' 'avahi' )
 makedepends=('git')
-source=( )
+source=('mythexpress.html' )
 
 _gitroot="https://github.com/MythTV-Clients/MythExpress.git"
 _gitname=MythExpress
@@ -40,5 +40,7 @@ package() {
     cd "${srcdir}"
     mkdir -p $pkgdir/usr/$pkgname
     rsync -arvp --exclude .git  ${_gitname}-build/  $pkgdir/usr/${pkgname}
+    cd $startdir/src
+    install -m755 -D mythexpress.html $pkgdir/data/srv/httpd/htdocs/mythexpress.html
 }
-md5sums=()
+md5sums=('93b0d936c5c7838e1c0367f2d5286b3b')
diff --git a/abs/extra/mythexpress/mythexpress.html b/abs/extra/mythexpress/mythexpress.html
new file mode 100755
index 0000000..d9dd9a3
--- /dev/null
+++ b/abs/extra/mythexpress/mythexpress.html
@@ -0,0 +1,30 @@
+<head>
+<script type="text/javascript">
+function r()
+{
+    current_hostname=parent.location.hostname
+    top.frames["content"].location.href = ( "http://" + current_hostname + ":6544" ) ;
+
+}
+
+function express()
+{
+    current_hostname=parent.location.hostname
+    top.frames["content"].location.href = ( "http://" + current_hostname + ":6565" ) ;
+
+    }
+
+function remyth()
+{
+    current_hostname=parent.location.hostname
+    top.frames["content"].location.href = ( "http://" + current_hostname + ":8088" ) ;
+
+    }
+
+
+</script>
+</head>
+<body onload="JavaScript:express();">
+
+</body>
+</html>
\ No newline at end of file
diff --git a/abs/extra/remyth/PKGBUILD b/abs/extra/remyth/PKGBUILD
index 47d97cc..7243a12 100755
--- a/abs/extra/remyth/PKGBUILD
+++ b/abs/extra/remyth/PKGBUILD
@@ -1,13 +1,13 @@
 pkgname=remyth
 pkgver=20121210
-pkgrel=1
+pkgrel=3
 pkgdesc="This project is meant to provide a nicer remote for your MythTV Frontends. "
 arch=('i686' 'x86_64')
 url="https://github.com/SchraderMJ11/ReMyth"
 license=('GPL')
 depends=('nodejs' 'avahi' )
 makedepends=('git')
-source=(service_type.js.patch )
+source=(service_type.js.patch remyth.html)
 
 _gitroot="https://github.com/SchraderMJ11/ReMyth.git"
 _gitname=ReMyth
@@ -41,5 +41,8 @@ package() {
     cd "${srcdir}"
     mkdir -p $pkgdir/usr/$pkgname
     rsync -arvp --exclude .git  ${_gitname}-build/  $pkgdir/usr/${pkgname}
+    cd $startdir/src
+    install -m755 -D remyth.html $pkgdir/data/srv/httpd/htdocs/remyth.html
 }
-md5sums=('69f9edd22284e003249902999579d7c2')
+md5sums=('69f9edd22284e003249902999579d7c2'
+         'bce9d81d3aa3c39f8a4fefe3bfdb77f4')
diff --git a/abs/extra/remyth/remyth.html b/abs/extra/remyth/remyth.html
new file mode 100755
index 0000000..4d1ddb3
--- /dev/null
+++ b/abs/extra/remyth/remyth.html
@@ -0,0 +1,30 @@
+<head>
+<script type="text/javascript">
+function r()
+{
+    current_hostname=parent.location.hostname
+    top.frames["content"].location.href = ( "http://" + current_hostname + ":6544" ) ;
+
+}
+
+function express()
+{
+    current_hostname=parent.location.hostname
+    top.frames["content"].location.href = ( "http://" + current_hostname + ":6565" ) ;
+
+    }
+
+function remyth()
+{
+    current_hostname=parent.location.hostname
+    top.frames["content"].location.href = ( "http://" + current_hostname + ":8088" ) ;
+
+    }
+
+
+</script>
+</head>
+<body onload="JavaScript:remyth();">
+
+</body>
+</html>
\ No newline at end of file
-- 
cgit v0.12

