diff options
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 56 | ||||
-rw-r--r-- | php-xhprof.install | 11 |
3 files changed, 84 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..1df119f92882 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = php-xhprof + pkgdesc = A Hierarchical Profiler for PHP + pkgver = 0.9.4 + pkgrel = 2 + url = http://pecl.php.net/package/xhprof + install = php-xhprof.install + arch = i686 + arch = x86_64 + license = Apache + depends = php + optdepends = graphviz: to generate callgraphs in reports + backup = etc/php/conf.d/xhprof.ini + source = http://pecl.php.net/get/xhprof-0.9.4.tgz + md5sums = ab4062a7337e3bdaa2fd7065a7942b8d + +pkgname = php-xhprof + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..2d336092224c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,56 @@ +# Contributor: Sebastien Duquette <ekse.0x@gmail.com> +# Contributor: Martin Kozák <martinkozak@martinkozak.net> + +pkgname=php-xhprof +pkgver=0.9.4 +pkgrel=2 +pkgdesc="A Hierarchical Profiler for PHP" +arch=('i686' 'x86_64') +url="http://pecl.php.net/package/xhprof" +license=('Apache') +depends=('php') +makedepends=() +optdepends=('graphviz: to generate callgraphs in reports') +backup=('etc/php/conf.d/xhprof.ini') +options=() +install=php-xhprof.install +source=("http://pecl.php.net/get/xhprof-$pkgver.tgz") +md5sums=('ab4062a7337e3bdaa2fd7065a7942b8d') + +prepare() { + cd "$srcdir/xhprof-$pkgver/extension/" + + phpize || return 1 + ./configure --prefix=/usr --with-php-config=$(which php-config) + cd "$srcdir/xhprof-$pkgver/extension/" + make || return 1 +} + +package() { + cd "$srcdir/xhprof-$pkgver/extension/" + make INSTALL_ROOT="$pkgdir/" install + echo ';extension=xhprof.so' > xhprof.ini + install -D -m644 xhprof.ini "$pkgdir/etc/php/conf.d/xhprof.ini" + + # HTML Report interface + cd ".." + mkdir -p $pkgdir/usr/share/webapps/xhprof/ + cp -ra xhprof_html $pkgdir/usr/share/webapps/xhprof/ + cp -ra xhprof_lib $pkgdir/usr/share/webapps/xhprof/ + + # apache + mkdir -p $pkgdir/etc/httpd/conf/extra/ + cat >$pkgdir/etc/httpd/conf/extra/xhprof.conf <<EOF + Alias /xhprof "/usr/share/webapps/xhprof/xhprof_html" + <Directory "/usr/share/webapps/xhprof/xhprof_html"> + AllowOverride All + Options FollowSymlinks + Order allow,deny + Allow from all + php_admin_value open_basedir "/srv/:/tmp/:/usr/share/webapps/:/etc/webapps:/usr/share/pear/" + </Directory> +EOF + +} + +#Y vim:set ts=2 sw=2 et: diff --git a/php-xhprof.install b/php-xhprof.install new file mode 100644 index 000000000000..5afb6b2794b6 --- /dev/null +++ b/php-xhprof.install @@ -0,0 +1,11 @@ +post_install() { + echo ' + ==> PHP extension + + A config file was stored under /etc/php/conf.d/. In order to use this + extension make sure to uncomment it from its config file. + ' +} + +# vim:set ts=2 sw=2 et: + |