summaryrefslogtreecommitdiffstats
path: root/abs/core/linhes-theme/PKGBUILD
blob: cc584c8d1e17ae77a41afaa41f3760da80c5780f (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
pkgname=linhes-theme
pkgver=8.1
pkgrel=13
pkgdesc="Default LinHES MythTV theme"
arch=('i686' 'x86_64')
license=('GPL2')
url="http://linhes.org/"

patches=('readme.txt.patch' 'osd.xml.patch' 'base.xml.patch'
         'menu-ui-vert.xml.patch' 'recordings-ui.xml.patch' 'schedule-ui.xml.patch'
         'video-ui.xml.patch' 'config-ui.xml.patch')

#The LinHES theme is based on TintedGlass by Harley Peters
source=("git://github.com/MythTV-Themes/TintedGlass.git#branch=fixes/0.27"
        `echo ${patches[@]:0}` 'themeinfo.xml' 'install-ui.xml'
        'background.png' 'preview.png' 'qt-background.png' 'tux_thoughts.png'
        'LHLogo.png' 'LHLogoAndText.png')

package() {
    THEMEROOT=usr/share/mythtv/themes

    msg "Copying theme to package"
    mkdir -p $pkgdir/$THEMEROOT/LinHES/
    rsync -arp --exclude .git* --delete-excluded $srcdir/TintedGlass/* $pkgdir/$THEMEROOT/LinHES/

    msg "--------------------------applying patches------------------------------"
    cd $pkgdir/$THEMEROOT/LinHES/
    for i in `echo ${patches[@]:0}`
    do
        echo applying $i
        patch -N -i ${srcdir}/$i || return 1
        echo "-----------------------------"
    done
    cd $startdir
    msg "--------------------------done applying patches-------------------------"

    msg "Copy *.xml and adding backgrounds and images for LinHES"
    rsync -pL $srcdir/*.xml $pkgdir/$THEMEROOT/LinHES/
    rm -r $pkgdir/$THEMEROOT/LinHES/images/backgrounds/*
    rsync -pL $srcdir/*background.png $pkgdir/$THEMEROOT/LinHES/images/backgrounds/
    rsync -pL $srcdir/preview.png $pkgdir/$THEMEROOT/LinHES/

    #tux_thoughts.png is the thought bubble for the menu descriptions
    rsync -pL $srcdir/tux_thoughts.png $pkgdir/$THEMEROOT/LinHES/images/
    rsync -pL $srcdir/LHLogo*.png $pkgdir/$THEMEROOT/LinHES/images/

    msg "Modifying yellows and blue to LinHES yellow and blue"
    #yellow
    grep -lr '#d9d900' $pkgdir/$THEMEROOT/LinHES/ | xargs sed -i "s/\#d9d900/\#ebb81c/g"
    #darkyellow
    grep -lr '#CCCC29' $pkgdir/$THEMEROOT/LinHES/ | xargs sed -i "s/\#CCCC29/\#ebb81c/g"
    #blue
    grep -lr '#3a9ade' $pkgdir/$THEMEROOT/LinHES/ | xargs sed -i "s/\#3a9ade/\#0072bc/g"
}
md5sums=('SKIP'
         '9c2fc68864cbedb6e449056972b457aa'
         'e061490fc869e0e14d4e144c17c3ec56'
         'abf14a78424114b6d9ba1d9e58ab754d'
         'c876f3fc191ba564b760268c86c967f1'
         '33609e27406f00bdc0243a5ef840c6f9'
         'aff82cf901edc4baa058013d93610cfc'
         'e502da82e6d76b3f43dd7ddc20c1e2e7'
         '78b64e567cd799df52045d9fc5a59cc0'
         '7d7bc458a8f4af408700609f3e1f412e'
         '909d7a8114436dcfc28a01d0d97ec11f'
         'cbe5f663ebb5d51abe811f81dafec303'
         '4b1c27297bb5f8d9d7bbaf72b35130b5'
         '12d26a786fde397348653128a6d7676a'
         '2bd09b8049aaf5ba21db5baf3a0ce077'
         'b51ef0cbf8ed2d3a8c1a8257a89aceff'
         '09ad14842f828b7a8d24070ec8214fe5')