summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 81d332d923ecd5c4616c9db3994ed2b657c91fcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=mercurial-stable-hg
pkgver=r43734.88a306478556
pkgrel=1
pkgdesc="Distributed source control management tool (development stable branch)"
arch=('i686' 'x86_64')
url="https://www.mercurial-scm.org/"
license=('GPL2')
depends=('glibc' 'python')
optdepends=('tk: for the hgk GUI')
makedepends=('mercurial' 'python-docutils')
provides=('mercurial')
conflicts=('mercurial')
backup=('etc/mercurial/hgrc')
source=("hg+https://www.mercurial-scm.org/repo/hg#branch=stable"
        "mercurial.profile::https://git.archlinux.org/svntogit/packages.git/plain/trunk/mercurial.profile?h=packages/mercurial")
sha256sums=('SKIP'
            'SKIP')


pkgver() {
  cd "hg"

  printf "r%s.%s" "$(hg identify -n)" "$(hg identify -i)"
}

build() {
  cd "hg"

  make all
  make -C "contrib/chg"
}

check() {
  cd "hg"

  #make tests
}

package() {
  cd "hg"

  python "setup.py" install \
    --optimize 1 \
    --root "$pkgdir"

  make DESTDIR="$pkgdir" PREFIX="/usr" -C "contrib/chg" install

  install -d "$pkgdir/usr/share/man"/{man1,man5}
  install -m644 "doc/hg.1" "$pkgdir/usr/share/man/man1"
  install -m644 doc/{hgrc.5,hgignore.5} "$pkgdir/usr/share/man/man5"

  install -m755 contrib/{hgk,hg-ssh} "$pkgdir/usr/bin"
  install -Dm644 "contrib/bash_completion" "$pkgdir/usr/share/bash-completion/completions/hg"
  install -Dm644 "contrib/zsh_completion" "$pkgdir/usr/share/zsh/site-functions/_hg"

  install -d "$pkgdir/usr/share/emacs/site-lisp"
  install -m644 contrib/{mq.el,mercurial.el} "$pkgdir/usr/share/emacs/site-lisp"

  install -Dm644 "contrib/vim/HGAnnotate.vim" "$pkgdir/usr/share/vim/vimfiles/syntax/HGAnnotate.vim"

  install -Dm755 "$srcdir/mercurial.profile" "$pkgdir/etc/profile.d/mercurial.sh"

  # FS#38825 - Add certs config to package
  install -dm755 "$pkgdir/etc/mercurial"
  printf "\n[web]\ncacerts = /etc/ssl/certs/ca-certificates.crt\n" >> "$pkgdir/etc/mercurial/hgrc"
}