# Contributor: Sören Tempel # Maintainer: Natanael Copa pkgname=mercurial pkgver=4.1 pkgrel=0 pkgdesc="A scalable distributed SCM tool" url="https://www.mercurial-scm.org/" arch="all" license="GPL2+" depends="" makedepends="python2-dev" subpackages=" $pkgname-doc $pkgname-vim:vim:noarch $pkgname-zsh-completion:zshcomp:noarch $pkgname-bash-completion:bashcomp:noarch" source="https://www.mercurial-scm.org/release/$pkgname-$pkgver.tar.gz" builddir="$srcdir"/$pkgname-$pkgver build() { cd "$builddir" python2 setup.py build || return 1 } package() { cd "$builddir" python2 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" 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" 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" install -Dm644 "$builddir"/contrib/bash_completion \ "$subpkgdir"/usr/share/bash-completion/completions/${pkgname} || return 1 } md5sums="59c7072a70c8b41dbde801f935c47aea mercurial-4.1.tar.gz" sha256sums="7b33c32cdd1d518bc2e2ae223e6ef63c486cf52e9d01a45b99cf8eab7bea5274 mercurial-4.1.tar.gz" sha512sums="02e4aabe47473194961870909d4512a4be6814cccb51b727dfa9a34dd0aa5f92bfad7b03e6b58ce6c7e2531df52dac530f02264df28dcfc801036fe103cd4471 mercurial-4.1.tar.gz"