# Contributor: André Klitzing # Maintainer: André Klitzing pkgname=croc pkgver=9.6.5 pkgrel=2 pkgdesc="Easily and securely send things from one computer to another" url="https://github.com/schollz/croc" license="MIT" arch="all" makedepends="go" subpackages="$pkgname-bash-completion $pkgname-zsh-completion" source="https://github.com/schollz/croc/archive/refs/tags/v$pkgver/croc-$pkgver.tar.gz" options="net" # fetch dependencies # secfixes: # 9.1.0-r0: # - CVE-2021-31603 export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}" export GOTMPDIR="${GOTMPDIR:-"$srcdir"}" export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}" build() { go build -v -ldflags "-X github.com/schollz/croc/v${pkgver%%.*}/src/cli.Version=v$pkgver" } check() { go test ./... } package() { install -Dm755 $pkgname -t "$pkgdir"/usr/bin/ install -Dm644 src/install/bash_autocomplete \ "$pkgdir"/usr/share/bash-completion/completions/croc install -Dm644 src/install/zsh_autocomplete \ "$pkgdir"/usr/share/zsh/site-functions/_croc } sha512sums=" 6c5048b8e774577efa56d5578f38f065b14fc459ebb5e3bdadce3971b54858c44f26019dc046467c595074e4582cae6d69b693991ba6084b43464e69b1bb76a9 croc-9.6.5.tar.gz "