summaryrefslogtreecommitdiffstats
path: root/abs/core/mythtv/stable-0.25/mythweb/PKGBUILD
blob: 7c0cc8db1c7e797c5c7cc7b1caff0a07c952c1cb (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
pkgname=mythweb
pkgver=0.25
pkgrel=5

commit_hash=`cat ../git_src/git_hash_web`

pkgdesc="Web interface for MythTV's backend, $commit_hash"
url="http://www.mythtv.org"
license="GPL"
arch=('i686' 'x86_64')

depends=('mythtv>=0.25' 'lighttpd' 'php' 'local-website')
groups=('mythtv-extras')
install=mythweb.install
#http://code.mythtv.org/trac/ticket/10504
patches=(schedules.php.patch  sorting.php.patch  tv-schedules.php.patch)
source=(`echo ${patches[@]:0}` mythweb.include)

DOCROOT=/data/srv/httpd/mythweb
build() {

   if [ -e ${srcdir}/mythweb ]
      then
          rm -rf ${srcdir}/mythweb
      fi

      cd ${startdir}
      msg "copy in myth web src"
      cp -rp ../git_src/mythweb $srcdir
      cd ${srcdir}/${pkgbase}



    msg "The local files are updated."


	cd $startdir/src/mythweb



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

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

	mkdir -p $startdir/pkg/$DOCROOT/{image_cache,php_sessions,data}
        rsync -arp --exclude .git --delete-excluded  $startdir/src/mythweb/* $startdir/pkg/$DOCROOT
	rm $startdir/pkg/$DOCROOT/README
	chown -R http:http $startdir/pkg/$DOCROOT
	chmod g+rw $pkgdir/$DOCROOT/{image_cache,php_sessions,data}

        # mythweb modules_path fix for 0.24
        # http://code.mythtv.org/trac/ticket/9255
        cd ${pkgdir}/${DOCROOT}
        ln -s modules modules_path

    #install conf files for lighttpd
    mkdir -p $pkgdir/etc/lighttpd
    install -D -m 644 $srcdir/mythweb.include          $pkgdir/etc/lighttpd/

}
md5sums=('392e570594859c026ac12194920246d8'
         '53cc59d6a8bf144027b25d5dcbfffc66'
         '515e29fda503c199888a91553e1815a0'
         '7645a6399434cbba35639713ac5d88e0')