summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMatt Fields2015-09-12 16:12:35 -0400
committerMatt Fields2015-09-12 16:12:35 -0400
commit691fbfe97bff89e4b5e39e21ce6cdb354947f3e5 (patch)
treee2e678742ccfdfb99fef0d032305836a2413e992 /PKGBUILD
parentee2ad79496e2912dca8febc598ef3755f5e3a405 (diff)
downloadaur-691fbfe97bff89e4b5e39e21ce6cdb354947f3e5.tar.gz
Updated to wp-cli:0.20.0, added php-composer as makedepends, sanity checks on php settings
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD27
1 files changed, 20 insertions, 7 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 9ea5409b0926..fe8f6e56d317 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,5 +1,5 @@
pkgname=wp-cli
-pkgver=0.19.2
+pkgver=0.20.0
pkgrel=1
pkgdesc="A command-line tool for managing WordPress"
url="http://wp-cli.org/"
@@ -7,23 +7,36 @@ arch=('any')
license=('MIT')
depends=('php')
optdepends=()
-makedepends=()
+makedepends=('php-composer')
conflicts=()
replaces=()
backup=()
source=("https://github.com/wp-cli/wp-cli/archive/v${pkgver}.tar.gz"
"https://raw.githubusercontent.com/wp-cli/wp-cli/v${pkgver}/utils/wp-completion.bash")
-md5sums=('a1f59e3264a19e656d0e7c8223dadcce'
- '696410d404d8c0ad2e10a223302effe6')
+md5sums=('ed540f7929b5480ab3e533bd1a91f57a'
+ 'f8acb424f1460428796451679631be86')
prepare() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- curl -sS https://getcomposer.org/installer | php
+ if [[ -n $(php -r '$phar = new Phar("test.phar", 0,"wp-cli.phar");' 2>&1 | grep "Class 'Phar' not found") ]]; then
+ echo "Error: Phar extension not found! Enable the phar extension in your php.ini"
+ echo "Also be sure to disable the readonly setting for the phar extension: phar.readonly = Off"
+ return 1
+ fi
+
+ if [[ -n $(php -r '$phar = new Phar("test.phar", 0,"wp-cli.phar");' 2>&1 | grep "phar.readonly") ]]; then
+ echo "Error: Phar readonly setting is enabled!"
+ echo "Disable the readonly setting for the phar extension in your php.ini: phar.readonly = Off"
+ return 1
+ fi
+
+ if [[ -n $(php -r 'echo ini_get("open_basedir");') ]]; then
+ echo "Warning: open_basedir is enabled and likely to cause errors with wp-cli"
+ fi
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
- php ./composer.phar install --no-interaction --prefer-dist
+ composer install --no-interaction --prefer-dist
php -dphar.readonly=0 utils/make-phar.php wp-cli.phar --quiet
}