# Contributor: Sören Tempel # Maintainer: Natanael Copa pkgname=mercurial pkgver=3.8.2 pkgrel=0 pkgdesc="A scalable distributed SCM tool" url="https://www.mercurial-scm.org/" arch="all" license="GPL2+" depends="" makedepends="python-dev" subpackages=" $pkgname-doc $pkgname-vim:vim $pkgname-zsh-completion:zshcomp $pkgname-bash-completion:bashcomp" source="https://www.mercurial-scm.org/release/$pkgname-$pkgver.tar.gz" _builddir="$srcdir"/$pkgname-$pkgver build() { cd "$_builddir" python setup.py build || return 1 } package() { cd "$_builddir" python setup.py install --root="$pkgdir" || return 1 install -m755 contrib/hgk hgeditor "$pkgdir"/usr/bin || return 1 for man in doc/*.?; do install -Dm644 "$man" \ "$pkgdir"/usr/share/man/man${man##*.}/${man##*/} || return 1 done } vim() { depends="" pkgdesc="Vim syntax for $pkgname" install_if="vim $pkgname=$pkgver-r$pkgrel" arch="noarch" cd "$_builddir"/contrib/vim/ mkdir -p "$subpkgdir"/usr/share/vim/vimfiles/syntax/ install -Dm644 HGAnnotate.vim hgtest.vim \ "$subpkgdir"/usr/share/vim/vimfiles/syntax/ || return 1 } zshcomp() { depends="" pkgdesc="Zsh completions for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel zsh" arch="noarch" install -Dm644 "$_builddir"/contrib/zsh_completion \ "$subpkgdir"/usr/share/zsh/site-functions/_${pkgname} || return 1 } bashcomp() { depends="" pkgdesc="Bash completions for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel bash-completion" arch="noarch" install -Dm644 "$_builddir"/contrib/bash_completion \ "$subpkgdir"/usr/share/bash-completion/completions/${pkgname} || return 1 } md5sums="c38daa0cbe264fc621dc3bb05933b0b3 mercurial-3.8.2.tar.gz" sha256sums="cb78b16956140625266a8a6d1fadc7c868969d994086e1ec60279a66bf20bffd mercurial-3.8.2.tar.gz" sha512sums="16705396e71d86e7b0eec5d42e39d013812169f62cee10998bdfc088570759576aadcb7845f438b0e12664a3d8487fe5cd19c034811aefda8b2ee59e3d9a0f60 mercurial-3.8.2.tar.gz"