summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8b49580b3fc7c1a7fced6357ba00a98417f204a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Maintainer: Josh Ellithorpe <quest at mac dot com>

pkgname=s
pkgver=0.5.10
pkgrel=4
pkgdesc="Web search from the terminal. Supports over 50 providers including google, github, and stackoverflow."
arch=('i686' 'x86_64')
url="http://github.com/zquestz/s"
license=('MIT')
makedepends=('go' 'git')
options=('!strip' '!emptydirs')
provides=("s=${pkgver}")
source=("https://github.com/zquestz/${pkgname}/archive/v${pkgver}.tar.gz")
sha256sums=('8a5ba823d02f495dd1bb150882ddccd2bb082efff4c996b9b43e4cd5599d3df2')

build() {
  cd "$pkgname-$pkgver"

  export GOPATH=~/go

  go get -u github.com/FiloSottile/gvt
  ~/go/bin/gvt restore

  go build .
}

package() {
  cd "$pkgname-$pkgver"

  install -Dm 775 "$pkgname-$pkgver" \
    "${pkgdir}/usr/bin/${pkgname}"
  install -Dm 644 "LICENSE" \
    "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  install -Dm 644 "autocomplete/s-completion.bash" \
    "${pkgdir}/usr/share/bash-completion/completions/s"
}