pkgname=mercurial pkgver=6.9 pkgrel=1 pkgdesc="A scalable distributed SCM tool" arch=('x86_64') url="https://www.mercurial-scm.org" license=('GPL-2.0-or-later') depends=('python') makedepends=( 'python-build' 'python-installer' 'python-wheel' 'python-setuptools' 'python-docutils' ) backup=(etc/mercurial/hgrc) source=(https://www.mercurial-scm.org/release/${pkgname}-${pkgver}.tar.gz mercurial.profile) sha256sums=(629604293df2be8171ec856bf4f8b4faa8e4305af13607dce0f89f74132836d6 87427151713e689cd87dc50d50c048e0e58285815e4eb61962b50583532cbde5) build() { cd ${pkgname}-${pkgver} python3 -m build -wn make CC="${CHOST}-gcc" -C contrib/chg } package() { cd ${pkgname}-${pkgver} python3 -m installer -d ${pkgdir} dist/*.whl make DESTDIR=${pkgdir} PREFIX=/usr install-doc install -Dm644 contrib/zsh_completion ${pkgdir}/usr/share/zsh/site-functions/_hg install -Dm644 contrib/bash_completion ${pkgdir}/usr/share/bash-completion/completions/hg make -C contrib/chg DESTDIR=${pkgdir} PREFIX=/usr install install -Dm755 contrib/hg-ssh ${pkgdir}/usr/bin install -Dm755 contrib/hgk ${pkgdir}/usr/bin install -Dm644 -t ${pkgdir}/usr/share/emacs/site-lisp/ contrib/{mq.el,mercurial.el} install -Dm644 -t ${pkgdir}/usr/share/vim/vimfiles/syntax/ contrib/vim/HGAnnotate.vim # set some variables install -Dm644 ${srcdir}/mercurial.profile ${pkgdir}/etc/profile.d/mercurial.sh # FS#38825 - Add certs config to package cat <<-EOF | install -Dm755 /dev/stdin ${pkgdir}/etc/mercurial/hgrc [web] cacerts = /etc/ssl/certs EOF }