# Contributor: Sören Tempel # Maintainer: Natanael Copa pkgname=the_silver_searcher pkgver=2.0.0 pkgrel=1 pkgdesc="A code searching tool similar to ack, with a focus on speed." url="http://geoff.greer.fm/ag/" arch="all" license="ASL 2.0" depends="" makedepends="pcre-dev xz-dev zlib-dev" subpackages="$pkgname-doc $pkgname-zsh-completion:zshcomp:noarch $pkgname-bash-completion:bashcomp:noarch" source="http://geoff.greer.fm/ag/releases/$pkgname-$pkgver.tar.gz" builddir="$srcdir"/$pkgname-$pkgver build () { cd "$builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var \ || return 1 make || return 1 } package() { cd "$builddir" make DESTDIR="$pkgdir" install || return 1 } bashcomp() { depends="" pkgdesc="Bash completions for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel bash-completion" mkdir -p "$subpkgdir"/usr/share/bash-completion/completions/ mv "$pkgdir"/usr/share/the_silver_searcher/completions/ag.bashcomp.sh \ "$subpkgdir"/usr/share/bash-completion/completions/ag || return 1 rmdir -p "$pkgdir"/usr/share/the_silver_searcher/completions/ 2>&1 || true } zshcomp() { depends="" pkgdesc="Zsh completions for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel zsh" mkdir -p "$subpkgdir"/usr/share/zsh/site-functions/ mv "$pkgdir"/usr/share/zsh/site-functions/_the_silver_searcher \ "$subpkgdir"/usr/share/zsh/site-functions/ || return 1 rmdir -p "$pkgdir"/usr/share/zsh/site-functions/ 2>&1 || true } sha512sums="54d6a47e375d5f978d7fc47a0854ea0691789e33307f6bef18711fae94d1c9a1127f8f8e6d27fb5d4a1b70f05ca6892a21cff42a72cfac788e421640631274b4 the_silver_searcher-2.0.0.tar.gz"