blob: 5e0bb15feab8acce0dcd54c9b004df866f5a30fe (
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
48
|
# Maintainer: Jeff Henson <jeff@henson.io>
# Old Maintainer: David Runge <dvzrv@archlinux.org>
pkgname=jfrog-cli
pkgver=2.40.0
pkgrel=2
pkgdesc="Simple interface to Artifactory, Bintray and Mission Control"
arch=('x86_64')
url="https://github.com/jfrog/jfrog-cli"
license=('Apache')
depends=('glibc')
conflicts=('jfrog-cli-go')
replaces=('jfrog-cli-go')
makedepends=('go')
source=("$pkgname-$pkgver.tar.gz::https://github.com/jfrog/${pkgname}/archive/v${pkgver}.tar.gz")
sha512sums=('e2658750605007fcf277b5acfd73f85f2125b4ad3030917af14e985e333496da14141c11b4c4cba67692b81e744a3515a5939e728010a75f80e37cd86f67c684')
_cli_name=jf
build() {
cd "${pkgname}-${pkgver}"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
go build -o ${_cli_name}
}
package() {
cd "${pkgname}-${pkgver}"
install -vDm 755 ${_cli_name} -t "${pkgdir}/usr/bin/"
ln -rs "${pkgdir}/usr/bin/${_cli_name}" "${pkgdir}/usr/bin/jfrog"
install -vDm 644 {README,RELEASE}.md -t "${pkgdir}/usr/share/doc/${pkgname}/"
install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
# build bash completions
mkdir -p "${pkgdir}/usr/share/bash-completion/completions"
./${_cli_name} completion bash > "${pkgdir}/usr/share/bash-completion/completions/${_cli_name}"
# build zsh completions
mkdir -p "${pkgdir}/usr/share/zsh/site-functions"
./${_cli_name} completion zsh > "${pkgdir}/usr/share/zsh/site-functions/_${_cli_name}"
# build fish completions
mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
./${_cli_name} completion fish > "${pkgdir}/usr/share/fish/vendor_completions.d/${_cli_name}.fish"
echo "complete -c jfrog -w ${_cli_name}" > "${pkgdir}/usr/share/fish/vendor_completions.d/jfrog.fish"
}
|