summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f39cdf93f8ee23baeb9b631cd53dee422f3d2a79 (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
# Contributor: Vsevolod Balashov <vsevolod@balashov.name>
# Contributor: Egor Kuropatkin <egor.k8n@gmail.com>
# Contributor: Egor Laufer <egor.l4r@gmail.com>
#
_name=hg-git
pkgname=$_name-hg
pkgver=1951.e799e4fad448
pkgrel=1
pkgdesc="the Hg-Git mercurial plugin"
arch=(any)
url="http://hg-git.github.io/"
license=('GPL2')
depends=('mercurial' 'python-dulwich')
makedepends=('mercurial' 'python-setuptools-scm'
             'python-build' 'python-installer'
             'python-wheel')
provides=('hg-git')
conflicts=('hg-git')
source=('hg+https://foss.heptapod.net/mercurial/hg-git'
        'hggit.rc')
md5sums=('SKIP'
         '592a454e09f498074c57a5b7e383e808')

pkgver() {
    cd "$srcdir/$_name"
    hg identify -ni | awk 'BEGIN{OFS=".";} {print $2,$1}'
}

build() {
    cd "$srcdir/$_name"
    python -m build --wheel --no-isolation
}

package() {
    cd $srcdir/$_name
    python -m installer --destdir="$pkgdir" dist/*.whl
    install -m0644 -D "${srcdir}/hggit.rc" "${pkgdir}/etc/mercurial/hgrc.d/hggit.rc"
}