summaryrefslogtreecommitdiffstats
path: root/abs/core/mythtv/stable-29/mythweb/PKGBUILD
blob: a32f03986ae9d160ded16438f6116a58c12f468a (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
pkgname=mythweb
pkgver=29
pkgrel=4
commit_hash=`cat ../git_src/git_hash_web`
pkgdesc="Web interface for MythTV's backend, $commit_hash"
arch=('x86_64')
url="http://www.mythtv.org"
license=('GPL')
depends=('lighttpd' "mythtv>=${pkgver}" 'php' 'supplemental-web')
groups=('mythtv-extras')
install=mythweb.install

patches=('FixPHPWarnings_13260.patch'
         'video.css.patch')
source=(`echo ${patches[@]:0}` 
        'mythweb.include'
        'mythweb_gen_light.conf')

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

    cd ${startdir}
    msg "Copying in mythweb git_src"
    cp -rp ../git_src/mythweb $srcdir
    cd ${srcdir}/$pkgname

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

	[ "$CARCH" = "x86_64" ] && ARCH="x86-64"
}

package() {
    DOCROOT=/data/srv/httpd/mythweb
	mkdir -p $pkgdir/$DOCROOT/{image_cache,php_sessions,data}
    rsync -arp --exclude .git* --delete-excluded  $srcdir/mythweb/* $pkgdir/$DOCROOT
	rm $pkgdir/$DOCROOT/README
	chown -R http:http $pkgdir/$DOCROOT
	chmod -R 775 $pkgdir/$DOCROOT/{image_cache,php_sessions,data}

    #install conf files for lighttpd
    mkdir -p $pkgdir/etc/lighttpd
    install -D -m 644 $srcdir/mythweb.include $pkgdir/etc/lighttpd/
    #gen_light_conf
    install -D -m0744 ${srcdir}/mythweb_gen_light.conf ${pkgdir}/etc/gen_light_conf.d/mythweb.conf
}
md5sums=('df80362c995ddfcf6a2119b83d26b2b4'
         '668a36e404c8254f56e7a7304e655332'
         '7645a6399434cbba35639713ac5d88e0'
         'df190116b3aba35720fb6631885f973f')