aboutsummaryrefslogtreecommitdiffstats
path: root/testing/php7-pecl-uploadprogress/APKBUILD
blob: 78cdcf4cdea23f4f21400d9465db633170153824 (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
# Contributor: Andy Postnikov <apostnikov@gmail.com>
# Maintainer: Andy Postnikov <apostnikov@gmail.com>

pkgname=php7-pecl-uploadprogress
_pkgreal=uploadprogress
pkgver=1.1.3
pkgrel=1
pkgdesc="An extension to track progress of a file upload for PHP"
url="https://pecl.php.net/package/uploadprogress"
arch="all"
license="PHP-3.01"
depends="php7-common"
makedepends="php7-dev re2c"
subpackages="$pkgname-doc::noarch"
source="$pkgname-$pkgver.tar.gz::https://github.com/php/pecl-php-uploadprogress/archive/uploadprogress-$pkgver.tar.gz"
builddir="$srcdir/pecl-php-uploadprogress-uploadprogress-$pkgver"
provides="php7-uploadprogress=$pkgver-r$pkgrel" # for backward compatibility
replaces="php7-uploadprogress" # for backward compatibility

build() {
	phpize7
	./configure \
		--prefix=/usr \
		--with-php-config=php-config7
	make
}

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

package() {
	make INSTALL_ROOT="$pkgdir" install

	local confdir="$pkgdir/etc/php7/conf.d"
	mkdir -p "$confdir"
	echo "extension=$_pkgreal.so" > "$confdir"/$_pkgreal.ini

	local docdir="$pkgdir"/usr/share/doc/$pkgname
	install -Dm644 -t $docdir README.md
	install -Dm644 -t $docdir/examples examples/*
}

sha512sums="7c5e58ab113d52da138d0518292f8bfb0597fd7ac5b43bef4954239020670a89fc616957d1ac43dae6660752ff0b396388aff26979b989b7768927fddefea7c0  php7-pecl-uploadprogress-1.1.3.tar.gz"