summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD10
1 files changed, 8 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 281b834412a7..90c53d0a8342 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,17 +11,23 @@ license="MIT"
arch=("any")
depends=("php>=5.3.6")
makedepends=("php-box" "php-composer")
-install="${pkgname}.install"
source=("https://github.com/FriendsOfPHP/${_pkgname}/archive/v${pkgver}.tar.gz")
sha512sums=('337eeb18b9d6ab41fda772bb3372467a6093a153f336f804b2d2ca1b4631e1ea99fdc2ac690780003e911da4a24942052fd00d1daa0129abe10d459f93b9c1d4')
build() {
cd "${srcdir}/${_pkgname}-${pkgver}"
- composer install --prefer-dist --no-dev
+ php -d extension=phar.so /usr/bin/composer install --prefer-dist --no-dev
sed -i '/git-commit/d' box.json
php -d extension=phar.so -d phar.readonly=Off -d display_errors=Off /usr/bin/php-box build
}
+check() {
+ if ! php -i | grep 'PHP Archive support => enabled' >/dev/null 2>&1; then
+ echo -e "\e[1;31m Warning: phar.so must be loaded in your php.ini to install and use ${pkgname}\e[0m"
+ exit 1
+ fi
+}
+
package() {
cd "${srcdir}/${_pkgname}-${pkgver}"
install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"