blob: a0220d714eaf2f6cda4d3a45c878e1dea95f10d9 (
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
49
50
51
52
53
54
55
|
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>
pkgname=cosign-git
pkgver=2.0.1.r9.ga8f57b66
pkgrel=1
pkgdesc="Container Signing, Verification and Storage in an OCI registry"
arch=('i686' 'x86_64')
url="https://github.com/sigstore/cosign"
license=('Apache')
depends=('glibc' 'pcsclite')
makedepends=('git' 'go')
provides=("cosign=$pkgver")
conflicts=('cosign')
source=("git+https://github.com/sigstore/cosign.git")
sha256sums=('SKIP')
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -ldflags=-linkmode=external -trimpath -mod=readonly -modcacherw"
pkgver() {
cd "cosign"
_tag=$(git tag -l --sort -v:refname | sed '/rc[0-9]*/d' | head -n1)
_rev=$(git rev-list --count $_tag..HEAD)
_hash=$(git rev-parse --short HEAD)
printf "%s.r%s.g%s" "$_tag" "$_rev" "$_hash" | sed 's/^v//'
}
check() {
cd "cosign"
GODEBUG=x509sha1=1 \
go test \
./...
}
package() {
cd "cosign"
GOBIN="$pkgdir/usr/bin" \
go install ./cmd/cosign
install -d \
"$pkgdir/usr/share/bash-completion/completions" \
"$pkgdir/usr/share/fish/vendor_completions.d" \
"$pkgdir/usr/share/zsh/site-functions"
"$pkgdir/usr/bin/cosign" completion bash > "$pkgdir/usr/share/bash-completion/completions/cosign"
"$pkgdir/usr/bin/cosign" completion fish > "$pkgdir/usr/share/fish/vendor_completions.d/cosign.fish"
"$pkgdir/usr/bin/cosign" completion zsh > "$pkgdir/usr/share/zsh/site-functions/_cosign"
}
|