summaryrefslogtreecommitdiffstats
path: root/abs/core/linhes-theme/PKGBUILD
blob: 7660af905ebee7274fd39715dc247e48a782ead7 (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
pkgname=linhes-theme
pkgver=8.4
pkgrel=10
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' 'notification-ui.xml.patch'
         'schedule-ui.xml.patch' 'qtlook.txt.patch'
         'recordings-ui.xml.patch' 'video-ui.xml.patch')

#The LinHES theme is based on TintedGlass 4.56 by Harley Peters
source=(`echo ${patches[@]:0}` 'themeinfo.xml' 'install-ui.xml' 'osd_subtitle.xml'
        'bubble_background.png' 'preview.png' 'blank_coverart.png'
        'checkmark.png' 'error.png' 'gears.png' 'question.png' 'warning.png'
        'progdetails_page1.html'
        'LHLogo.png' 'LHLogoAndText.png')
install=$pkgname.install

prepare() {
    _gitroot="https://github.com/MythTV-Themes/TintedGlass.git"
    _gitname="TintedGlass"
    _gitbranch="fixes/0.27"

    cd $srcdir
    if [ -d $_gitname ]
    then
        cd $_gitname 
        git checkout $_gitbranch
        git pull
        msg "TintedGlass local files updated."
    else
        git clone -b $_gitbranch $_gitroot
        msg "TintedGlass git checkout done."
    fi
}

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/
    rsync -pL $srcdir/progdetails_page1.html $pkgdir/$THEMEROOT/LinHES/htmls/
    rsync -pL $srcdir/progdetails_page1.html $pkgdir/$THEMEROOT/LinHES/htmls/progdetails_page2.html
    rm -r $pkgdir/$THEMEROOT/LinHES/images/backgrounds/*
    rsync -pL $srcdir/bubble_background.png $pkgdir/$THEMEROOT/LinHES/images/backgrounds/background.png
    rsync -pL $srcdir/blank_coverart.png $pkgdir/$THEMEROOT/LinHES/images/
    rsync -pL $srcdir/checkmark.png $pkgdir/$THEMEROOT/LinHES/images/
    rsync -pL $srcdir/error.png $pkgdir/$THEMEROOT/LinHES/images/
    rsync -pL $srcdir/gears.png $pkgdir/$THEMEROOT/LinHES/images/
    rsync -pL $srcdir/question.png $pkgdir/$THEMEROOT/LinHES/images/
    rsync -pL $srcdir/warning.png $pkgdir/$THEMEROOT/LinHES/images/
    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/
    rsync -pL $srcdir/LHLogoAndText.png $pkgdir/$THEMEROOT/LinHES/images/

    #vertical menu
    mv $pkgdir/$THEMEROOT/LinHES/menu-ui-vert.xml $pkgdir/$THEMEROOT/LinHES/menu-ui.xml

    msg "Modifying yellows and blue to LinHES yellow and blue"
    #yellow
    grep -lr '#d9d900' $pkgdir/$THEMEROOT/LinHES/ | xargs sed -i "s/\#d9d900/\#ebb81c/g" || return 0
    #darkyellow
    grep -lr '#CCCC29' $pkgdir/$THEMEROOT/LinHES/ | xargs sed -i "s/\#CCCC29/\#ebb81c/g" || return 0
    #blue
    grep -lr '#3a9ade' $pkgdir/$THEMEROOT/LinHES/ | xargs sed -i "s/\#3a9ade/\#0072bc/g" || return 0

    msg "Modifying fonts to Overlock"
    grep -lr 'DejaVu Sans' $pkgdir/$THEMEROOT/LinHES/ | xargs sed -i "s/\DejaVu Sans/\Overlock/g"

    msg "Updating themeinfo.xml version number"
    IFS="." read -a array <<< "$pkgver"
    sed -i "s/MAJ_VER/${array[0]}/" $pkgdir/$THEMEROOT/LinHES/themeinfo.xml
    sed -i "s/MIN_VER/${array[1]}${pkgrel}/" $pkgdir/$THEMEROOT/LinHES/themeinfo.xml
}
md5sums=('2dca856c2a4d1f959473512c94e43b60'
         '0383edbb16b0d15f47492cde738f164b'
         'f2b9c85519e80843294315a42870e582'
         '43b1f213fd392fb07aac503e775e27bc'
         '80bb72994eca59ca6dc9034ac185e7cc'
         '22ff4044c8c29560451fb51dcbf4d44e'
         '9fe3371a8b964a7028126405cfaa330b'
         'e88dc1587a164aaa15b280cb66f6a82b'
         '59b43ab3c40390ad4184883a5e23a16a'
         '5a8fb2a5f0e657d52be6f0a6a006ce72'
         '35d77d91125e46728a30ab23d0903223'
         'bfc32b9fa5dca3d46dd6f365ecb449b5'
         '326a71eb795b322a9ea26f116d890c87'
         '8fcd0acc11f4db33a9442949fb1a293d'
         '699e3abe05523f454db3561bfc08b4b2'
         '60cb915909c477dbc2e18233ee6424d9'
         '30ea7d2001b8562177b8f85f34f050a2'
         'e8dee86a10ce7c4423a97305b38b4668'
         'e8ac15e38b3dc99c9e889e439ba356de'
         'e8cf0d3a55ba3be47deae55c05432141'
         '58834fbee0230c713802c61e635cbab0'
         'b51ef0cbf8ed2d3a8c1a8257a89aceff'
         '09ad14842f828b7a8d24070ec8214fe5')