blob: f6e84d271d659b1abca54e467530c9ca368a97da (
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
|
# Maintainer: asaka <aisk1988@gmail.com>
pkgname=lean-cli-git
pkgver=r821.e6d9791
pkgrel=1
pkgdesc="LeanCloud command line tool"
arch=('i686' 'x86_64')
url="https://leancloud.cn"
license=('Apache')
groups=()
depends=()
makedepends=('git' 'go')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/leancloud/lean-cli')
md5sums=('SKIP')
pkgver() {
cd "$srcdir/${pkgname%-git}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
cd "$srcdir/${pkgname%-git}"
pwd
go build -ldflags="-X lean.pkgType=aur-git -s -w" -o lean-output ./lean/*.go
}
check() {
cd "$srcdir/${pkgname%-git}"
pwd
./lean-output --version | grep -q 'lean version'
}
package() {
cd "$srcdir/${pkgname%-git}"
install -Dm755 "lean-output" "$pkgdir/usr/bin/lean"
install -Dm644 "LICENSE.txt" "$pkgdir/usr/share/licenses/${pkgname%-git}/LICENSE.txt"
}
|