termux-packages/packages/virustotal-cli/build.sh
Leonid Pliushch d7c12de480 Revert "virustotal-cli: update to 0.8.0"
Cancelling update due to build issues.

This reverts commit 5b0c7a37324dae6106da552de794bb70f604fd8d.
2020-08-28 00:31:27 +03:00

34 lines
1.1 KiB
Bash

TERMUX_PKG_HOMEPAGE=https://github.com/VirusTotal/vt-cli
TERMUX_PKG_DESCRIPTION="Command line interface for VirusTotal"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
TERMUX_PKG_VERSION=0.7.0
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://github.com/VirusTotal/vt-cli/archive/$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=39a566be0e2ee1102c0bd9d3ddefa4a0e423c9ffe02962d4a48897a875312c95
TERMUX_PKG_BREAKS="vt-cli"
TERMUX_PKG_REPLACES="vt-cli"
termux_step_make() {
termux_setup_golang
export GOPATH=$TERMUX_PKG_BUILDDIR
mkdir -p "$GOPATH"/src/github.com/VirusTotal
ln -sf "$TERMUX_PKG_SRCDIR" "$GOPATH"/src/github.com/VirusTotal/vt-cli
cd "$GOPATH"/src/github.com/VirusTotal/vt-cli
GOOS=linux GOARCH=amd64 CC=gcc LD=gcc \
go get -u github.com/golang/dep/cmd/dep
"$GOPATH"/bin/dep ensure
go build \
-ldflags "-X github.com/VirusTotal/vt-cli/cmd.Version=$TERMUX_PKG_VERSION" \
-o "$TERMUX_PREFIX"/bin/vt-cli \
./vt/main.go
}
termux_step_make_install() {
ln -sfr "$TERMUX_PREFIX"/bin/vt-cli "$TERMUX_PREFIX"/bin/vt
}