Files
oscar 90eaf94580 feat: add docker-credential-helpers package
check() skips the pass and secretservice suites because they need an
initialized password store and a D-Bus keyring on the build host.
2026-07-16 17:28:58 +02:00

58 lines
1.6 KiB
Bash

# Maintainer: Oscar Wallberg <oscar.wallberg@outlook.com>
pkgname=docker-credential-helpers
pkgver=0.9.8
pkgrel=1
pkgdesc='Credential helpers for Docker (pass and secretservice)'
arch=('x86_64')
url='https://github.com/docker/docker-credential-helpers'
license=('MIT')
depends=(
'glib2'
'glibc'
'libsecret'
)
makedepends=('go')
optdepends=(
'pass: password store backend for docker-credential-pass'
)
provides=(
"docker-credential-pass=${pkgver}"
"docker-credential-secretservice=${pkgver}"
)
conflicts=(
'docker-credential-pass'
'docker-credential-pass-bin'
'docker-credential-secretservice'
'docker-credential-secretservice-bin'
)
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('7954c8bcb271021a7b3a8a992a5eb2828af3b5668659582112f2dd672c5242ba')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS='-buildmode=pie -mod=vendor -modcacherw -trimpath'
make CGO_CFLAGS="${CFLAGS} -Wno-atomic-alignment" \
VERSION="v${pkgver}" REVISION='unknown' \
build-pass build-secretservice
}
check() {
cd "${srcdir}/${pkgname}-${pkgver}"
go test -short -mod=vendor ./credentials/... ./registryurl/...
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
install -Dm755 bin/build/docker-credential-pass "${pkgdir}/usr/bin/docker-credential-pass"
install -Dm755 bin/build/docker-credential-secretservice "${pkgdir}/usr/bin/docker-credential-secretservice"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}