### this file is sourced not run
PKGVER=9.5.0
PKGBUILD=1
PKGARCH=x86_64

# BLFS 8.2
TARBALL=croc_${PKGVER}_src.tar.gz
MD5SUM=afbe2e8161db8609f5d607358a009677
SRC_URL=https://github.com/schollz/croc/releases/download/v${PKGVER}/$TARBALL
BUNDLE=

SLACKREQ=
SLACKDESC="croc: croc $PKGVER (CLI file transfer)
croc: 
croc: croc is a tool that allows any two computers to simply and securely 
croc: transfer files and folders. It supports end-to-end encryption, 
croc: cross-platform (Window/Mac/Linux/Android), multi-file transfer, 
croc: resuming and automatically bypass NAT without port-forwarding.
croc: 
croc: https://github.com/schollz/croc
croc: 
croc: 
croc: 
"

### default pkg_download
### default pkg_prepare
### package
pkg_package() {
	rm -r root # for whatever reason this gets touched by go, so remove it
}

### build
pkg_build() {
	. /etc/profile.d/golang.sh && # get path for our go compiler
	export GOPATH=/tmp/go &&      # don't clutter our home directory

	cd /tmp/croc* &&
	go build &&

	install -m755 croc /usr/bin &&
	mkdir -p /usr/share/bash-completion/completions /usr/share/doc/croc &&
	install -m644 src/install/bash_autocomplete /usr/share/bash-completion/completions/croc &&
	install -m644 README.md /usr/share/doc/croc &&

	pkg_build_slackdesc
}


