Date: Friday, December 31, 2021 @ 15:21:39 Author: hashworks Revision: 1090365
Initial commit Added: opensearch-cli/ opensearch-cli/repos/ opensearch-cli/trunk/ opensearch-cli/trunk/PKGBUILD ----------+ PKGBUILD | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) Added: opensearch-cli/trunk/PKGBUILD =================================================================== --- opensearch-cli/trunk/PKGBUILD (rev 0) +++ opensearch-cli/trunk/PKGBUILD 2021-12-31 15:21:39 UTC (rev 1090365) @@ -0,0 +1,40 @@ +# Maintainer: Justin Kromlinger <hashwo...@archlinux.org> + +pkgname='opensearch-cli' +pkgver=1.1.0 +pkgrel=1 +pkgdesc="A full-featured command line interface (CLI) for OpenSearch" +url='https://opensearch.org/docs/latest/clients/cli/' +arch=('x86_64') +license=('Apache') +conflicts=('opensearch') +depends=('glibc') +makedepends=('go') +source=( + "${pkgname}-${pkgver}.tar.gz::https://github.com/opensearch-project/opensearch-cli/archive/${pkgver}.tar.gz") +sha512sums=( + 'SKIP' +) + +prepare() { + cd ${pkgname}-${pkgver} + go mod vendor +} + +build() { + cd ${pkgname}-${pkgver} + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw -ldflags=-linkmode=external" + go build -v -o ${pkgname} . +} + +package() { + cd ${pkgname}-${pkgver} + install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -Dm755 ${pkgname} -t "${pkgdir}"/usr/bin/ +} + +# vim: ts=2 sw=2 et: