summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 07523a1c63959bdbc80cbe25a7d59b7fc7c5a3cd (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
# See http://wiki.archlinux.org/index.php/Python_Package_Guidelines for more
# information on Python packaging.

# See http://wiki.archlinux.org/index.php/VCS_PKGBUILD_Guidelines
# for more information on packaging from Mercurial(hg) sources.

# Maintainer: Fabien Devaux <fdev31 @ gmail . com>
_name=chg
pkgname="${_name}"
pkgver="hg"
pkgrel=1
pkgdesc="A bit faster Mercurial client for Unix with per-user cmdserver daemon."
arch=('x86_64' 'x86')
url="https://bitbucket.org/yuja/chg/src"
license=('GPL')
groups=()
depends=('python2' 'mercurial')
makedepends=('mercurial')
provides=()
conflicts=()
replaces=()
backup=()
options=(!emptydirs)
install=
source=()
md5sums=()

_hgroot="https://bitbucket.org/yuja/chg"
_hgrepo="chg"

build() {
  cd "$srcdir"
  msg "Connecting to Mercurial server...."

  if [[ -d "$_hgrepo" ]]; then
    cd "$_hgrepo"
    hg pull -u
    msg "The local files are updated."
  else
    hg clone "$_hgroot" "$_hgrepo"
  fi

  msg "Mercurial checkout done or server timeout"
  msg "Starting build..."
}

package() {
  cd "$srcdir/$_name"
  sed -i "s#/local##" Makefile
  make HGEXTDIR='/usr/lib/python2.7/site-packages' DESTDIR="$pkgdir/" install
}

# vim:set ts=2 sw=2 et: