# Contributor: Ivan Tham # Maintainer: Ivan Tham pkgname=googler pkgver=3.9 pkgrel=0 pkgdesc="Google Search, Google Site Search, Google News from the terminal" url="https://github.com/jarun/googler" arch="noarch" license="GPL-3.0-or-later" depends="python3" subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch $pkgname-fish-completion:fishcomp:noarch $pkgname-zsh-completion:zshcomp:noarch " source="$pkgname-$pkgver.tar.gz::https://github.com/jarun/googler/archive/v$pkgver.tar.gz" build() { make disable-self-upgrade } package() { make install DESTDIR="$pkgdir" PREFIX=/usr } bashcomp() { pkgdesc="Bash completion for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel bash-completion" mkdir -p "$subpkgdir"/usr/share/bash-completion/completions/ install -Dm644 "$builddir"/auto-completion/bash/* \ "$subpkgdir"/usr/share/bash-completion/completions/ } fishcomp() { pkgdesc="Fish completion for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel fish" mkdir -p "$subpkgdir"/usr/share/fish/completions/ install -Dm644 "$builddir"/auto-completion/fish/* \ "$subpkgdir"/usr/share/fish/completions/ } zshcomp() { pkgdesc="Zsh completion for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel zsh" mkdir -p "$subpkgdir"/usr/share/zsh/site-functions install -Dm644 "$builddir"/auto-completion/zsh/* \ "$subpkgdir"/usr/share/zsh/site-functions/ } sha512sums="b11bcc87951fef8b1719d5fd8b2406c1a4f03fd2431eaaed1ce1dcc8451162e1b5f14b779858a9fa494e641f5ee92892878ae29fff2b4af0f09270a0076dff11 googler-3.9.tar.gz"