# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=hstr pkgver=2.0 pkgrel=0 pkgdesc="Bash and ZSH shell history suggest box" url="https://github.com/dvorka/hstr" arch="all" license="Apache-2.0" makedepends="autoconf automake libtool ncurses-dev readline-dev" options="!check" # no *automated* tests to run subpackages=" $pkgname-doc $pkgname-bash-completion:bashcomp:noarch " source="$pkgname-$pkgver.tar.gz::https://github.com/dvorka/hstr/archive/$pkgver/hstr-$pkgver.tar.gz" prepare() { default_prepare sed -i "s|||" \ src/include/hstr_curses.h src/include/hstr.h cd build/tarball ./tarball-automake.sh } build() { ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man make } package() { make install DESTDIR="$pkgdir" } 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/bash-completion/completions/hstr \ "$subpkgdir"/usr/share/bash-completion/completions rmdir -p "$pkgdir"/usr/share/bash-completion/completions || : } sha512sums="50d5e8e61aa853dab0093f4225d3329e98bc59609d8d59abf832cd4cb616d78a2fa091d1ad8d16f3543276c4ead95a419f33a13a96f423bf93dc648da32740b7 hstr-2.0.tar.gz"