summaryrefslogtreecommitdiffstats
path: root/abs/core/mythtv/stable-29/mythtv/PKGBUILD
blob: 14eb9f033e65955f037b468a026960e978cba7f6 (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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
pkgname=mythtv
pkgver=29.1
pkgrel=5
commit_hash=`cat ../git_src/git_hash`
pkgdesc="A Homebrew PVR project $commit_hash"
arch=('x86_64')
url="http://www.mythtv.org/"
license=('GPL')
depends=('avahi' 'exiv2' 'faad2' 'fftw' 'glew' 'lame' 'libass' 'libavc1394' 'libcdio'
         'libcec' 'libgl' 'libcrystalhd-git' 'libiec61883' 'libva' 'libvdpau' 'libvpx'
         'libx264' 'x265' 'libxinerama' 'libxml2' 'libxrandr' 'LinHES-config>=8.1-6'
         'LinHES-system>=8.4-4' 'lirc-utils' 'mysql-clients' 'mysql-python'
         'openssl' 'perl-date-manip' 'perl-dbd-mysql'
         'perl-io-socket-inet6' 'perl-libwww' 'perl-math-round'
         'perl-net-upnp' 'perl-soap-lite' 'perl-xml-sax' 'python2-future'
         'python2-pycurl' 'python2-requests' 'python2-requests-cache'
         'python2-lxml' 'qt5-script' 'qt5-webkit' 'sdl' 'taglib' 'unzip' 'urlgrabber'
         'wget' 'xmltv')
makedepends=('apache-ant' 'mesa' 'mesa-libgl' 'yasm' 'x264' 'git' 'rsync' 'qt5-tools')
replaces=()
groups=('pvr')
backup=()
install='mythtv.install'

patches=(
         'myth_settings.patch'
         'videoAlwaysUseBookmark.patch'
         'autoskip_reduce_commskip_jumpback.patch'
         'change_msg_types.patch'
         'disable_mythnotification_tuner_failure.patch'
         'searchMetatdataSelectedGrabber.patch'
         'addDamagedToProgDetails.patch'
         'defaultThemeLinHES.patch'
         'addEnableDisableAutoShutdownToSystemMenu.patch'
         'mythfrontend_en_us.ts_Title_Case.patch'
         'fixTranslations.patch'
         'pull103-Add-heuristic-in-TMDB-script-to-detect-movie-release-years.patch'
         '0006-cardutil_show_displayname.patch'
         '0287-MythUiImage-Don-t-block-UI-when-exiting-screens.patch'
         '0292-UPnP-Reduce-startup-latency-by-moving-blocking-code-to-own-thread.patch'
         '0294-0283-FE-Add-network-status-to-machine-status-dialog.patch'
         )

optdepends=()
source=(`echo ${patches[@]:0}` 'recordings')

prepare() {
    if [ -e ${srcdir}/mythtv ]
    then
        msg "Removing old mythtv src"
        rm -rf ${srcdir}/mythtv
    fi

    cd ${startdir}
    msg "Copying in mythtv git_src"
    cp -rp ../git_src/mythtv/mythtv $srcdir
    cd ${srcdir}/$pkgname
    echo "#!/bin/bash" > version.sh

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

    msg "Change python to python2"
    find 'bindings/python' 'contrib' 'programs/scripts' -type f | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@'

    msg "Updating en_us Translation"
    cd ${srcdir}/$pkgname/i18n
    lrelease -removeidentical mythfrontend_en_us.ts
}

build() {
    cd ${srcdir}/$pkgname

    msg "Configuring mythtv"
    ARCH=${CARCH/_/-}
    #disable mythlogserver due to http://code.mythtv.org/trac/ticket/11230
    ./configure --prefix=/usr \
                --cpu=${ARCH} \
                --disable-altivec \
                --disable-audio-jack \
                --disable-audio-pulseoutput \
                --disable-distcc \
                --disable-mythlogserver \
                --dvb-path=/usr/include \
                --enable-bdjava \
                --enable-libmp3lame \
                --enable-libvpx \
                --enable-libxvid \
                --enable-libx264 \
                --enable-libx265 \
                --enable-sdl \
                --enable-sdl2 \
                --python=python2 \
                --with-bindings=perl,python || return 1
    msg "Compiling mythtv"
    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/
    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

    # make mythtv log dir for old scripts that use it
    mkdir -p ${pkgdir}/var/log/mythtv
    chown 1000.1000 ${pkgdir}/var/log/mythtv

    #install recordings (was pretty)
    mkdir -p ${pkgdir}/etc/cron.hourly/
    install -m0755 ${srcdir}/recordings ${pkgdir}/etc/cron.hourly/
}

md5sums=('fb5a87c52a31168a0c8fdde72f27cc45'
         '41098e898361a5a3cde3eaae358482a8'
         '2f983590a8a3cf81f386cc65b9628e13'
         'f764758832f8e9068ffda1ac0c8aacba'
         'ab2a31dc29ff325162a4b71b49f0adca'
         '0f674b9cad031ba1e03aaf6b5ee1499f'
         '6add9c16bbb988067e82029327e567b2'
         'b0b238320fa78a4928dce2cea7c85071'
         '8e4492d1777234a021f368bd6ee964ee'
         '3d194fa65b0ec8332d09e65aefbfdc7a'
         '17452a48ef2e27740f961480449b6303'
         'd05eaf66c434a131c8efb4d87e99b402'
         '5f2bd4065b145b7b7ff09dfd6f08276c'
         '3cccbab70c7615bc47e51790e024d5bf'
         '1f0dbd44f8c1a89b86bb331086f58578'
         'abaef221b00690b329f4dca18676bcd6'
         '633cd853a89aeee5388daaad21ccec28')