1 # Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
2 # Contributor: Giovanni Scafora <giovanni@archlinux.org>
3 # Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
8 pkgdesc='A scalable distributed SCM tool'
10 url="https://www.mercurial-scm.org/"
13 makedepends=(python-docutils)
14 optdepends=('tk: for the hgk GUI')
15 #checkdepends=('breezy' 'cvs' 'git' 'git-lfs' 'python-docutils' 'subversion' 'unzip')
18 # check included contrib/packaging/mercurial.spec and how BLFS/Gentoo/Debian/Fedora do it
19 # the following should be either makedepends or checkdepends when running tests
20 # 'python-gnupg' 'python-pygments' 'python-pyflakes' 'python-pyopenssl'
21 # 'openssh' 'rust' 'subversion' 'breezy' 'cvs' 'git')
23 backup=(etc/mercurial/hgrc)
24 validpgpkeys=(2BCCE14F5C6725AA2EA8AEB7B9C9DC824AA5BDD5
25 3A8155163D0E20A530FCB78647A67FFAA346AACE
26 EB851395B4223EE2F7BA0B28DA54740BF08732BA
27 818D87CD1AC180C394C86E633A33DE460D9EC39F # Pulkit Goyal <7895pulkit@gmail.com>
28 1F66F8CDF654E905C11DA061A11E01CD0E05D956) # Raphaël Gomès <alphare@raphaelgomes.dev>
29 source=(https://www.mercurial-scm.org/release/${pkgname}-${pkgver}.tar.gz{,.asc}
31 sha512sums=('b43221c078efd4978fd47414d9442f423a97660e1f4c10d704a8d3403051778d2a25a0b4be6315d0a2126d01c14910ccbe9a5be6242b561a2bea0c522f54b731'
33 '710dcddb24d928efc97370e869d9caa083107929ed9a1086dd2a3ae0caaf2c71e2f29060597e29315b6b15b1616251c42412e268ce737109c48ae4d7aa1b9555')
42 cd $pkgname-$pkgver/tests
43 # TODO - disabled for now - to many tests fail
44 #python run-tests.py # -j48 || :
49 python setup.py install --root="$pkgdir" --skip-build --optimize=1
50 make DESTDIR="${pkgdir}" PREFIX=/usr install
52 install -m644 -D contrib/zsh_completion "$pkgdir/usr/share/zsh/site-functions/_hg"
53 install -m644 -D contrib/bash_completion "$pkgdir/usr/share/bash-completion/completions/hg"
55 make -C contrib/chg DESTDIR="$pkgdir" PREFIX=/usr install
56 install -m755 contrib/hg-ssh "$pkgdir/usr/bin"
57 install -m755 contrib/hgk "$pkgdir/usr/bin"
59 install -d "$pkgdir/usr/share/emacs/site-lisp"
60 install -m644 contrib/{mq.el,mercurial.el} "$pkgdir/usr/share/emacs/site-lisp"
62 install -Dm644 contrib/vim/HGAnnotate.vim \
63 "$pkgdir/usr/share/vim/vimfiles/syntax/HGAnnotate.vim"
66 install -m755 -d "$pkgdir/etc/profile.d"
67 install -m644 "$srcdir/mercurial.profile" "$pkgdir/etc/profile.d/mercurial.sh"
69 # FS#38825 - Add certs config to package
70 install -m755 -d "$pkgdir/etc/mercurial"
71 cat <<-EOF > "$pkgdir/etc/mercurial/hgrc"
73 cacerts = /etc/ssl/certs/ca-certificates.crt