diff options
Diffstat (limited to 'community/mythtv')
-rw-r--r-- | community/mythtv/PKGBUILD | 75 | ||||
-rw-r--r-- | community/mythtv/alsa.patch | 66 | ||||
-rw-r--r-- | community/mythtv/mythbackend.service | 14 | ||||
-rw-r--r-- | community/mythtv/mythtv.install | 22 |
4 files changed, 177 insertions, 0 deletions
diff --git a/community/mythtv/PKGBUILD b/community/mythtv/PKGBUILD new file mode 100644 index 000000000..5616cc87c --- /dev/null +++ b/community/mythtv/PKGBUILD @@ -0,0 +1,75 @@ +# $Id: PKGBUILD 94897 2013-08-01 06:55:19Z bpiotrowski $ +# Maintainer: Jonathan Conder <jonno.conder@gmail.com> +# Contributor: Giovanni Scafora <giovanni@archlinux.org> +# Contributor: Juergen Hoetzel <juergen@archlinux.org> +# Contributor: <kleptophobiac@gmail.com> +# Contributor: dorphell <dorphell@archlinux.org> + +pkgname=mythtv +pkgver=0.26.0 +pkgrel=10 +epoch=1 +pkgdesc="A Homebrew PVR project" +arch=('i686' 'x86_64') +url="http://www.mythtv.org/" +license=('GPL') +depends=('avahi' 'fftw' 'lame' 'libass' 'libavc1394' 'libcdio' 'libiec61883' + 'libpulse' 'libva' 'libvdpau' 'libxinerama' 'lirc-utils' + 'mariadb-clients' 'mysql-python' 'perl-dbd-mysql' 'perl-io-socket-inet6' + 'perl-libwww' 'perl-net-upnp' 'python2-lxml' 'qtwebkit' 'urlgrabber' + 'x264') +makedepends=('glew' 'libcec' 'libxml2' 'mesa' 'mesa-libgl' 'openssl' 'yasm') +optdepends=('glew: for GPU commercial flagging' + 'libcec: for consumer electronics control capabilities' + 'libxml2: to read blu-ray metadata' + 'openssl: for AirTunes (RAOP) support' + 'xmltv: to download tv listings') +conflicts=('myththemes' 'mythplugins-mythvideo') +replaces=('myththemes' 'mythplugins-mythvideo') +backup=() +install='mythtv.install' +source=("ftp://ftp.osuosl.org/pub/$pkgname/$pkgname-$pkgver.tar.bz2" + 'alsa.patch' + 'mythbackend.service' + 'libva-compat.patch::https://github.com/garybuhrmaster/mythtv/commit/2add868d2f18b8b47d9747e043f052e88869bfc3.patch' + 'http://code.mythtv.org/trac/raw-attachment/ticket/11338/libcec-2-support.patch') +md5sums=('f57066bf75e6f14824c494d41639f4f9' + 'f64b8219e3d27a2edf96733b851e576b' + 'e4d572dcc307d6d8ae26bee5aebf9f3a' + 'ae88a16e9f42a913f395bf71af18e931' + '6e156c9fc0b369346d93ccafad46cba3') + +build() { + cd "$srcdir/$pkgname-$pkgver" + find 'bindings/python' 'contrib' -type f | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@' + + patch -Np1 -i "$srcdir/alsa.patch" + patch -Np2 -i "$srcdir/libva-compat.patch" + patch -Np2 -i "$srcdir/libcec-2-support.patch" + + ARCH="${CARCH/_/-}" + ./configure --prefix=/usr \ + --cpu="$ARCH" \ + --disable-altivec \ + --disable-audio-jack \ + --disable-ccache \ + --disable-distcc \ + --enable-libfftw3 \ + --enable-libmp3lame \ + --enable-libx264 \ + --enable-vaapi \ + --python=python2 + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make INSTALL_ROOT="$pkgdir" install + + install -D -m644 "$srcdir/mythbackend.service" "$pkgdir/usr/lib/systemd/system/mythbackend.service" + 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" + mkdir -p "$pkgdir/var/log/mythtv" +} diff --git a/community/mythtv/alsa.patch b/community/mythtv/alsa.patch new file mode 100644 index 000000000..07cf1c3a9 --- /dev/null +++ b/community/mythtv/alsa.patch @@ -0,0 +1,66 @@ +diff -Nru a/external/FFmpeg/libavdevice/alsa-audio-common.c b/external/FFmpeg/libavdevice/alsa-audio-common.c +--- a/external/FFmpeg/libavdevice/alsa-audio-common.c 2012-10-02 23:30:24.000000000 +1300 ++++ b/external/FFmpeg/libavdevice/alsa-audio-common.c 2013-01-09 13:23:49.704360811 +1300 +@@ -28,6 +28,7 @@ + * @author Nicolas George ( nicolas george normalesup org ) + */ + ++#include <sys/types.h> + #include <alsa/asoundlib.h> + #include "avdevice.h" + #include "libavutil/avassert.h" +diff -Nru a/external/FFmpeg/libavdevice/alsa-audio-dec.c b/external/FFmpeg/libavdevice/alsa-audio-dec.c +--- a/external/FFmpeg/libavdevice/alsa-audio-dec.c 2012-10-02 23:30:24.000000000 +1300 ++++ b/external/FFmpeg/libavdevice/alsa-audio-dec.c 2013-01-09 13:23:47.911005108 +1300 +@@ -45,6 +45,7 @@ + * plugin. + */ + ++#include <sys/types.h> + #include <alsa/asoundlib.h> + #include "libavformat/internal.h" + #include "libavutil/opt.h" +diff -Nru a/external/FFmpeg/libavdevice/alsa-audio-enc.c b/external/FFmpeg/libavdevice/alsa-audio-enc.c +--- a/external/FFmpeg/libavdevice/alsa-audio-enc.c 2012-10-02 23:30:24.000000000 +1300 ++++ b/external/FFmpeg/libavdevice/alsa-audio-enc.c 2013-01-09 13:23:46.880992286 +1300 +@@ -37,6 +37,7 @@ + * which gives a low latency suitable for real-time playback. + */ + ++#include <sys/types.h> + #include <alsa/asoundlib.h> + + #include "libavformat/internal.h" +diff -Nru a/external/FFmpeg/libavdevice/alsa-audio.h b/external/FFmpeg/libavdevice/alsa-audio.h +--- a/external/FFmpeg/libavdevice/alsa-audio.h 2012-10-02 23:30:24.000000000 +1300 ++++ b/external/FFmpeg/libavdevice/alsa-audio.h 2013-01-09 13:23:51.121045145 +1300 +@@ -30,6 +30,7 @@ + #ifndef AVDEVICE_ALSA_AUDIO_H + #define AVDEVICE_ALSA_AUDIO_H + ++#include <sys/types.h> + #include <alsa/asoundlib.h> + #include "config.h" + #include "libavutil/log.h" +diff -Nru a/libs/libmyth/audio/audiooutputalsa.h b/libs/libmyth/audio/audiooutputalsa.h +--- a/libs/libmyth/audio/audiooutputalsa.h 2012-10-02 23:30:24.000000000 +1300 ++++ b/libs/libmyth/audio/audiooutputalsa.h 2013-01-09 13:22:13.313180438 +1300 +@@ -1,6 +1,7 @@ + #ifndef AUDIOOUTPUTALSA + #define AUDIOOUTPUTALSA + ++#include <sys/types.h> + #define ALSA_PCM_NEW_HW_PARAMS_API + #define ALSA_PCM_NEW_SW_PARAMS_API + #include <alsa/asoundlib.h> +diff -Nru a/libs/libmythtv/audioinputalsa.h b/libs/libmythtv/audioinputalsa.h +--- a/libs/libmythtv/audioinputalsa.h 2012-10-02 23:30:24.000000000 +1300 ++++ b/libs/libmythtv/audioinputalsa.h 2013-01-09 13:22:44.470223553 +1300 +@@ -24,6 +24,7 @@ + #include "audioinput.h" + + #ifdef USING_ALSA ++#include <sys/types.h> + #include <alsa/asoundlib.h> + #else + typedef int snd_pcm_t; diff --git a/community/mythtv/mythbackend.service b/community/mythtv/mythbackend.service new file mode 100644 index 000000000..2a2b8b7db --- /dev/null +++ b/community/mythtv/mythbackend.service @@ -0,0 +1,14 @@ +[Unit] +Description=MythTV Backend +After=network.target mysqld.service + +[Service] +Type=simple +Environment=HOME=/var/lib/mythtv +User=mythtv +ExecStart=/usr/bin/mythbackend --logpath /var/log/mythtv +ExecStop=/usr/bin/mythshutdown --setscheduledwakeup +#ExecStop=/usr/bin/mythshutdown --shutdown + +[Install] +WantedBy=multi-user.target diff --git a/community/mythtv/mythtv.install b/community/mythtv/mythtv.install new file mode 100644 index 000000000..90ad79d28 --- /dev/null +++ b/community/mythtv/mythtv.install @@ -0,0 +1,22 @@ +post_upgrade() { + if ! getent passwd mythtv &>/dev/null; then + getent group mythtv &>/dev/null || groupadd -r mythtv >/dev/null + useradd -rmd /var/lib/mythtv -g mythtv -G video,audio,optical -s /bin/bash mythtv >/dev/null + fi + + echo -e "You may need to load time zone tables in MySQL.\nSee http://www.mythtv.org/wiki/MySQL_Time_Zone_Tables" +} + +post_install() { + echo -e "For installation information, visit:\nhttps://wiki.archlinux.org/index.php/MythTV" + + post_upgrade +} + +post_remove() { + echo -e "The MythTV database was not removed. To remove it, run:\n mysql -u root -e 'drop database mythconverg;'" + [ -d var/lib/mythtv ] && echo "The MythTV home directory /var/lib/mythtv can also be removed." + + getent passwd mythtv &>/dev/null && userdel mythtv >/dev/null + getent group mythtv &>/dev/null && groupdel mythtv >/dev/null +} |