oras/PKGBUILD
2023-01-03 23:10:38 +08:00

25 lines
724 B
Bash

# Maintainer: JayceCao <jaycecao520@gmail.com>
pkgname=oras
pkgver=0.16.0
pkgrel=1
pkgdesc='A command line tool that allows you to push and pull files from any OCI registry'
arch=(x86_64)
url='https://github.com/oras-project/oras'
license=(MIT)
makedepends=('go' 'git')
source=("$pkgname::git+https://github.com/oras-project/oras#commit=v$pkgver")
sha512sums=('SKIP')
build() {
# Flags to trim path from binary
export GOFLAGS="-gcflags=all=-trimpath=${PWD} -asmflags=all=-trimpath=${PWD} -ldflags=-extldflags=-zrelro -ldflags=-extldflags=-znow"
export VERSION=$pkgver
cd "$pkgname"
make build-linux-amd64
}
package() {
install -Dm 755 "$srcdir/$pkgname/bin/linux/amd64/$pkgname" "$pkgdir/usr/bin/$pkgname"
}