diff options
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 46 |
3 files changed, 67 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..8bfb599d52db --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = php-stat-git + pkgdesc = A super modern high performance profiler for production + pkgver = r3.efa08c7 + pkgrel = 1 + url = https://github.com/krakjoe/stat + arch = i686 + arch = x86_64 + license = PHP + makedepends = git + depends = php + backup = etc/php/conf.d/stat.ini + source = git://github.com/krakjoe/stat.git + md5sums = SKIP + +pkgname = php-stat-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..932f35e10036 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +!.gitignore +php-stat-git* +stat/ +src/ +pkg/ diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..07eb11256f19 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Boris Momčilović <boris.momcilovic@gmail.com> + +_pkgname=stat +pkgname=php-$_pkgname-git +pkgver=r3.efa08c7 +pkgrel=1 +pkgdesc="A super modern high performance profiler for production" +arch=('i686' 'x86_64') +url="https://github.com/krakjoe/stat" +license=('PHP') +depends=('php') +makedepends=('git') +source=(git://github.com/krakjoe/stat.git) +md5sums=('SKIP') +_ininame="stat.ini" +_inifile="etc/php/conf.d/$_ininame" +backup=("$_inifile") + +pkgver() { + cd "$_pkgname" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd "$srcdir/$_pkgname" + + phpize + ./configure --prefix=/usr + make + #TEST_PHP_EXECUTABLE=`which php` php run-tests.php +} + +package() { + cd "$srcdir/$_pkgname" + make PREFIX=/usr INSTALL_ROOT="$pkgdir" install + cat >> "$_ininame" <<EOF +;zend_extension=stat.so +;stat.slots = 10000 # Set to the maximum number of samples in the buffer +;stat.strings = 32M # Set size of string buffer (supports suffixes, be generous) +;stat.socket = /path/to/zend.tombs.socket # Set path to socket, setting to 0 disables socket +;stat.interval = 0 # Set interval for sampling in microseconds +;stat.dump = 0 # Set to a file descriptor for dump on shutdown +EOF + + install -vDm644 "$_ininame" "$pkgdir/$_inifile" +} |