summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8a9953833d5fe40cc3c9c7f4f2f7788def932f8c (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
37
# Maintainer: ramen <hendrik@hndrkk.sh>
# Contributor: Pablo Arias <pabloariasal@gmail.com>
# Contributor: John Jenkins <twodopeshaggy@gmail.com>


_pkgname=googler
pkgname=googler-git
pkgver=4.3.2.r27.g8231da1
pkgrel=1
pkgdesc="Google from the command-line"
arch=('any')
url="https://github.com/oksiquatzel/googler"
license=('GPL3')
depends=('python')
makedepends=('git')
conflicts=('googler')
source=("git+${url}.git")
md5sums=('SKIP')

prepare() {
  cd $srcdir/$_pkgname
  make disable-self-upgrade > /dev/null
}

pkgver() {
  cd $srcdir/$_pkgname
  git describe --long | sed 's/v\([^-]*-\)/\1r/;s/-/./g'
}

package() {
  cd "$srcdir/$_pkgname"
  install -Dm755 googler "${pkgdir}/usr/bin/googler"
  install -Dm644 googler.1 "${pkgdir}/usr/share/man/man1/googler.1"
  install -Dm644 auto-completion/fish/googler.fish "${pkgdir}/usr/share/fish/vendor_completions.d/googler.fish"
  install -Dm644 auto-completion/bash/googler-completion.bash "${pkgdir}/etc/bash_completion.d/googler"
  install -Dm644 auto-completion/zsh/_googler "${pkgdir}/usr/share/zsh/site-functions/_googler"
}