db-move: moved gvfs from [testing] to [extra] (x86_64)
[arch-packages.git] / mercurial / repos / extra-x86_64 / PKGBUILD
blobcb2289fc1e959cdcff0163b587a9816aab1885aa
1 # Maintainer:  Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
2 # Contributor: Giovanni Scafora <giovanni@archlinux.org>
3 # Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
5 pkgname=mercurial
6 pkgver=6.4.2
7 pkgrel=2
8 pkgdesc='A scalable distributed SCM tool'
9 arch=(x86_64)
10 url="https://www.mercurial-scm.org/"
11 license=(GPL)
12 depends=(python)
13 makedepends=(python-docutils)
14 optdepends=('tk: for the hgk GUI')
15 #checkdepends=('breezy' 'cvs' 'git' 'git-lfs' 'python-docutils' 'subversion' 'unzip')
17 # ToDo:
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               EB851395B4223EE2F7BA0B28DA54740BF08732BA
26               818D87CD1AC180C394C86E633A33DE460D9EC39F  # Pulkit Goyal <7895pulkit@gmail.com>
27               1F66F8CDF654E905C11DA061A11E01CD0E05D956) # Raphaël Gomès <alphare@raphaelgomes.dev>
28 source=(https://www.mercurial-scm.org/release/${pkgname}-${pkgver}.tar.gz{,.asc}
29         mercurial.profile)
30 sha512sums=('6a64ec31ecf60d1fe8ffeee40293302a69583d29969b7344b9b4c186c8086078b13b2983db1cf12711fefb150aac80c95b5f35898d3d767fd81a3cd7791c0882'
31             'SKIP'
32             '710dcddb24d928efc97370e869d9caa083107929ed9a1086dd2a3ae0caaf2c71e2f29060597e29315b6b15b1616251c42412e268ce737109c48ae4d7aa1b9555')
34 build() {
35   cd $pkgname-$pkgver
36   python setup.py build
37   make -C contrib/chg
40 check() {
41   cd $pkgname-$pkgver/tests
42   # TODO - disabled for now - to many tests fail
43   #python run-tests.py # -j48 || :
46 package() {
47   cd $pkgname-$pkgver
48   python setup.py install --root="$pkgdir" --skip-build --optimize=1
49   make DESTDIR="${pkgdir}" PREFIX=/usr install
51   install -m644 -D contrib/zsh_completion "$pkgdir/usr/share/zsh/site-functions/_hg"
52   install -m644 -D contrib/bash_completion "$pkgdir/usr/share/bash-completion/completions/hg"
54   make -C contrib/chg DESTDIR="$pkgdir" PREFIX=/usr install
55   install -m755 contrib/hg-ssh "$pkgdir/usr/bin"
56   install -m755 contrib/hgk "$pkgdir/usr/bin"
58   install -d "$pkgdir/usr/share/emacs/site-lisp"
59   install -m644 contrib/{mq.el,mercurial.el} "$pkgdir/usr/share/emacs/site-lisp"
61   install -Dm644 contrib/vim/HGAnnotate.vim \
62     "$pkgdir/usr/share/vim/vimfiles/syntax/HGAnnotate.vim"
64   # set some variables
65   install -m755 -d "$pkgdir/etc/profile.d"
66   install -m644 "$srcdir/mercurial.profile" "$pkgdir/etc/profile.d/mercurial.sh"
68   # FS#38825 - Add certs config to package
69   install -m755 -d "$pkgdir/etc/mercurial"
70   cat <<-EOF > "$pkgdir/etc/mercurial/hgrc"
71         [web]
72         cacerts = /etc/ssl/certs/ca-certificates.crt
73         EOF