From 415856bdd4f48ab4f2732996f0bae58595092bbe Mon Sep 17 00:00:00 2001 From: Parabola Date: Tue, 5 Apr 2011 14:26:38 +0000 Subject: Tue Apr 5 14:26:38 UTC 2011 --- community/mythtv/PKGBUILD | 73 +++++++++++++++++++++++++++++++ community/mythtv/mythbackend.conf | 92 +++++++++++++++++++++++++++++++++++++++ community/mythtv/mythbackend.rc | 82 ++++++++++++++++++++++++++++++++++ community/mythtv/mythtv.install | 12 +++++ 4 files changed, 259 insertions(+) create mode 100644 community/mythtv/PKGBUILD create mode 100644 community/mythtv/mythbackend.conf create mode 100644 community/mythtv/mythbackend.rc create mode 100644 community/mythtv/mythtv.install (limited to 'community/mythtv') diff --git a/community/mythtv/PKGBUILD b/community/mythtv/PKGBUILD new file mode 100644 index 000000000..0ff2783ad --- /dev/null +++ b/community/mythtv/PKGBUILD @@ -0,0 +1,73 @@ +# $Id: PKGBUILD 32152 2010-11-11 01:53:51Z jconder $ +# Maintainer: Jonathan Conder +# Contributor: Giovanni Scafora +# Contributor: Juergen Hoetzel +# Contributor: +# Contributor: dorphell + +pkgname=mythtv +pkgver=0.24 +pkgrel=1 +pkgdesc="A Homebrew PVR project" +arch=('i686' 'x86_64') +url="http://www.mythtv.org/" +license=('GPL') +depends=('lame' 'libavc1394' 'libiec61883' 'libvdpau' 'libxinerama' 'libxvmc' + 'lirc-utils' 'mesa' 'mysql-clients' 'mysql-python' 'perl-dbd-mysql' + 'perl-libwww' 'perl-net-upnp' 'python-lxml' 'qt' 'wget') +makedepends=('yasm') +optdepends=('xmltv: to download tv listings') +backup=('etc/conf.d/mythbackend') +options=('force') +install='mythtv.install' +source=("ftp://ftp.osuosl.org/pub/$pkgname/$pkgname-$pkgver.tar.bz2" + 'mythbackend.rc' + 'mythbackend.conf') +md5sums=('1abe1d3cc72fdbde6daa4247dedbf29a' + 'feadcc9ad064d93d6dceab1efc0bd9ed' + 'bb8e4033d82428d827570fae9ba15e6a') + +build() { + cd "$srcdir/$pkgname-$pkgver" + find 'bindings/python' 'contrib' -type f | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@' + + ARCH="${CARCH/_/-}" + ./configure --prefix=/usr --cpu="$ARCH" \ + --enable-mmx \ + --enable-audio-oss \ + --enable-audio-alsa \ + --disable-audio-jack \ + --disable-audio-pulse \ + --disable-altivec \ + --disable-distcc \ + --disable-ccache \ + --enable-vdpau \ + --enable-dvb \ + --dvb-path=/usr/include \ + --enable-lirc \ + --enable-joystick-menu \ + --enable-v4l \ + --enable-ivtv \ + --enable-xvmc \ + --enable-xvmcw \ + --enable-xvmc-vld \ + --enable-firewire \ + --enable-opengl-vsync \ + --enable-xrandr \ + --enable-xv \ + --enable-x11 \ + --with-bindings=perl,python --python=python2 + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make INSTALL_ROOT="$pkgdir" install + + install -D -m755 "$srcdir/mythbackend.rc" "$pkgdir/etc/rc.d/mythbackend" + install -D -m644 "$srcdir/mythbackend.conf" "$pkgdir/etc/conf.d/mythbackend" + install -D -m644 'database/mc.sql' "$pkgdir/usr/share/mythtv/mc.sql" + + mkdir -p "$pkgdir/usr/share/mythtv" + cp -R 'contrib' "$pkgdir/usr/share/mythtv" +} diff --git a/community/mythtv/mythbackend.conf b/community/mythtv/mythbackend.conf new file mode 100644 index 000000000..e004ae5bd --- /dev/null +++ b/community/mythtv/mythbackend.conf @@ -0,0 +1,92 @@ +#!/bin/bash +# +# Rename this file to: +# +# /etc/config.d/mythbackend +# +############################################################################### +# +# Copyright (c) by the MythTV Development Team. +# +# Derived from work by: +# +# Michael Thomson +# Stu Tomlinson +# Axel Thimm +# Adopted for ArchLinux: +# Jürgen Hoetzel +# +# 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 of the License, 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 this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +############################################################################### +# +# Config variables for the mythbackend startup script, which is usually +# located in /etc/rc.d/mythbackend +# +# When the startup script is executed, it sources this file if it exists, +# otherwise it will fall back on default values. +# +# Leave variables commented out to use default values in init script +# (/etc/rc.d/mythbackend). +# +# To override defaults, uncomment the relevant variable definition and +# edit as required. +# + +# +# User who should start the mythbackend processes +# +# Running mythbackend as non-root requires you to ensure that audio/video +# devices used for recording have suitable user permissions. One way +# to achieve this is to modify existing or create new udev rules which +# assign these devices to a non-root group with rw permissions and add +# your mythbackend user to that group. Be aware that console.perms can +# also affect device permissions and may need additional configuration. +# Running as non-root may also introduce increased process latency. +# +# MBE_USER='root' + +# +# Directory holding the mythbackend binary (empty means autodetect). +# +# MBE_DIR='' + +# +# Name of mythbackend binary. +# +# MBE_PROG='mythbackend' + +# +# Other startup options for mythbackend (see 'mythbackend --help' for a list). +# +# MBE_OPTIONS='' + +# +# Directory holding the mythbackend log file +# +# LOG_DIR='/var/log/mythtv' + +# +# Name of mythbackend log file. +# +# NOTE: If you are running as non-root take care to ensure the mythbackend user +# has permission to write to this log file. +# +# LOG_FILE='mythbackend.log' + +# +# Logging options for mythbackend (see 'mythbackend -v help' for a list) +# +# LOG_OPTS='' diff --git a/community/mythtv/mythbackend.rc b/community/mythtv/mythbackend.rc new file mode 100644 index 000000000..410e8de41 --- /dev/null +++ b/community/mythtv/mythbackend.rc @@ -0,0 +1,82 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +# Default values to use if none are supplied in the config file. + +# Running mythbackend as non-root requires you to ensure that audio/video +# devices used for recording have suitable user permissions. One way +# to achieve this is to modify existing or create new udev rules which +# assign these devices to a non-root group with rw permissions and add +# your mythbackend user to that group. Be aware that console.perms can +# also affect device permissions and may need additional configuration. +# Running as non-root may also introduce increased process latency. +# +# User who should start the mythbackend processes +MBE_USER='root' + +# Startup options for mythbackend +MBE_OPTIONS='' + +# Name of mythbackend log file +LOG_FILE='/var/log/mythbackend.log' + +# Logging options for mythbackend (empty means '-v important,general') +LOG_OPTS='' + +############################################################################### + +CONFIG_FILE=/etc/conf.d/mythbackend +PIDFILE=/var/run/mythbackend.pid + +if [[ -f ${CONFIG_FILE} ]]; then + . ${CONFIG_FILE} +fi + +pid="$(cat ${PIDFILE} 2>/dev/null || pidof mythbackend)"; + +# fix FS#11890 +mbe_user_home="$(getent passwd ${MBE_USER}|cut -d : -f 6)" + +case "$1" in + start) + stat_busy "Starting MythTV Backend" + + # already running ? + if [[ "${pid}" -gt 0 ]] && kill -0 "${pid}"; then + stat_fail + exit 1; + fi + touch ${PIDFILE} ${LOG_FILE} + chown "$MBE_USER" ${PIDFILE} ${LOG_FILE} + if su "$MBE_USER" -c "HOME=${mbe_user_home} mythbackend \ + --daemon \ + --logfile $LOG_FILE $LOG_OPTS \ + --pidfile ${PIDFILE} $MBE_OPTIONS"; + then + add_daemon mythbackend + stat_done + else + stat_fail + fi + ;; + + stop) + stat_busy "Stopping MythTV Backend" + if [[ "${pid}" -gt 0 ]] && kill $pid &>/dev/null; then + rm_daemon mythbackend + stat_done + rm ${PIDFILE} 2>/dev/null + else + stat_fail + fi + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 diff --git a/community/mythtv/mythtv.install b/community/mythtv/mythtv.install new file mode 100644 index 000000000..1e7bd936c --- /dev/null +++ b/community/mythtv/mythtv.install @@ -0,0 +1,12 @@ +post_install() { + echo "See \"MythTV\" on the Archlinux Wiki for installation information - Extensive!!" +} + +post_upgrade() { + echo "Make sure you rescan for audio devices (use the frontend audio settings menu)" + echo "See http://www.mythtv.org/wiki/Release_Notes_-_0.24 for details" +} + +post_remove() { + echo -e "NOTE: mysql database was not removed. To remove run:\nmysql -u root -e 'drop database mythconverg;'" +} -- cgit v1.2.3-54-g00ecf