oras/PKGBUILD
2023-06-19 21:00:22 +08:00

25 lines
723 B
Bash

# Maintainer: JayceCao <jaycecao520@gmail.com>
pkgname=oras
pkgver=1.0.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"
}