aboutsummaryrefslogtreecommitdiffstats
path: root/community/php8-pecl-xhprof/APKBUILD
blob: 444492bc0fdc00ac9a8304cfff581d6e11e9cb12 (plain) (blame)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Contributor: Andy Postnikov <apostnikov@gmail.com>
# Maintainer: Andy Postnikov <apostnikov@gmail.com>

pkgname=php8-pecl-xhprof
_extname=xhprof
pkgver=2.2.3
pkgrel=0
pkgdesc="A Hierarchical Profiler for PHP 8 - PECL"
url="https://pecl.php.net/package/xhprof"
arch="all"
license="Apache-2.0"
depends="php8-ctype"
makedepends="php8-dev"
_assetsdepends="graphviz ghostscript-fonts"
subpackages="$pkgname-assets::noarch"
source="php-pecl-$_extname-$pkgver.tar.gz::https://pecl.php.net/get/$_extname-$pkgver.tgz"
builddir="$srcdir/$_extname-$pkgver/extension"
provides="php8-xhprof=$pkgver-r$pkgrel" # for backward compatibility
replaces="php8-xhprof" # for backward compatibility

build() {
	phpize8
	./configure --with-php-config=php-config8
	make
}

check() {
	make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 TESTS=--show-diff test
}

package() {
	make INSTALL_ROOT="$pkgdir" install
	local _confdir="$pkgdir"/etc/php8/conf.d
	install -d $_confdir
	cat > $_confdir/$_extname.ini <<-EOF
		extension=$_extname
		xhprof.output_dir=/tmp
	EOF
	local _assetsdir="$pkgdir"/usr/share/php8/xhprof
	install -d $_assetsdir
	cp -R "$builddir"/../xhprof_lib $_assetsdir
}

assets() {
	pkgdesc="A Hierarchical Profiler for PHP (UI assets)"
	depends="$pkgname $_assetsdepends"
	provides="php8-xhprof-assets=$pkgver-r$pkgrel" # for backward compatibility
	replaces="php8-xhprof-assets" # for backward compatibility

	local _assetsdir="$subpkgdir"/usr/share/php8/xhprof
	install -d $_assetsdir
	cp -R "$builddir"/../xhprof_html $_assetsdir
	cp -R "$builddir"/../examples $_assetsdir
}

sha512sums="000468a7fa2a0af25004f0ffd59a8ab111a5cfa4cff275291fcbc54d3283fbf4a904b4aaeb38c2a8c7c81924bc31d9328ccf9fb7de24e20c224e014ed942efaf  php-pecl-xhprof-2.2.3.tar.gz"