2021-11-25 23:33:38 +00:00
|
|
|
# Maintainer: Xuanwo <xuanwo@archlinuxcn.org>
|
2019-07-13 21:36:06 +00:00
|
|
|
pkgname=oras
|
2021-11-25 23:33:38 +00:00
|
|
|
pkgver=0.12.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)
|
|
|
|
url='https://github.com/deislabs/oras'
|
|
|
|
license=(MIT)
|
2021-01-22 16:29:13 +00:00
|
|
|
makedepends=('go' 'git')
|
2021-11-25 23:33:38 +00:00
|
|
|
source=("$pkgname-$pkgver.tar.gz::https://github.com/oras-project/oras/archive/v$pkgver.tar.gz")
|
|
|
|
sha512sums=('589324805c38f485ecb0122e35984cd6d7b87150c2e67d36bb3ca759750b9ccc9a4803aea9c56c4cbbfb19c914fe7a077d9d091b70b54babc446ac01d3bc2091')
|
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
|
|
|
|
|
|
|
cd $pkgname-$pkgver
|
2021-11-25 23:33:38 +00:00
|
|
|
GOARCH=amd64 CGO_ENABLED=0 GOOS=linux go build \
|
|
|
|
-o bin/linux/amd64/oras github.com/oras-project/oras/cmd/oras
|
2019-07-13 21:36:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
install -Dm 755 "$srcdir/$pkgname-$pkgver/bin/linux/amd64/$pkgname" "$pkgdir/usr/bin/$pkgname"
|
|
|
|
}
|