aboutsummaryrefslogtreecommitdiffstats
path: root/testing/phpspy/APKBUILD
blob: d34b99215c811b1b009b51bdaa975a0aaf01869c (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
# Maintainer: Andy Postnikov <apostnikov@gmail.com>

pkgname=phpspy
pkgver=0.5.0
_termbox_ver=1.1.2
pkgrel=0
pkgdesc="Low-overhead sampling profiler for PHP 7 "
url="https://github.com/adsr/phpspy"
arch="all"
license="MIT"
depends="perl"
makedepends="linux-headers python2"
checkdepends="ncurses bash grep php7 procps"
options="!check" # require ptrace capability and checkroot is not enough
source="$pkgname-$pkgver.tar.gz::https://github.com/adsr/phpspy/archive/v$pkgver.tar.gz
	$pkgname-termbox-$_termbox_ver.tar.gz::https://github.com/nsf/termbox/archive/v$_termbox_ver.tar.gz
	libpthread.patch
	"

prepare() {
	default_prepare
	rm -fr "$builddir/vendor/termbox"
	ln -sf "$srcdir/termbox-$_termbox_ver" "$builddir/vendor/termbox"
}

build() {
	make
}

check() {
	make TERM=xterm test
}

package() {
	make prefix="/usr" DESTDIR="$pkgdir" install
	install -D -v -m 755 stackcollapse-phpspy.pl "$pkgdir"/usr/bin/stackcollapse-phpspy
	install -D -v -m 755 vendor/flamegraph.pl "$pkgdir"/usr/bin/flamegraph-phpspy
}

sha512sums="7163a9f0a44a7dc94e9b722b403218154a27992ba4bfcdae936bdc197b8bc732f70f506318540f356467acdbfec1b0ebc868409010d367a51c056790ab81be1f  phpspy-0.5.0.tar.gz
fcb240e9aa480a0cc738f0d01e60c39ef0f333f434c0d1f2d276d3d75edd351e694fd800e0b8dbadd12be686a4261551d10d475933197ef539cdb4dd70c153cb  phpspy-termbox-1.1.2.tar.gz
e3a6a0d3943c588570406e13155671fc9e16141e202aada9178681ea2afdc98698f54120a499aab85b82f5de1d25a30afe5cea1209fc2cc7f3da6cf4486dd3b5  libpthread.patch"