diff options
author | James An | 2018-02-16 14:07:45 -0500 |
---|---|---|
committer | James An | 2018-02-16 14:07:45 -0500 |
commit | 9c65d000a3e661c071e612535bf01c172e1d2fb2 (patch) | |
tree | ba7e334f3594a89ed1e3f4ea5ca70f54011a9d5f /PKGBUILD | |
download | aur-9c65d000a3e661c071e612535bf01c172e1d2fb2.tar.gz |
Initial commit with working PKGBUILD.
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4d44275dbb95 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: James An <james@jamesan.ca> + +pkgname=drush-launcher-git +_pkgname=${pkgname%-git} +__pkgname=${_pkgname%-launcher} +pkgver=0.5.1.r1.gace4b71 +pkgrel=1 +pkgdesc='A small wrapper around Drush for your global $PATH.' +arch=('any') +url="https://github.com/drush-ops/drush-launcher" +license=('GPL') +depends=('php-composer') +makedepends=('git' 'php-box') +provides=("$__pkgname" "$_pkgname=$pkgver") +conflicts=("$__pkgname" "$_pkgname") +source=("$_pkgname"::"git+https://github.com/$__pkgname-ops/$_pkgname.git") +md5sums=('SKIP') + +pkgver() { + cd "$_pkgname" + ( set -o pipefail + git describe --long --tag | sed -r 's/([^-]*-g)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) 2>/dev/null +} + +prepare() { + cd "$_pkgname" + + composer --no-interaction install --prefer-source +} + +build() { + cd "$_pkgname" + + php -d phar.readonly=Off /usr/bin/php-box build +} + +package() { + cd "$_pkgname" + + install -Dm755 "$__pkgname.phar" "$pkgdir/usr/bin/$__pkgname" +} |