# Maintainer: Jams
pkgname=mythinstall
pkgver=8.4
pkgrel=2
pkgdesc="LinHES installer/systemconfig GUI."
arch=('i686' 'x86_64')
depends=('mythtv>=0.28')
makedepends=('mythtv>=0.28')
logofiles=`ls logo*.png`
source=('install-ui.xml' $logofiles)

build() {
    msg "Copying MythVantage-app to src"
    rsync -au $startdir/MythVantage-app $srcdir

    msg "Building mythinstall"
    cd $srcdir/MythVantage-app/mythinstall && qmake-qt5
    make || exit 1
}

package() {
    install -D $srcdir/install-ui.xml $pkgdir/usr/share/mythtv/themes/default/install-ui.xml
    MVBINDIR=$pkgdir/usr/MythVantage/bin
    mkdir -p $MVBINDIR
    install -m 0755 $srcdir/MythVantage-app/mythinstall/mythinstall $MVBINDIR/MythVantage
    cd $MVBINDIR
    ln -s MythVantage mythvantage
    ln -s MythVantage mythinstall
    echo $logofiles    
    for i in $logofiles
    do
        install -D -m 0755 $srcdir/$i $pkgdir/usr/MythVantage/logos/$i
    done
}

md5sums=('39d6b7bd1ee305c5523a3cf66d4c2338'
         'c4c26977b723a4b5d6435ede73051d1b'
         '27ce7f89a83864dfc5abe23c61964c0c'
         '3291ad55fe6d7884fc732313f1cc2924'
         '80c0326a253df275afbe875a8ec14a3c'
         '2e85a1b9559557dade6e87daf2abb673'
         '532c5d9f1f8e1aef575ceecb69cc9c96'
         '91393e9cca0e6168f772fb48c88d3829'
         'f7507a6c218c81228d2a3fbcd02565bb')