diff options
author | sharethewisdom | 2019-11-25 15:29:36 +0100 |
---|---|---|
committer | sharethewisdom | 2019-11-25 15:29:36 +0100 |
commit | 5bb65134bf3eba4093bbf25e0cc656ccadb1514c (patch) | |
tree | c5a5cd2753d3f2d970f035ba5fc1925e654b51fc /PKGBUILD | |
download | aur-5bb65134bf3eba4093bbf25e0cc656ccadb1514c.tar.gz |
initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..a228eafff51f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Bart De Roy <de dot roy dot bart at gmail dot com> +pkgname=pistol-git +pkgver=0.0.2.r15.gbd918ca +pkgrel=1 +pkgdesc='General purpose file previewer' +arch=('x86_64') +_gourl="github.com/doronbehar/pistol" +url="https://$_gourl" +license=('MIT') +makedepends=('go' 'git') +optdepends=('ranger: file browser to preview files in' 'lf: file browser to preview files in') +source=("$pkgname::git+$url#branch=master") +sha256sums=('SKIP') + +pkgver() { + cd "$srcdir/$pkgname" + # cuts off 'v' prefix and uses most recent + # un-annotated tag reachable from the last commit + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd "$srcdir/$pkgname" + # -fix flag is a no-op when using modules + GOPATH="$srcdir" go get -v "$_gourl/cmd/pistol" + strip -x "$srcdir/bin/pistol" +} + +package() { + install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" "$srcdir/$pkgname/LICENSE" + install -Dm755 "$srcdir/bin/pistol" "$pkgdir/usr/bin/pistol" +} + +warn_build_references() { + : # I like __FILE__ and don't consider build references to be a problem +} +# vim:set ts=2 sw=2 et: |