blob: 405e9b94c8eef1d0e903bab808b8e67d0608fe58 (
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
44
45
46
47
|
# Maintainer: Roman Kvasnytskyi <culidesta@gmail.com>
pkgname=cartridge-cli-git
pkgrel=1
pkgver=2.4.0.r2.g55a16ec
pkgdesc='Tarantool Cartridge command-line utility'
arch=('x86_64')
url="https://tarantool.io/"
license=('BSD')
makedepends=('git' 'go' 'tarantool')
depends=('tarantool')
source=('cartridge-cli-git::git+https://github.com/tarantool/cartridge-cli/#branch=master')
sha256sums=('SKIP')
prepare(){
cd "$pkgname"
mkdir -p build/
}
pkgver() {
cd "$pkgname"
git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd "$pkgname"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -modcacherw"
go mod download
go build -o ./build "./cli/..."
}
check() {
printf "SKIP\n"
}
package() {
cd "$pkgname"
install -Dm755 ./build/cli "$pkgdir"/usr/bin/cartridge
# License is BSD 2 clause type and needs to be installed
install -m755 -d "${pkgdir}/usr/share/licenses/cartridge"
install -m644 "${srcdir}/${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/cartridge/"
}
|