summaryrefslogtreecommitdiffstats
path: root/abs/extra/mediaserv
diff options
context:
space:
mode:
Diffstat (limited to 'abs/extra/mediaserv')
-rw-r--r--abs/extra/mediaserv/PKGBUILD28
-rw-r--r--abs/extra/mediaserv/finish8
-rw-r--r--abs/extra/mediaserv/linhes-mediaserv.tar.bz2bin0 -> 17186 bytes
-rw-r--r--abs/extra/mediaserv/mediaserv.install26
-rw-r--r--abs/extra/mediaserv/mediaserv.no_daemon.patch17
-rw-r--r--abs/extra/mediaserv/run8
6 files changed, 87 insertions, 0 deletions
diff --git a/abs/extra/mediaserv/PKGBUILD b/abs/extra/mediaserv/PKGBUILD
new file mode 100644
index 0000000..0ed43fa
--- /dev/null
+++ b/abs/extra/mediaserv/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 5936 2008-07-21 20:24:16Z thomas $
+# Maintainer: Cecil Watson<knoppmyth@gmail.com>
+
+pkgname=mediaserv
+pkgver=0.05
+pkgrel=5
+pkgdesc="On-demand transcoding server for videos, targetting the Nokia Internet Tablets."
+arch=('i686' 'x86_64')
+license=('ARTISTIC')
+depends=('tablet-encode' 'perl-xml-rss')
+backup=(/myth/mediaserv/config)
+install=(mediaserv.install)
+url="http://mediautils.garage.maemo.org/tablet-encode.html"
+source=(https://garage.maemo.org/frs/download.php/2632/mediaserv-0.05.tar.gz linhes-mediaserv.tar.bz2 mediaserv.no_daemon.patch run finish)
+
+build() {
+ cd ${srcdir}/mediaserv
+ patch -Np1 -i ${startdir}/src/mediaserv.no_daemon.patch || return 1
+ mkdir -p $startdir/pkg/usr/bin
+ mkdir -p $startdir/pkg/etc/sv/mediaserv/supervise
+ mkdir -p $startdir/pkg/usr/share/doc/mediaserv
+ mkdir -p $startdir/pkg/myth/mediaserv
+ mkdir -p $startdir/pkg/myth/mediaserv/media
+ install -D -m755 mediaserv $startdir/pkg/usr/bin
+ cp README.txt $startdir/pkg/usr/share/doc/mediaserv
+ cp -a ${srcdir}/.mediaserv/* ${pkgdir}/myth/mediaserv
+ install -D -m755 ${srcdir}/run ${srcdir}/finish $startdir/pkg/etc/sv/mediaserv
+}
diff --git a/abs/extra/mediaserv/finish b/abs/extra/mediaserv/finish
new file mode 100644
index 0000000..f424494
--- /dev/null
+++ b/abs/extra/mediaserv/finish
@@ -0,0 +1,8 @@
+#!/bin/bash
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Stopping mediaserv"
+#wait
+exec /usr/bin/killall mediaserv
diff --git a/abs/extra/mediaserv/linhes-mediaserv.tar.bz2 b/abs/extra/mediaserv/linhes-mediaserv.tar.bz2
new file mode 100644
index 0000000..7630679
--- /dev/null
+++ b/abs/extra/mediaserv/linhes-mediaserv.tar.bz2
Binary files differ
diff --git a/abs/extra/mediaserv/mediaserv.install b/abs/extra/mediaserv/mediaserv.install
new file mode 100644
index 0000000..7a26077
--- /dev/null
+++ b/abs/extra/mediaserv/mediaserv.install
@@ -0,0 +1,26 @@
+# arg 1: the new package version
+post_install() {
+ ln -s /myth/mediaserv /home/mythtv/.mediaserv
+ ln -s /myth/pretty /myth/mediaserv/media/tv
+ ln -s /myth/video /myth/mediaserv/media/video
+ chown -R mythtv.mythtv /myth/mediaserv
+ add_service.sh mediaserv
+ sv start mediaserv
+}
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
+}
+
+# arg 1: the old package version
+post_remove() {
+ sv stop mediaserv
+ remove_service.sh mediaserv
+ rm -fr /home/mythtv/.mediaserv
+ rm -fr /myth/mediaserv
+}
+
+op=$1
+shift
+$op $*
diff --git a/abs/extra/mediaserv/mediaserv.no_daemon.patch b/abs/extra/mediaserv/mediaserv.no_daemon.patch
new file mode 100644
index 0000000..b659354
--- /dev/null
+++ b/abs/extra/mediaserv/mediaserv.no_daemon.patch
@@ -0,0 +1,17 @@
+--- mediaserv/mediaserv.orig 2009-06-15 03:16:53.000000000 +0000
++++ mediaserv/mediaserv 2009-06-15 03:17:29.000000000 +0000
+@@ -608,10 +608,10 @@
+ # daemonize - daemonize the parent/control app
+ #
+ sub daemonize {
+- my $pid = fork; # Fork off the main process
+- defined ($pid) or die "Cannot start daemon: $!";
+- print "Parent daemon running.\n" if $pid; # If we have a PID, the parent daemonized okay
+- exit if $pid; # Return control to the user
++# my $pid = fork; # Fork off the main process
++# defined ($pid) or die "Cannot start daemon: $!";
++ print "Parent daemon running.\n" ; # If we have a PID, the parent daemonized okay
++# exit if $pid; # Return control to the user
+
+ # Now we're a daemonized parent process!
+
diff --git a/abs/extra/mediaserv/run b/abs/extra/mediaserv/run
new file mode 100644
index 0000000..82a1705
--- /dev/null
+++ b/abs/extra/mediaserv/run
@@ -0,0 +1,8 @@
+#!/bin/bash
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting mediaserv"
+exec su mythtv -c "/usr/bin/mediaserv"
+wait