# Contributor: Sören Tempel # Maintainer: Natanael Copa pkgname=mercurial pkgver=5.2.1 pkgrel=0 pkgdesc="Scalable distributed SCM tool" url="https://www.mercurial-scm.org" arch="all" license="GPL-2.0-or-later" depends="python3" makedepends="python3-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/mercurial-$pkgver.tar.gz" # secfixes: # 4.9-r0: # - CVE-2019-3902 build() { cd "$builddir" HGPYTHON3=1 python3 setup.py build } package() { cd "$builddir" HGPYTHON3=1 python3 setup.py install --root="$pkgdir" install -m755 contrib/hgk contrib/hg-ssh hgeditor "$pkgdir"/usr/bin local man for man in doc/*.?; do install -Dm644 "$man" \ "$pkgdir"/usr/share/man/man${man##*.}/${man##*/} 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/ } zshcomp() { depends="" pkgdesc="Zsh completion for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel zsh" install -Dm644 "$builddir"/contrib/zsh_completion \ "$subpkgdir"/usr/share/zsh/site-functions/_$pkgname } bashcomp() { depends="" pkgdesc="Bash completion for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel bash-completion" install -Dm644 "$builddir"/contrib/bash_completion \ "$subpkgdir"/usr/share/bash-completion/completions/$pkgname } sha512sums="7be88570769561157eb8ef3510cb88c519c4db29278abdf4e4219721531d70d59b94be03d9b7da26b9322581d89d26b9833f063525ceb1ac749fe0b7fb1826d2 mercurial-5.2.1.tar.gz"