diff options
author | Tony Lambiris | 2019-01-17 18:28:30 -0500 |
---|---|---|
committer | Tony Lambiris | 2019-01-17 18:28:30 -0500 |
commit | 85ff713fd3f25232690a81e4e9619557dfbd7272 (patch) | |
tree | 2ac1e7a8024213a35843aaf5b6b8e4e3756ffa36 | |
download | aur-85ff713fd3f25232690a81e4e9619557dfbd7272.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 46 |
3 files changed, 65 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..2d278e15f41b --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = virusgotal-git + pkgdesc = VirusTotal zero dependency command line client. + pkgver = 1.0.2.r1.g06aa62b + pkgrel = 1 + url = https://github.com/moldabekov/virusgotal + arch = x86_64 + license = MIT + makedepends = go + provides = virusgotal + conflicts = virusgotal + source = virusgotal-git::git+https://github.com/moldabekov/virusgotal + sha256sums = SKIP + +pkgname = virusgotal-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..f0e3d1ec21b2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +src +pkg +virusgotal-git +*pkg.tar.xz diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..9a60ffcb6286 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Tony Lambiris <tony@criticalstack.com> + +pkgname=virusgotal-git +pkgver=1.0.2.r1.g06aa62b +pkgrel=1 +pkgdesc='VirusTotal zero dependency command line client.' +arch=(x86_64) +url='https://github.com/moldabekov/virusgotal' +license=(MIT) +makedepends=(go) +conflicts=(virusgotal) +provides=(virusgotal) +source=("${pkgname}::git+https://github.com/moldabekov/virusgotal") +sha256sums=('SKIP') + +pkgver() { + cd "$srcdir/$pkgname" + + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd "$srcdir/$pkgname" + + install -m755 -d "$srcdir/go/src/github.com/moldabekov" + cp -a "$srcdir/$pkgname" "$srcdir/go/src/github.com/moldabekov/virusgotal" +} + +build() { + cd "$srcdir/go/src/github.com/moldabekov/virusgotal" + + export GOPATH="$srcdir/go" + export PATH="$GOPATH/bin:$PATH" + + go get -v github.com/moldabekov/virusgotal + + mkdir -p bin + go build -ldflags "-s -w" -o bin/virusgotal github.com/moldabekov/virusgotal + +} + +package() { + cd "$srcdir/go/src/github.com/moldabekov/virusgotal" + + install -Dm755 bin/virusgotal $pkgdir/usr/bin/virusgotal +} |