aboutsummaryrefslogtreecommitdiffstats
path: root/community/docker-credential-ecr-login/APKBUILD
blob: cc7324a7be389e8ea537359bd937c7090e952921 (plain) (blame)
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
# Contributor: Ty Sarna <ty@sarna.org>
# Maintainer: Ty Sarna <ty@sarna.org>
pkgname=docker-credential-ecr-login
pkgver=0.5.0
pkgrel=1
pkgdesc="Credential helper for Docker to use the AWS Elastic Container Registry"
url="https://github.com/awslabs/amazon-ecr-credential-helper"
arch="x86_64 aarch64"
license="Apache-2.0"
depends="docker"
makedepends="go docker"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://amazon-ecr-credential-helper-releases.s3.us-east-2.amazonaws.com/$pkgver/release.tar.gz"
builddir="$srcdir/src/github.com/awslabs/amazon-ecr-credential-helper/ecr-login"
options="net"

export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw"

prepare() {
	default_prepare
	mkdir -p "$srcdir/src/github.com/awslabs/amazon-ecr-credential-helper"
	mv "$srcdir"/ecr-login "$builddir"/
}

build() {
	GOPATH="$srcdir" go build -v -o bin/$pkgname \
		-ldflags "-s -X github.com/awslabs/amazon-ecr-credential-helper/ecr-login/version.Version=$pkgver" \
		$builddir/cli/docker-credential-ecr-login
}

check() {
	GOPATH="$srcdir" go test -v -timeout 30s -short
}

package() {
	install -m750 -o root -g docker \
		-D bin/$pkgname \
		"$pkgdir"/usr/bin/$pkgname
	install -Dm644 $srcdir/docs/$pkgname.1 \
		"$pkgdir"/usr/share/man/man1/$pkgname.1
}

sha512sums="
83d74c792290d27293ce92da96466936af64e2e5c87c5b5ff98e2292c8ab6f43f6705cc07c1b6f4e13746ced13157ca76bf6c25482688e8d30198982f396a683  docker-credential-ecr-login-0.5.0.tar.gz
"