summaryrefslogtreecommitdiffstats
path: root/abs/extra/mythexpress/PKGBUILD
blob: 229e28a24333720a77cf02de4ad3c0537406d604 (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
pkgname=mythexpress
pkgver=20160427
pkgrel=1
pkgdesc="MythExpress is a browser-based interface to MythTV HTTP streaming capability"
arch=('i686' 'x86_64')
url="https://github.com/MythTV-Clients/MythExpress"
license=('GPL3')
depends=('nodejs' 'avahi')
makedepends=('git')
install=mythexpress.install
source=('mythexpress.html' 'mythprotocol.js.patch')

_gitroot="https://github.com/MythTV-Clients/MythExpress.git"
_gitname=MythExpress

build() {
    cd "${srcdir}"

    if [ ! -d "${srcdir}/${_gitname}" ]; then
        git clone ${_gitroot}
    else
        cd ${_gitname} && git pull origin
    fi

    msg "GIT checkout done."


    cd "${srcdir}"
    if [ -e ${_gitname}-build ]
    then
        rm -rf ${_gitname}-build
    fi
    cp -rf "${_gitname}" "${_gitname}-build"

    patch -Np1 -i ${srcdir}/mythprotocol.js.patch

    cd "${srcdir}/${_gitname}-build"
    npm install || exit 1

}

package() {
    cd "${srcdir}"
    mkdir -p $pkgdir/usr/$pkgname
    rsync -arvp --exclude .git  ${_gitname}-build/  $pkgdir/usr/${pkgname}
    cd "${srcdir}"
    install -m755 -D mythexpress.html $pkgdir/data/srv/httpd/htdocs/mythexpress.html
}
md5sums=('568ee396fc2af9fd7cc3433fce7a3a87'
         'd5d20eb47e9dffb238e60173810bd24b')