aboutsummaryrefslogtreecommitdiffstats
path: root/testing/googler/APKBUILD
blob: bc561b1aa0bee1c88fd6c122598731dc64638523 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Contributor: Ivan Tham <pickfire@riseup.net>
# Maintainer: Ivan Tham <pickfire@riseup.net>
pkgname=googler
pkgver=3.6
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-completions:fishcomp:noarch
	$pkgname-zsh-completion:zshcomp:noarch
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/jarun/googler/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	make disable-self-upgrade
}

check() {
	cd "$builddir"
	./googler --help > /dev/null
}

package() {
	cd "$builddir"
	make install DESTDIR="$pkgdir" PREFIX=/usr
}

bashcomp() {
        pkgdesc="Bash completions 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 completions 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 completions 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="d3c8328ad5b7fdcdde32a1b0bdd2f9d87266d9a06ba344b8034442200bea2f787d1bae9c5ca44a5119ef28a8fc0040f29388285c9030c14bc858d9673d0fa177  googler-3.6.tar.gz"