updated on Wed Jan 25 16:08:47 UTC 2012
[aur-mirror.git] / php-xhprof / PKGBUILD
blobe2e96f0d063454b056c86ea6363f3f38f89e8a9a
1 # Contributor: Sebastien Duquette <ekse.0x@gmail.com>
2 pkgname=php-xhprof
3 pkgver=0.9.2
4 pkgrel=1
5 pkgdesc="A Hierarchical Profiler for PHP"
6 arch=('i686' 'x86_64')
7 url="http://pecl.php.net/package/xhprof"
8 license=('Apache')
9 depends=('php')
10 makedepends=()
11 optdepends=('graphviz: to generate callgraphs in reports')
12 backup=('etc/php/conf.d/xhprof.ini')
13 options=()
14 install=php-xhprof.install
15 source=("http://pecl.php.net/get/xhprof-$pkgver.tgz")
16 md5sums=('ae40b153d157e6369a32e2c1a59a61ec')
18 build() {
19   cd "$srcdir/xhprof-$pkgver/extension/"
21   phpize || return 1 
22   ./configure --prefix=/usr --with-php-config=$(which php-config)
23   make || return 1
24   make INSTALL_ROOT="$pkgdir/" install
25   echo ';extension=xhprof.so' > xhprof.ini
26   install -D -m644 xhprof.ini "$pkgdir/etc/php/conf.d/xhprof.ini"
28   # HTML Report interface
29   cd ".."
30   mkdir -p $pkgdir/usr/share/webapps/xhprof/
31   cp -ra xhprof_html $pkgdir/usr/share/webapps/xhprof/
32   cp -ra xhprof_lib $pkgdir/usr/share/webapps/xhprof/
34   # apache
35   mkdir -p $pkgdir/etc/webapps/xhprof/
36   cat >$pkgdir/etc/webapps/xhprof/xhprof.example.conf <<EOF
37         Alias /xhprof "/usr/share/webapps/xhprof/xhprof_html"
38         <Directory "/usr/share/webapps/xhprof/xhprof_html">
39                 AllowOverride All
40                 Options FollowSymlinks
41                 Order allow,deny
42                 Allow from all
43         </Directory>
44 EOF
48 #Y vim:set ts=2 sw=2 et: