diff --git a/build/runit/gmrender b/build/runit/gmrender new file mode 100644 index 0000000..d27690c --- /dev/null +++ b/build/runit/gmrender @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +if [ -z "$GMRENDER_NAME" ]; then + /usr/local/bin/gmediarender +else + /usr/local/bin/gmediarender -f $GMRENDER_NAME +fi diff --git a/build/runit/minidlna b/build/runit/minidlna new file mode 100644 index 0000000..4a26062 --- /dev/null +++ b/build/runit/minidlna @@ -0,0 +1,8 @@ +#!/bin/sh +if [ ! -f $MINIDLNA_CONFIG ]; then + mkdir -p `dirname $$MINIDLNA_CONFIG` + cp /opt/minidlna-$MINIDLNA_VERSION/minidlna.conf $MINIDLNA_CONFIG +fi +mkdir -p `dirname $MINIDLNA_LOG` +mkdir -p $MINIDLNA_DATA +/usr/local/sbin/minidlnad -d -f $MINIDLNA_CONFIG >> $MINIDLNA_LOG \ No newline at end of file diff --git a/build/runit/upnpproxy b/build/runit/upnpproxy new file mode 100644 index 0000000..9e4361a --- /dev/null +++ b/build/runit/upnpproxy @@ -0,0 +1,6 @@ +#!/bin/sh +if [ ! -f $UPNPPROXY_CONFIG ]; then + mkdir -p `dirname $UPNPPROXY_CONFIG` + cp /opt/upnpproxy/doc/upnpproxy.conf $UPNPPROXY_CONFIG +fi +upnpproxy -C $UPNPPROXY_CONFIG \ No newline at end of file diff --git a/build/scripts/gmrender.sh b/build/scripts/gmrender.sh new file mode 100644 index 0000000..8a0944a --- /dev/null +++ b/build/scripts/gmrender.sh @@ -0,0 +1,24 @@ +#!/bin/bash +set -e +source /build/config +set -x + +# GMediaRender dependencies +$minimal_apt_get_install libupnp-dev libgstreamer0.10-dev \ + gstreamer0.10-plugins-base gstreamer0.10-plugins-good \ + gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly \ + gstreamer0.10-ffmpeg \ + gstreamer0.10-pulseaudio gstreamer0.10-alsa + +# GMediaRender +cd opt +git clone https://github.com/hzeller/gmrender-resurrect.git +cd gmrender-resurrect +autoreconf || automake --add-missing +./configure +make +make install + +## Runit script +mkdir /etc/service/gmrender +mv /build/runit/gmrender /etc/service/gmrender/run \ No newline at end of file diff --git a/build/scripts/minidlna.sh b/build/scripts/minidlna.sh new file mode 100644 index 0000000..8e12343 --- /dev/null +++ b/build/scripts/minidlna.sh @@ -0,0 +1,31 @@ +#!/bin/bash +set -e +source /build/config +set -x + +# MiniDLNA dependencies +$minimal_apt_get_install gettext libavutil-dev libavcodec-dev libavformat-dev libjpeg-dev libsqlite3-dev libexif-dev libid3tag0-dev libogg-dev libvorbis-dev libFLAC-dev + +export MINIDLNA_VERSION=1.1.1 +export MINIDLNA_CONFIG=/host/etc/minidlna.conf +export MINIDLNA_LOG=/host/var/log/minidlna.log +export MINIDLNA_DATA=/host/var/lib/minidlna + +# MiniDLNA +cd opt +wget http://downloads.sourceforge.net/project/minidlna/minidlna/$MINIDLNA_VERSION/minidlna-$MINIDLNA_VERSION.tar.gz +tar xzf minidlna-$MINIDLNA_VERSION.tar.gz +cd minidlna-$MINIDLNA_VERSION +./configure +make +make install + +## Runit script +mkdir /etc/service/minidlna +mv /build/runit/minidlna /etc/service/minidlna/run + +## Environment variables +echo -n $MINIDLNA_VERSION > /etc/container_environment/MINIDLNA_VERSION +echo -n $MINIDLNA_CONFIG > /etc/container_environment/MINIDLNA_CONFIG +echo -n $MINIDLNA_LOG > /etc/container_environment/MINIDLNA_LOG +echo -n $MINIDLNA_DATA > /etc/container_environment/MINIDLNA_DATA \ No newline at end of file diff --git a/build/scripts/upnpproxy.sh b/build/scripts/upnpproxy.sh new file mode 100644 index 0000000..568607f --- /dev/null +++ b/build/scripts/upnpproxy.sh @@ -0,0 +1,24 @@ +#!/bin/bash +set -e +source /build/config +set -x + +## UPnP Proxy dependency +$minimal_apt_get_install uuid-dev + +## UPnP Proxy +cd opt +git clone git://git.savannah.nongnu.org/upnpproxy.git +cd upnpproxy +autoreconf || automake --add-missing +./configure +make +make install + +## Runit script +mkdir /etc/service/upnpproxy +mv /build/runit/upnpproxy /etc/service/upnpproxy/run + +## Environment variables +export UPNPPROXY_CONFIG=/host/etc/upnpproxy.conf +echo -n $UPNPPROXY_CONFIG > /etc/container_environment/UPNPPROXY_CONFIG