oras/PKGBUILD

26 lines
723 B
Text
Raw Normal View History

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