From 952d5c9b1a3f13f872b27637c97f4a9a8d21d00f Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sun, 25 Dec 2011 19:43:15 +0100 Subject: [PATCH] new package: add new package 'vdr' (testing) Signed-off-by: Stephan Raue --- packages/testing/multimedia/vdr/build | 47 ++++++++++++ .../multimedia/vdr/config/channels.conf | 66 +++++++++++++++++ .../testing/multimedia/vdr/config/diseqc.conf | 73 +++++++++++++++++++ .../multimedia/vdr/config/keymacros.conf | 13 ++++ .../multimedia/vdr/config/svdrphosts.conf | 13 ++++ packages/testing/multimedia/vdr/config/wakeup | 12 +++ packages/testing/multimedia/vdr/init.d/42_vdr | 38 ++++++++++ packages/testing/multimedia/vdr/install | 35 +++++++++ packages/testing/multimedia/vdr/meta | 37 ++++++++++ .../testing/multimedia/vdr/scripts/runvdr | 12 +++ .../multimedia/vdr/scripts/vdrshutdown | 66 +++++++++++++++++ 11 files changed, 412 insertions(+) create mode 100755 packages/testing/multimedia/vdr/build create mode 100644 packages/testing/multimedia/vdr/config/channels.conf create mode 100644 packages/testing/multimedia/vdr/config/diseqc.conf create mode 100644 packages/testing/multimedia/vdr/config/keymacros.conf create mode 100644 packages/testing/multimedia/vdr/config/svdrphosts.conf create mode 100644 packages/testing/multimedia/vdr/config/wakeup create mode 100755 packages/testing/multimedia/vdr/init.d/42_vdr create mode 100755 packages/testing/multimedia/vdr/install create mode 100644 packages/testing/multimedia/vdr/meta create mode 100755 packages/testing/multimedia/vdr/scripts/runvdr create mode 100755 packages/testing/multimedia/vdr/scripts/vdrshutdown diff --git a/packages/testing/multimedia/vdr/build b/packages/testing/multimedia/vdr/build new file mode 100755 index 0000000000..230832af88 --- /dev/null +++ b/packages/testing/multimedia/vdr/build @@ -0,0 +1,47 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# Copyright (C) 2011 Anthony Nash (nash.ant@gmail.com) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +# vdr fails to build with LTO optimization + strip_lto + strip_gold + + LDFLAGS=`echo $LDFLAGS | sed -e "s|-Wl,--as-needed||"` + +cd $PKG_BUILD + +cat > Make.config <> $INSTALL/usr/config/vdr/svdrphosts.conf diff --git a/packages/testing/multimedia/vdr/meta b/packages/testing/multimedia/vdr/meta new file mode 100644 index 0000000000..3aa2b315ae --- /dev/null +++ b/packages/testing/multimedia/vdr/meta @@ -0,0 +1,37 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# Copyright (C) 2011 Anthony Nash (nash.ant@gmail.com) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="vdr" +PKG_VERSION="1.7.22" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.tvdr.de" +PKG_URL="ftp://ftp.tvdr.de/vdr/Developer/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="fontconfig freetype fribidi libcap $LIBJPEG" +PKG_BUILD_DEPENDS="toolchain gettext fontconfig freetype fribidi libcap $LIBJPEG" +PKG_PRIORITY="optional" +PKG_SECTION="multimedia" +PKG_SHORTDESC="vdr: A powerful DVB TV application" +PKG_LONGDESC="This project describes how to build your own digital satellite receiver and video disk recorder. It is based mainly on the DVB-S digital satellite receiver card, which used to be available from Fujitsu Siemens and the driver software developed by the LinuxTV project." + +PKG_IS_ADDON="no" +PKG_AUTORECONF="no" diff --git a/packages/testing/multimedia/vdr/scripts/runvdr b/packages/testing/multimedia/vdr/scripts/runvdr new file mode 100755 index 0000000000..d2ffe7ea13 --- /dev/null +++ b/packages/testing/multimedia/vdr/scripts/runvdr @@ -0,0 +1,12 @@ +#!/bin/sh + +VDRCMD=$1 + +[ -r /etc/locale ] && export LANG=`cat /etc/locale` +export DISPLAY=":0" + +trap 'killall -q -TERM vdr; exit 0' 15 + +while true; do + eval "$VDRCMD" +done diff --git a/packages/testing/multimedia/vdr/scripts/vdrshutdown b/packages/testing/multimedia/vdr/scripts/vdrshutdown new file mode 100755 index 0000000000..3b89ce1181 --- /dev/null +++ b/packages/testing/multimedia/vdr/scripts/vdrshutdown @@ -0,0 +1,66 @@ +#!/bin/sh + +. /etc/wakeup + +do_shutdown() +{ + sleep 5 +} + +do_reboot() +{ + sleep 5 +# reboot +} + +osdmsg() +{ + sleep 2 + echo "MESG $1" | nc localhost 2001 +} + +grep -q LOCAL /etc/adjtime && HWCLOCK_LOCAL_TIME="-l" + +TIMER=$1 +[ -z "$TIMER" ] && TIMER=`/usr/bin/getwakeup $HWCLOCK_LOCAL_TIME` +[ -z "$TIMER" ] && TIMER=0 + +[ -z "$WAKEUP" -o "$WAKEUP" = no -o -z "$TIMER" ] && do_shutdown + +if [ $REGULAR_DAYS -gt 0 ]; then + REGULAR_TIMER=$((`date -d "$REGULAR_TIME" +%s` + $REGULAR_DAYS * 24 * 60 * 60)) + + # when no vdr timer is set or vdr timer starts later than regular timer: + if [ $TIMER -eq 0 ] || [ $TIMER -gt 0 -a $REGULAR_TIMER -lt $TIMER ]; then + TIMER=$REGULAR_TIMER + fi +fi + +if [ "$WAKEUP" = nvram -a -x /usr/bin/nvram-wakeup ]; then + if [ -r /etc/nvram-wakeup.conf ]; then + /usr/bin/nvram-wakeup -C /etc/nvram-wakeup.conf -ls $TIMER + elif [ -n "$BOARD_TYPE" ]; then + /usr/bin/nvram-wakeup -I $BOARD_TYPE -ls $TIMER + else + /usr/bin/nvram-wakeup -ls $TIMER + fi + case $? in + 0) + do_shutdown + ;; + 1) + do_reboot + ;; + *) + osdmsg "nvram-wakeup: cannot set time, shutdown aborted!" + ;; + esac +elif [ "$WAKEUP" = acpi -a -e /sys/class/rtc/rtc0/wakealarm ]; then + echo 0 >/sys/class/rtc/rtc0/wakealarm + echo $TIMER >/sys/class/rtc/rtc0/wakealarm + echo $TIMER >/sys/class/rtc/rtc0/wakealarm + do_shutdown +else + do_shutdown +fi +