oras/PKGBUILD

27 lines
877 B
Text
Raw Normal View History

2024-09-10 10:35:11 +00:00
# Maintainer: Knut Ahlers <knut@ahlers.me>
# Contributor: JayceCao <jaycecao520@gmail.com>
2019-07-13 21:36:06 +00:00
pkgname=oras
2024-09-10 10:35:11 +00:00
pkgver=1.2.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')
2024-09-10 10:35:11 +00:00
source=("$pkgname-${pkgver}.tgz::https://github.com/oras-project/oras/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('1f3fc661c90cfb48b4b0e6ef4817b86b28c784186ab0da1a778809938899f574')
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
2024-09-10 10:35:11 +00:00
cd "$pkgname-${pkgver}"
2023-01-03 15:02:49 +00:00
make build-linux-amd64
2019-07-13 21:36:06 +00:00
}
package() {
2024-09-10 10:35:11 +00:00
install -Dm 755 "$srcdir/$pkgname-${pkgver}/bin/linux/amd64/$pkgname" "$pkgdir/usr/bin/$pkgname"
2019-07-13 21:36:06 +00:00
}