diff options
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | PKGBUILD | 51 |
3 files changed, 40 insertions, 28 deletions
@@ -1,15 +1,14 @@ pkgbase = vt-cli pkgdesc = VirusTotal Command Line Interface - pkgver = 0.7.0 + pkgver = 1.0.0 pkgrel = 1 - url = https://github.com/VirusTotal/vt-cli + url = https://virustotal.github.io/vt-cli/ arch = i686 arch = x86_64 license = Apache makedepends = go - makedepends = dep - source = vt-cli-0.7.0.tar.gz::https://github.com/VirusTotal/vt-cli/archive/0.7.0.tar.gz - sha512sums = 2064b4a34c80ae71b199c870acef4a42f64f79718bb1cd74eb00027b47f334fba23287433be8d86995a9a82fd0f1bbf8c243b6177612005eea7900cdfe3968d0 + depends = glibc + source = https://github.com/VirusTotal/vt-cli/archive/1.0.0/vt-cli-1.0.0.tar.gz + sha256sums = 8fab50202ce3a3f8128e94565cb58cdc2cbf5f816fd7b0855d897a379c9cfaf6 pkgname = vt-cli - diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..f1ecb611e6e2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +/pkg/ +/src/ +/*.log +/*.tar.gz +/*.pkg.tar* +/*.src.tar* @@ -1,34 +1,41 @@ -# Maintainer: Matthias Lisin <ml@visu.li +# Maintainer: ml <> pkgname=vt-cli -pkgver=0.7.0 +pkgver=1.0.0 pkgrel=1 pkgdesc='VirusTotal Command Line Interface' arch=('i686' 'x86_64') -url='https://github.com/VirusTotal/vt-cli' +url=https://virustotal.github.io/vt-cli/ license=('Apache') -makedepends=('go' 'dep') -source=("$pkgname-$pkgver.tar.gz::${url}/archive/${pkgver}.tar.gz") -sha512sums=('2064b4a34c80ae71b199c870acef4a42f64f79718bb1cd74eb00027b47f334fba23287433be8d86995a9a82fd0f1bbf8c243b6177612005eea7900cdfe3968d0') -_gopkg=gopath/src/github.com/VirusTotal/"$pkgname" +depends=('glibc') +makedepends=('go') +source=("https://github.com/VirusTotal/vt-cli/archive/$pkgver/$pkgname-$pkgver.tar.gz") +sha256sums=('8fab50202ce3a3f8128e94565cb58cdc2cbf5f816fd7b0855d897a379c9cfaf6') -prepare() { - export GOPATH="$srcdir/gopath" - mkdir -p "${_gopkg%/*}" - ln -frs "$pkgname-$pkgver" "$_gopkg" - cd "$_gopkg" - dep ensure +build() { + cd "$pkgname-$pkgver" + export CGO_ENABLED=1 + export CGO_LDFLAGS="$LDFLAGS" + export CGO_CFLAGS="$CFLAGS" + export CGO_CPPFLAGS="$CPPFLAGS" + export CGO_CXXFLAGS="$CXXFLAGS" + export GOFLAGS='-buildmode=pie -trimpath -modcacherw' + go build -o build/vt -ldflags "-linkmode=external -X github.com/VirusTotal/vt-cli/cmd.Version=$pkgver" ./vt + build/vt completion bash >vt.bash + build/vt completion zsh >vt.zsh + build/vt completion fish >vt.fish } -build() { - export GOPATH="$srcdir/gopath" - cd "$_gopkg" - LDFLAGS+=" -X github.com/VirusTotal/vt-cli/cmd.Version=${pkgver}" - go build -trimpath \ - -ldflags "-extldflags=${LDFLAGS}" \ - -buildmode=pie -o build/vt vt/main.go +check() { + cd "$pkgname-$pkgver" + # yaml_test.go broken. fails upstream as well + go test -ldflags "-linkmode=external" -short ./utils/... } package() { - cd "$pkgname-$pkgver" - install -Dm755 build/vt "$pkgdir/usr/bin/vt" + cd "$pkgname-$pkgver" + install -Dm755 build/vt -t "$pkgdir/usr/bin" + install -Dm644 vt.bash "$pkgdir/usr/share/bash-completion/completions/vt" + install -Dm644 vt.zsh "$pkgdir/usr/share/zsh/site-functions/_vt" + install -Dm644 vt.fish "$pkgdir/usr/share/fish/vendor_completions.d/$pkgname".fish + install -Dm644 -t "$pkgdir/usr/share/doc/$pkgname" doc/* } |