# Maintainer: Buf # Contributor: Alexander Menzhinsky pkgname=buf pkgver=1.0.0rc12 pkgrel=1 pkgdesc="A new way of working with Protocol Buffers" arch=("any") url="https://buf.build" license=('Apache') makedepends=('go') source=("https://github.com/bufbuild/buf/archive/v1.0.0-rc12.tar.gz") build() { cd ${pkgname}-1.0.0-rc12 go build -trimpath -buildmode=pie -mod=readonly -modcacherw -o . ./cmd/{buf,protoc-gen-buf-lint,protoc-gen-buf-breaking} ./buf bash-completion >completion.bash ./buf zsh-completion >completion.zsh ./buf fish-completion >completion.fish mkdir -p manpages ./buf manpages manpages } package() { install -Dm755 "${pkgname}-1.0.0-rc12/buf" "${pkgdir}/usr/bin/buf" install -Dm755 "${pkgname}-1.0.0-rc12/protoc-gen-buf-lint" "${pkgdir}/usr/bin/protoc-gen-buf-lint" install -Dm755 "${pkgname}-1.0.0-rc12/protoc-gen-buf-breaking" "${pkgdir}/usr/bin/protoc-gen-buf-breaking" install -Dm644 "${pkgname}-1.0.0-rc12/completion.bash" "${pkgdir}/etc/bash_completion.d/buf" install -Dm644 "${pkgname}-1.0.0-rc12/completion.zsh" "${pkgdir}/usr/share/zsh/site-functions/_buf" install -Dm644 "${pkgname}-1.0.0-rc12/completion.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/buf.fish" install -Dm644 "${pkgname}-1.0.0-rc12/manpages/${pkgname}"* -t "${pkgdir}/usr/share/man/man1/" } sha256sums=('bb218bff534f2926db6f676fd3dcb564ca8e75e28779cfd1eab057c6fba77cd5')