aboutsummaryrefslogtreecommitdiffstats
path: root/testing/php7-uploadprogress/APKBUILD
blob: a3e1f3eb7992542e58942752d0cbc3985cb9ffee (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
43
44
45
46
47
48
# Contributor: Andy Postnikov <apostnikov@gmail.com>
# Maintainer: Andy Postnikov <apostnikov@gmail.com>

pkgname=php7-uploadprogress
_pkgreal=uploadprogress
pkgver=2.0.0
pkgrel=0
pkgdesc="An extension to track progress of a file upload for PHP"
url="https://github.com/php/pecl-php-uploadprogress"
arch="all"
license="PHP-3.01"
depends="php7-common"
makedepends="php7-dev autoconf"
subpackages="$pkgname-doc::noarch"
source="$pkgname-$pkgver.tar.gz::https://github.com/skilld-labs/pecl-php-uploadprogress/archive/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/pecl-php-uploadprogress-$_pkgreal-$pkgver"

build() {
	cd "$builddir"
	echo $builddir
	phpize7
	./configure \
		--prefix=/usr \
		--with-php-config=php-config7
	make
}

check() {
	cd "$builddir"
	make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test
	php7 -d extension="$builddir"/modules/$_pkgreal.so --ri $_pkgreal
}

package() {
	local confdir="$pkgdir/etc/php7/conf.d"
	cd "$builddir"

	make INSTALL_ROOT="$pkgdir" install

	mkdir -p "$confdir"
	echo "extension=$_pkgreal.so" > "$confdir"/$_pkgreal.ini

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname/examples/
	cp -r examples/* \
		"$pkgdir"/usr/share/doc/$pkgname/examples/
}

sha512sums="5b7596732f564d4ce68c760aacb650c1425896bc4ea57d47e5d14c985a30e0bfe4355b4e8def53303b5011f6dfe324e4e96ee9687397b5f28ac57ec55682ad09  php7-uploadprogress-2.0.0.tar.gz"