blob: 641f4da318152da0706d81bffe258676b1bd3849 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# Contributor: James An <james@jamesan.ca>
pkgname=drush-launcher-git
_pkgname=${pkgname%-git}
__pkgname=${_pkgname%-launcher}
pkgver=0.10.2.r1.gb168e45
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')
makedepends=('composer' 'git' 'php-box')
provides=("$__pkgname=${pkgver%.r*}" "$_pkgname=${pkgver%.r*}")
conflicts=("$__pkgname" "$_pkgname")
source=("$_pkgname"::"git+https://github.com/$__pkgname-ops/$_pkgname.git")
b2sums=('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/box compile
}
package() {
cd "$_pkgname"
install -Dm755 "$__pkgname.phar" "$pkgdir/usr/bin/$__pkgname"
}
|