summaryrefslogtreecommitdiffstats
path: root/abs/core/mythtv/stable-0.24/PKGBUILD
blob: 71b9ef0d7f8fe14527838a93fcb279fc9633b74d (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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# $Id: PKGBUILD 91139 2010-09-23 10:45:09Z remy $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Juergen Hoetzel <juergen@archlinux.org>
# Contributor: <kleptophobiac@gmail.com>
# Contributor: dorphell <dorphell@archlinux.org>

pkgname=mythtv
pkgver=0.24
pkgrel=5
pkgdesc="A Homebrew PVR project"
arch=('i686' 'x86_64')
url="http://www.mythtv.org/"
license=('GPL')
depends=('mysql-clients' 'qt' 'lame' 'lirc-utils' 'ffmpeg-svn' 'libxvmc'
         'fribidi' 'perl-soap-lite' 'perl-date-manip' 'perl-xml-sax'
         'perl-math-round' 'perl-net-upnp' 'perl-dbd-mysql' 'perl-time-hires'
         'libavc1394' 'wget' 'libiec61883' 'mysql-python' 'python-lxml' 
         'mesa' 'libxinerama' 'libxrandr' 'faad2' 'libvdpau' 'libcrystalhd-git')
makedepends=('yasm' 'libgl' 'subversion' 'rsync')
replaces=()
groups=('pvr')
#backup=(/usr/share/mythtv/is.xml)
#options=(!strip)
#MAKEFLAGS="-j6"
install='mythtv.install'
patchs=('smolt_jump.patch')
optdepends=('xmltv: to download tv listings')
#replaces=('mythtv-contrib')
#conflicts=('mythtv-contrib')
source=('mythbackend' 'myth.sh' `echo ${patchs[@]:0}` 'mythbackend.lr' 'mythfrontend.lr' 'pretty')

build() {
   _svntrunk="http://svn.mythtv.org/svn/branches/release-0-24-fixes"
   _svnmod="${pkgname}"

        # get clean copy from SVN repo
        if [ -d "${srcdir}/${pkgname}" ]
         then
           cd "${srcdir}/${pkgname}"
           msg "Clean up previous build..."
           make distclean 
           msg "Updating from SVN..."
           svn up
        else
           cd "${srcdir}"
           msg "Checking Out from SVN..."
           svn co "${_svntrunk}/${_svnmod}"
           cd "${srcdir}/${pkgname}"
         fi

        # apply patches
        echo "--------------------------applying patches----------------------------------------------------"
        for i in `echo ${patchs[@]:0} `
        do
                echo applying $i
                echo "-----------------------------"
                patch -Np0  -i ${startdir}/src/$i  || return 1
        done
        echo "--------------------------done applying patches-----------------------------------------------"

        sed -i -e "s/\`(svnversion \$\${SVNTREEDIR} 2>\/dev\/null) || echo Unknown\`/$pkgver/" version.pro
        find bindings/python contrib -type f | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@'

  ARCH=${CARCH/_/-}
  ./configure --prefix=/usr --cpu=${ARCH} \
              --disable-audio-jack \
              --disable-audio-pulse \
              --disable-altivec \
              --disable-distcc \
              --disable-ccache \
              --enable-vdpau \
              --enable-crystalhd \
              --dvb-path=/usr/include \
              --enable-opengl-vsync \
              --with-bindings=perl,python --python=python2 || return 1

  make all || return 1
}

package() {
  cd "${srcdir}/${pkgname}"
  # basic install
  make INSTALL_ROOT="${pkgdir}" install
  # install contrib files
  rsync -arp --exclude .svn --delete-excluded contrib ${pkgdir}/usr/share/mythtv/ || return 1
  # install database structure
  rsync -arp --exclude .svn --delete-excluded database ${pkgdir}/usr/share/mythtv/ || return 1
  # install docs
  rsync -arp --exclude .svn --delete-excluded docs ${pkgdir}/usr/share/mythtv/ || return 1

  # patch the xml LinHES style
  cp -r ${startdir}/menu-xml/*.xml ${pkgdir}/usr/share/mythtv/themes/defaultmenu/
#  mv ${pkgdir}/usr/share/mythtv/themes/defaultmenu/is.xml ${pkgdir}/usr/share/mythtv/
  cd ${pkgdir}/usr/share/mythtv
  patch -p0 < ${startdir}/menu-xml/mainmenu.xml.patch || return 1
  patch -p0 < ${startdir}/menu-xml/optical_menu.xml.patch || return 1
  patch -p0 < ${startdir}/menu-xml/library.xml.patch || return 1
  patch -p0 < ${startdir}/menu-xml/util_menu.xml.patch || return 1

  # make log dir
  mkdir -p ${pkgdir}/var/log/mythtv
  chown 1000.1000 ${pkgdir}/var/log/mythtv
  mkdir -p ${pkgdir}/etc/logrotate.d
  cp ${srcdir}/*.lr ${pkgdir}/etc/logrotate.d
  mkdir -p ${pkgdir}/etc/cron.hourly/
  install -m0755 ${srcdir}/pretty ${pkgdir}/etc/cron.hourly/
}
md5sums=('7ef6de58240e7aad389a0b13d91b1cf6'
         '2babd4b8e146a7538d18dcd55695b0be'
         'a837de9ccc201994320071e48952b17d'
         'f735805a80b0d1180dee01f9df1b7004'
         'f407d6af23e74a49540755420f84fa58'
         '5469d9921b726db750b991c87d226158')