diff options
author | Valentin Hăloiu | 2015-06-10 02:28:38 +0300 |
---|---|---|
committer | Valentin Hăloiu | 2015-06-10 02:28:38 +0300 |
commit | 9f21b3bbe5b40bc6fa23e8eefa8fd47aec731c61 (patch) | |
tree | 176f730002ffbc4e5d7595f6673af17c83080ad3 /PKGBUILD | |
download | aur-9f21b3bbe5b40bc6fa23e8eefa8fd47aec731c61.tar.gz |
Update to 1.7.1
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8eeade6a043f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,36 @@ +# Contributor: Andy Weidenbaum <archbaum@gmail.com> + +pkgname=the_platinum_searcher +pkgver=1.7.7 +pkgrel=1 +pkgdesc="A code search tool similar to ack and the_silver_searcher(ag)" +arch=('i686' 'x86_64') +makedepends=('git' 'go' 'mercurial') +url="https://github.com/monochromegane/the_platinum_searcher" +license=('MIT') +provides=('pt' 'the_platinum_searcher') +source=('git+https://github.com/monochromegane/the_platinum_searcher.git') +md5sums=('SKIP') + +build() { + repodir="$srcdir"/src/github.com/monochromegane + mkdir -p "$repodir" + mv "$srcdir"/$pkgname "$repodir" + cd "$repodir"/$pkgname + git checkout -q v$pkgver + GOPATH="$srcdir" go get -v ./... +} + +check() { + [[ -f /etc/profile.d/go.sh ]] && source /etc/profile.d/go.sh + GOPATH="$GOPATH:$srcdir" go test -v -x github.com/monochromegane/the_platinum_searcher/ +} + +package() { + [[ -f /etc/profile.d/go.sh ]] && source /etc/profile.d/go.sh + + msg 'Installing binaries...' + for _bin in `find "$srcdir/bin" -mindepth 1 -maxdepth 1 -type f -printf '%f\n'`; do + install -Dm 755 "$srcdir/bin/$_bin" "$pkgdir/usr/bin/$_bin" + done +} |