aboutsummaryrefslogblamecommitdiffstats
path: root/testing/php7-snappy/APKBUILD
blob: a1924858dc4fa2dbf198f1d508279e5f85dffab4 (plain) (tree)
1
2
3
4
5
6
7
8
9


                                                    

               


                                             
          

                     

                                                                                                     











                                               





                                                                    





                                               
                                                              

 
                                                                                                                                                                      
# Contributor: Andy Postnikov <apostnikov@gmail.com>
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=php7-snappy
_extname=snappy
pkgver=0.2.1
pkgrel=0
pkgdesc="Snappy Extension for PHP"
url="https://github.com/kjdev/php-ext-snappy"
arch="all"
license="PHP-3.01"
depends="php7-common"
makedepends="php7-dev php7-pecl-apcu snappy-dev"
source="php-$_extname-$pkgver.tar.gz::https://github.com/kjdev/php-ext-snappy/archive/$pkgver.tar.gz"
builddir="$srcdir/php-ext-snappy-$pkgver"

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

check() {
	local _modules=/usr/lib/php7/modules
	make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test \
		SKIP_ONLINE_TESTS=1 PHP_TEST_SHARED_EXTENSIONS=" \
		-d extension=$_modules/apcu.so \
		-d extension=modules/$_extname.so" TESTS=--show-diff
	php7 -d extension=modules/$_extname.so --ri $_extname
}

package() {
	make INSTALL_ROOT="$pkgdir"/ install
	local confdir="$pkgdir"/etc/php7/conf.d
	install -d $confdir
	echo "extension=$_extname" > $confdir/50_$_extname.ini
}

sha512sums="51cdfe7c5d020cb954cbf555038aca8398867584a587eb838f07089612d3978a182d0bc04015608a2aaf71bf9a5b5896e5d92b56f3b2d5fe9e1116f9509acb1e  php-snappy-0.2.1.tar.gz"