summaryrefslogtreecommitdiff
path: root/community/mythtv/PKGBUILD
blob: cf58bb1ac284cb5f979bbedfd94768133587c73b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# $Id: PKGBUILD 102723 2013-12-17 19:52:17Z bgyorgy $
# 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.27
pkgrel=6
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' 'libvpx' 'libxinerama' 'lirc-utils' 'mariadb-clients'
         'mysql-python' 'perl-dbd-mysql' 'perl-io-socket-inet6' 'perl-libwww'
         'perl-net-upnp' 'python2-lxml' 'qtwebkit' 'taglib' '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'
            'udisks: detect changes to removable media'
            'xmltv: to download tv listings')
conflicts=('myththemes' 'mythplugins-mythvideo')
replaces=('myththemes' 'mythplugins-mythvideo')
install='mythtv.install'
source=("$pkgname-$pkgver.tar.gz::https://github.com/MythTV/$pkgname/archive/v$pkgver.tar.gz"
        'mythbackend.service'
        'http://code.mythtv.org/trac/raw-attachment/ticket/11338/libcec-2-support.2.patch')
sha256sums=('494ebd7ee384e751c05ee0a1b3dcd3618caf72f1e94810381c09c2b5d1c799f0'
            'ecfde779ded8332cc62c86fac6b432b09cbf5d254135798287ada688af9a1302'
            '8270407c2074b305e0c32151f89c84f6bf980a32665a2da8e4727405fa3911f3')

prepare() {
  cd "$srcdir/$pkgname-$pkgver/$pkgname"

  find 'bindings/python' 'contrib' -type f | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@'
  patch -Np2 -i "$srcdir/libcec-2-support.2.patch"
}

build() {
  cd "$srcdir/$pkgname-$pkgver/$pkgname"

  ARCH="${CARCH/_/-}"
  ./configure --prefix=/usr \
              --cpu="$ARCH" \
              --disable-altivec \
              --disable-audio-jack \
              --disable-ccache \
              --disable-distcc \
              --enable-libfftw3 \
              --enable-libmp3lame \
              --enable-libvpx \
              --enable-libx264 \
              --enable-vaapi \
              --python=python2
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver/$pkgname"
  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"
}