diff options
author | Peter Hoeg | 2016-01-17 21:48:19 +0800 |
---|---|---|
committer | Peter Hoeg | 2016-01-17 21:48:41 +0800 |
commit | ca81da328dfd146162ec95d5219cd7eab81ef4ae (patch) | |
tree | 3f943e442c7c8365303985373369b1c38df95750 | |
parent | 6623b612dae497662821264b0aea5eb14811d61e (diff) | |
download | aur-ca81da328dfd146162ec95d5219cd7eab81ef4ae.tar.gz |
wp-cli-git: r4980.ff2d57c
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 70 |
2 files changed, 24 insertions, 60 deletions
@@ -1,20 +1,18 @@ # Generated by mksrcinfo v8 -# Wed Jan 13 07:18:14 UTC 2016 +# Sun Jan 17 10:34:40 UTC 2016 pkgbase = wp-cli-git pkgdesc = A command-line tool for managing WordPress - pkgver = r4970.a2dc6e0 + pkgver = r4980.ff2d57c pkgrel = 1 url = http://wp-cli.org/ arch = any license = MIT + makedepends = git + makedepends = php-composer depends = php conflicts = wp-cli - source = git+https://github.com/wp-cli/wp-cli.git - source = https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash - source = https://raw.githubusercontent.com/wp-cli/wp-cli/a249578ae2053b88c3174b15378266c9c65a9dfe/composer.json - md5sums = SKIP - md5sums = f8acb424f1460428796451679631be86 - md5sums = 7359993f535213af66c2148ea27369b3 + source = wp-cli-git::git+https://github.com/wp-cli/wp-cli.git + sha256sums = SKIP pkgname = wp-cli-git @@ -1,32 +1,21 @@ -# We need composer from trunk for PHP7 -_composer_from_trunk=1 -_pkgname=wp-cli -pkgname=${_pkgname}-git -pkgver=r4970.a2dc6e0 +# Maintainer: Peter Hoeg <peter@hoeg.com> +# Contributor: Patrick Burroughs (Celti) <celti@celti.name> + +pkgname=wp-cli-git +pkgver=r4980.ff2d57c pkgrel=1 pkgdesc="A command-line tool for managing WordPress" url="http://wp-cli.org/" arch=('any') license=('MIT') depends=('php') -optdepends=() -if [[ $_composer_from_trunk -eq 1 ]] ; then -makedepends=('') -else -makedepends=('php-composer') -fi +makedepends=('git' 'php-composer') conflicts=('wp-cli') -replaces=() -backup=() -source=("git+https://github.com/wp-cli/${_pkgname}.git" - "https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash" - "https://raw.githubusercontent.com/wp-cli/wp-cli/a249578ae2053b88c3174b15378266c9c65a9dfe/composer.json") -md5sums=('SKIP' - 'f8acb424f1460428796451679631be86' - '7359993f535213af66c2148ea27369b3') +source=("$pkgname::git+https://github.com/wp-cli/wp-cli.git") +sha256sums=('SKIP') pkgver() { - cd ${srcdir}/${_pkgname} + cd ${pkgname} ( set -o pipefail git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" @@ -34,48 +23,25 @@ pkgver() { } prepare() { - 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: Set phar.readonly to 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: Set phar.readonly to 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 - - cd ${srcdir}/${_pkgname} + cd ${pkgname} git submodule update --init } build() { - cd "${srcdir}/${_pkgname}" - curl -sS https://getcomposer.org/installer | php - if [[ $_composer_from_trunk -eq 1 ]] ; then - php ./composer.phar update --no-interaction --prefer-dist - else - cp ../composer.json . - composer update --no-interaction --prefer-dist - fi - php -dphar.readonly=0 utils/make-phar.php wp-cli.phar --quiet + cd ${pkgname} + composer update --no-interaction --prefer-dist + php -dphar.readonly=off utils/make-phar.php wp-cli.phar --quiet } check() { - cd "${srcdir}/${_pkgname}" + cd ${pkgname} ./vendor/bin/phpunit php ./wp-cli.phar --version } package() { - cd "${srcdir}/${_pkgname}" - install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE" - install -Dm655 wp-cli.phar "$pkgdir/usr/bin/wp" - cd "$srcdir" - install -Dm644 wp-completion.bash "${pkgdir}/usr/share/bash-completion/completions/wp" + cd ${pkgname} + install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -Dm655 wp-cli.phar "${pkgdir}/usr/bin/wp" + install -Dm644 utils/wp-completion.bash "${pkgdir}/usr/share/bash-completion/completions/wp" } |