PKGBUILDs/community/mythtv/PKGBUILD
2013-02-24 23:58:53 +00:00

82 lines
2.8 KiB
Bash

# $Id: PKGBUILD 73064 2012-06-30 06:07:26Z jconder $
# 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>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - correctly define ARM cpus for configure
# - disabled vdpau, mmx
pkgname=mythtv
pkgver=0.26.0
pkgrel=7
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'
'mysql-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=('etc/conf.d/mythbackend')
install='mythtv.install'
source=("ftp://ftp.osuosl.org/pub/$pkgname/$pkgname-$pkgver.tar.bz2"
'alsa.patch'
'mythbackend.service'
'http://code.mythtv.org/trac/raw-attachment/ticket/11338/libcec-2-support.patch')
md5sums=('f57066bf75e6f14824c494d41639f4f9'
'f64b8219e3d27a2edf96733b851e576b'
'e4d572dcc307d6d8ae26bee5aebf9f3a'
'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/libcec-2-support.patch"
sed -re 's@Key, &@Key, @' -i 'bindings/php/MythBase.php'
[[ $CARCH == "arm" ]] && ARCH="armv5te"
[[ $CARCH == "armv6h" ]] && ARCH="armv6l"
[[ $CARCH == "armv7h" ]] && ARCH="armv7-a"
./configure --prefix=/usr \
--cpu="$ARCH" \
--disable-mmx \
--disable-vdpau \
--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"
}