updated on Sun Jan 22 20:01:29 UTC 2012
[aur-mirror.git] / webgrind / PKGBUILD
blobde4950457974dc22ee55f60c9153fd758eeb9d2c
1 # Maintainer: Julio Napurí <julionc@gmail.com>
2 pkgname=webgrind
3 pkgver=1.0
4 pkgrel=1
5 pkgdesc='Xdebug Profiling Web Frontend in PHP.'
6 arch=('any')
7 url='http://code.google.com/p/webgrind/'
8 license=('BSD')
9 depends=('php' 'xdebug' 'php-apache')
10 install="${pkgname}.install"
11 source=("http://webgrind.googlecode.com/files/webgrind-release-${pkgver}.zip")
12 md5sums=('66ce2840eecd315052aa6d194dccb659')
14 build() {
15   mkdir -p "${pkgdir}/usr/share/webapps/webgrind"
16   mkdir -p "${pkgdir}/etc/webapps/webgrind"
18   cd "${srcdir}/webgrind"
19   sed -e 's#config.php#./config.php#g' -i index.php
20   sed -e 's#library/FileHandler.php#./library/FileHandler.php#g' -i index.php
22   install -D -m644 license.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
23   cp config.php  "${pkgdir}/etc/webapps/webgrind/config.sample.php"
24   cp ${pkgdir}/etc/webapps/webgrind/config.sample.php ${pkgdir}/etc/webapps/webgrind/config.php
25   rm config.php
26   cp -R . "${pkgdir}/usr/share/webapps/webgrind"
27   ln -s  /etc/webapps/webgrind/config.php "${pkgdir}/usr/share/webapps/webgrind/config.php"
28   
29   echo "deny from all" >$pkgdir/etc/webapps/webgrind/.htaccess
30   cat >${pkgdir}/etc/webapps/webgrind/apache.example.conf <<EOF
31         Alias /webgrind "/usr/share/webapps/webgrind"
32         <Directory "/usr/share/webapps/webgrind">
33                 AllowOverride All
34                 Options FollowSymlinks
35                 Order allow,deny
36                 Allow from all
37         </Directory>
38 EOF